-
Notifications
You must be signed in to change notification settings - Fork 247
fix: Mark SortOrder with floating-point as incompatible #2650
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
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2650 +/- ##
============================================
+ Coverage 56.12% 59.20% +3.08%
- Complexity 976 1449 +473
============================================
Files 119 147 +28
Lines 11743 13755 +2012
Branches 2251 2365 +114
============================================
+ Hits 6591 8144 +1553
- Misses 4012 4387 +375
- Partials 1140 1224 +84 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| withSQLConf(CometConf.getExprAllowIncompatConfigKey("SortOrder") -> "false") { | ||
| checkSparkAnswerAndFallbackReason( | ||
| "select * from tbl order by 1, 2", | ||
| "unsupported range partitioning sort order") |
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.
I filed a follow-up issue for improving the fallback reason to show the root cause
|
|
||
| override def getSupportLevel(expr: SortOrder): SupportLevel = { | ||
|
|
||
| def containsFloatingPoint(dt: DataType): Boolean = { |
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.
| def containsFloatingPoint(dt: DataType): Boolean = { | |
| def dataTypeContainsFloatingPoint(dt: DataType): Boolean = { |
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.
The method takes a DataType parameter, so it seems redundant to include that in the method name as well?
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.
Thanks @andygrove it is lgtm, just a small suggestion on naming
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.
I'll probably continue to grumble about what "incompatible" means but this LGTM. Thanks @andygrove!
Which issue does this PR close?
Closes #2626
Rationale for this change
Fall back to Spark by default when sorting on floating-point values. Users can opt in if they don't care about the different handling of +0.0 vs -0.0.
What changes are included in this PR?
SortOrderHow are these changes tested?