-
Notifications
You must be signed in to change notification settings - Fork 28.7k
[SPARK-35398][SQL] Simplify the way to get classes from ClassBodyEvaluator in CodeGenerator.updateAndGetCompilationStats
method
#32536
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 all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d72c9d0
Simplify the way to get classes from ClassBodyEvaluator
LuciferYang 738bdc6
remove unused imports
LuciferYang bea13d5
Merge branch 'upmaster' into SPARK-35253-FOLLOWUP
LuciferYang 5ddb354
add a new test
LuciferYang c1deabe
fix test
LuciferYang 527e102
revert test case
LuciferYang 8db3551
Merge branch 'upmaster' into SPARK-35253-FOLLOWUP
LuciferYang 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
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.
It seems fine, but have you checked if this stat value does not change before/after this PR?
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.
Yes, I did some manual tests to check this.
For example, add a
afterEach()
method toCodeGenerationSuite
to record theCodegenMetrics.METRIC_GENERATED_CLASS_BYTECODE_SIZE.getSnapshot.getValues
after each case and the stat value not change before/after this PR.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.
In the same way, the stat values of
CodegenMetrics.METRIC_GENERATED_METHOD_BYTECODE_SIZE
has not changed before/after this PR.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.
@maropu If we want to do some code checking, maybe we can enhanced the case
metrics are recorded on compile
inCodeGenerationSuite
as follows:The new assertion can be passed before and after this pr, however, if we update the version of janino or change the codegen of
Add
, we may need to update the content of the assertion because the size of the generated code may change.For example
CodegenMetrics.METRIC_GENERATED_CLASS_BYTECODE_SIZE
with janino 3.1.4 areArray(740, 1293)
, but with janino 3.0.16 areArray(687, 1036)
, so I'm not sure if we need to add these assertions in this pr.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 see. Thank for the explanation, @LuciferYang. Could you add a new test unit for the assert with the prefix
SPARK-35398:
?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.
ok