-
Notifications
You must be signed in to change notification settings - Fork 28.9k
[SPARK-29165][SQL][TEST] Set log level of log generated code as ERROR in case of compile error on generated code in UT #25835
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
…nerated code in UT
|
plz file a jira for better traceability? |
|
OK I'll file one. Thanks for the guide. |
|
Thanks! |
| private def logGeneratedCode(code: CodeAndComment): Unit = { | ||
| val maxLines = SQLConf.get.loggingMaxLinesForCodegen | ||
| if (Utils.isTesting) { | ||
| // log as ERROR so that it can be always logged in UT |
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.
Since its clear what the code is, I personally think we don't need this comment.
|
cc: @cloud-fan @viirya |
|
@dongjoon-hyun do you know how to re-trigger the github checks? One of them fails and it seems flaky. |
|
Test build #110940 has finished for PR 25835 at commit
|
|
Test build #110953 has finished for PR 25835 at commit
|
|
@cloud-fan . Yes. I knew it and retriggered before in another PRs, but the current UI seems to have a bug. In general, click the |
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.
+1, LGTM. This is very useful. Merged to master/2.4.
Thank you, @HeartSaVioR , @maropu , @cloud-fan , @viirya .
… in case of compile error on generated code in UT ### What changes were proposed in this pull request? This patch proposes to change the log level of logging generated code in case of compile error being occurred in UT. This would help to investigate compilation issue of generated code easier, as currently we got exception message of line number but there's no generated code being logged actually (as in most cases of UT the threshold of log level is at least WARN). ### Why are the changes needed? This would help investigating issue on compilation error for generated code in UT. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? N/A Closes #25835 from HeartSaVioR/MINOR-always-log-generated-code-on-fail-to-compile-in-unit-testing. Authored-by: Jungtaek Lim (HeartSaVioR) <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit eee2e02) Signed-off-by: Dongjoon Hyun <[email protected]>
|
Although this is a kind of improvement, this will reduce our maintenance cost (especially on LTS branch). So, I backported to |
|
Thanks all for reviewing and merging! |
… in case of compile error on generated code in UT ### What changes were proposed in this pull request? This patch proposes to change the log level of logging generated code in case of compile error being occurred in UT. This would help to investigate compilation issue of generated code easier, as currently we got exception message of line number but there's no generated code being logged actually (as in most cases of UT the threshold of log level is at least WARN). ### Why are the changes needed? This would help investigating issue on compilation error for generated code in UT. ### Does this PR introduce any user-facing change? No. ### How was this patch tested? N/A Closes apache#25835 from HeartSaVioR/MINOR-always-log-generated-code-on-fail-to-compile-in-unit-testing. Authored-by: Jungtaek Lim (HeartSaVioR) <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]> (cherry picked from commit eee2e02) Signed-off-by: Dongjoon Hyun <[email protected]>
What changes were proposed in this pull request?
This patch proposes to change the log level of logging generated code in case of compile error being occurred in UT. This would help to investigate compilation issue of generated code easier, as currently we got exception message of line number but there's no generated code being logged actually (as in most cases of UT the threshold of log level is at least WARN).
Why are the changes needed?
This would help investigating issue on compilation error for generated code in UT.
Does this PR introduce any user-facing change?
No.
How was this patch tested?
N/A