-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-25307][SQL] ArraySort function may return an error in the code generation phase #22314
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
|
Good catch, LGTM |
|
Test build #95585 has finished for PR 22314 at commit
|
|
retest this please |
|
LGTM. |
|
Test build #95588 has finished for PR 22314 at commit
|
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.
nonNullPrimitiveNumericAscendingSort or fastSortCode preferred?
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.
@maropu Lets keep the variable name the same. I personally find the name more descriptive. Lets add a private def like you suggest in the following 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.
How about making this condition a separate private method like isFastSortSupported?
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.
will make a change
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.
sorry, but not method but variable is ok (I said method in the previous comment though...), e.g.,
val canPerformFastSort = {
CodeGenerator.isPrimitiveType(elementType) && elementType != BooleanType && !containsNull
}
|
Test build #95603 has finished for PR 22314 at commit
|
|
Test build #95601 has finished for PR 22314 at commit
|
|
retest this please |
|
Test build #95604 has finished for PR 22314 at commit
|
2f1b192 to
3645438
Compare
|
Test build #95617 has finished for PR 22314 at commit
|
|
Test build #95635 has finished for PR 22314 at commit
|
|
Thanks! merging to master. |
|
@dilipbiswal Do we need to backport this to 2.3? If so, could you submit a backport pr to branch-2.3 please? Thanks! |
|
@ueshin Sure. |
|
@ueshin We don't have codegen enabled for this function in 2.3. So thankfully we don't have this problem :-) |
|
@dilipbiswal Thanks for confirming! |
What changes were proposed in this pull request?
Sorting array of booleans (not nullable) returns a compilation error in the code generation phase. Below is the compilation error :
How was this patch tested?
Added test in collectionExpressionSuite