-
Notifications
You must be signed in to change notification settings - Fork 3k
[Parquet] Fix vectorized reads for negative decimals #1736
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Parquet] Fix vectorized reads for negative decimals #1736
Conversation
ba7ab43 to
986fcee
Compare
| private RandomUtil() { | ||
| } | ||
|
|
||
| private static final Random NEGATIVE_VALUES = new Random(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
All tests need to use the Random that is passed in so that the values that are generated are deterministic and repeatable. That's what allows us to generated an iterator instead of a list in some cases, and makes it so if we do have a problem, we can repeat the test and debug.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For some reason, TestLocalScan#testRandomData() fails if I use the random passed in to do
boolean negate = random.nextInt(2) == 1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like this caused a test failure in TestSparkParquetWriter#testCorrectness also. Pushed a commit to get rid of the new Random.
rdblue
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good other than the new Random added in tests. Let's merge after that's fixed.
|
Thanks, @samarthjain! |
No description provided.