-
Notifications
You must be signed in to change notification settings - Fork 29k
[SPARK-16845][SQL] GeneratedClass$SpecificOrdering grows beyond 64 KB
#15480
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
Closed
Closed
Changes from 5 commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
ecc6720
[SPARK-16845][SQL] `GeneratedClass$SpecificOrdering` grows beyond 64 KB
lw-lin 1ae9935
Address comments
lw-lin 33b5fd8
Address more comments
lw-lin 0aedc47
Refactor `ctx.splitExpressions()`.
ueshin 3d31cb3
Add a comment for `splitExpressions`.
ueshin 4aef473
@cloud-fan's comments
lw-lin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -127,4 +127,17 @@ class OrderingSuite extends SparkFunSuite with ExpressionEvalHelper { | |
| } | ||
| } | ||
| } | ||
|
|
||
| test("SPARK-16845: GeneratedClass$SpecificOrdering grows beyond 64 KB") { | ||
| val sortOrder = Literal("abc").asc | ||
|
|
||
| // this is passing prior to SPARK-16845, and it should also be passing after SPARK-16845 | ||
| GenerateOrdering.generate(Array.fill(40)(sortOrder)) | ||
|
|
||
| // this is FAILING prior to SPARK-16845, but it should be passing after SPARK-16845 | ||
| GenerateOrdering.generate(Array.fill(450)(sortOrder)) | ||
|
||
|
|
||
| // verify that we can support up to 5000 ordering comparisons, which should be sufficient | ||
| GenerateOrdering.generate(Array.fill(5000)(sortOrder)) | ||
| } | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
nit:
ctx.freshNamealready adds postfix to the name, you don't need to add_$iagain.Uh oh!
There was an error while loading. Please reload this page.
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.
It's
comp_0,comp_1in the following:so maybe let's keep this
_$i?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.
can you double check? the implementation of
freshNameisit already adds an id postfix.
Uh oh!
There was an error while loading. Please reload this page.
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.
Ah I mis-understood it. You meant moving
ctx.freshName("comp")into thefunCalls.zipWithIndex.map {...}, right? like the following: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 mean
just remove all the
_$ihereUh oh!
There was an error while loading. Please reload this page.
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 for clarifying on this. but we'll get something like (suppose we got a fresh name
comp_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.
oh sorry, we should put the
freshNamein the map functionThere 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.
Ah i see - let me update this :-)