-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-21330][SQL] Bad partitioning does not allow to read a JDBC table with extreme values on the partition column #18800
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
Conversation
| val numPartitions = | ||
| if ((upperBound - lowerBound) >= partitioning.numPartitions) { | ||
| if ((upperBound - lowerBound) >= partitioning.numPartitions || | ||
| (upperBound - lowerBound) < 0) { |
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. for bonus points, add a comment about what this is for, and indent this line two more spaces
| val df = sql("SELECT * FROM partsoverflow") | ||
| checkNumPartitions(df, expectedNumPartitions = 3) | ||
| assert(df.collect().length == 3) | ||
|
|
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.
And maybe delete this blank for tidiness
|
Test build #80130 has finished for PR 18800 at commit
|
|
Test build #80131 has finished for PR 18800 at commit
|
|
Test build #3867 has finished for PR 18800 at commit
|
…le with extreme values on the partition column ## What changes were proposed in this pull request? An overflow of the difference of bounds on the partitioning column leads to no data being read. This patch checks for this overflow. ## How was this patch tested? New unit test. Author: Andrew Ray <[email protected]> Closes #18800 from aray/SPARK-21330. (cherry picked from commit 25826c7) Signed-off-by: Sean Owen <[email protected]>
…le with extreme values on the partition column ## What changes were proposed in this pull request? An overflow of the difference of bounds on the partitioning column leads to no data being read. This patch checks for this overflow. ## How was this patch tested? New unit test. Author: Andrew Ray <[email protected]> Closes #18800 from aray/SPARK-21330. (cherry picked from commit 25826c7) Signed-off-by: Sean Owen <[email protected]>
|
Merged to master/2.2/2.1 |
…le with extreme values on the partition column ## What changes were proposed in this pull request? An overflow of the difference of bounds on the partitioning column leads to no data being read. This patch checks for this overflow. ## How was this patch tested? New unit test. Author: Andrew Ray <[email protected]> Closes apache#18800 from aray/SPARK-21330. (cherry picked from commit 25826c7) Signed-off-by: Sean Owen <[email protected]>
…le with extreme values on the partition column An overflow of the difference of bounds on the partitioning column leads to no data being read. This patch checks for this overflow. New unit test. Author: Andrew Ray <[email protected]> Closes apache#18800 from aray/SPARK-21330. (cherry picked from commit 25826c7) Signed-off-by: Sean Owen <[email protected]>
What changes were proposed in this pull request?
An overflow of the difference of bounds on the partitioning column leads to no data being read. This
patch checks for this overflow.
How was this patch tested?
New unit test.