Skip to content
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

[SPARK-21603][SQL][FOLLOW-UP] Use -1 to disable maxLinesPerFunction #19031

Closed
wants to merge 2 commits into from

Conversation

maropu
Copy link
Member

@maropu maropu commented Aug 24, 2017

What changes were proposed in this pull request?

This pr used -1 to disable maxLinesPerFunction added in #18810 because -1 seems to be more natural to disable this too-long-function optimization (e.g. we couldn't use Int.MaxValue in spark-default.conf).

How was this patch tested?

Modified the existing WholeStageCodegenSuite

@SparkQA
Copy link

SparkQA commented Aug 24, 2017

Test build #81055 has finished for PR 19031 at commit 60dc64e.

  • This patch fails Spark unit tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@viirya
Copy link
Member

viirya commented Aug 24, 2017

I'd prefer using -1 to disable maxLinesPerFunction check like this.

.intConf
.checkValue(maxLines => maxLines >= -1, "The maximum must not be a negative integer, -1 to " +
"always activate whole-stage codegen.")
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The maximum must not be a negative integer, except for -1 using to always activate whole-stage codegen.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@@ -577,9 +577,11 @@ object SQLConf {
.doc("The maximum lines of a single Java function generated by whole-stage codegen. " +
"When the generated function exceeds this threshold, " +
"the whole-stage codegen is deactivated for this subtree of the current query plan. " +
"The default value 4000 is the max length of byte code JIT supported " +
"for a single function(8000) divided by 2.")
"The default value 2667 is the max length of byte code JIT supported " +
Copy link
Member

@viirya viirya Aug 24, 2017

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2667? I don't see you change the default value below.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

missed...

@viirya
Copy link
Member

viirya commented Aug 24, 2017

LGTM

@SparkQA
Copy link

SparkQA commented Aug 24, 2017

Test build #81062 has finished for PR 19031 at commit 9438655.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@SparkQA
Copy link

SparkQA commented Aug 24, 2017

Test build #81065 has finished for PR 19031 at commit a0854ad.

  • This patch passes all tests.
  • This patch merges cleanly.
  • This patch adds no public classes.

@maropu
Copy link
Member Author

maropu commented Aug 24, 2017

ping @gatorsmile

@maropu
Copy link
Member Author

maropu commented Aug 25, 2017

ping

@gatorsmile
Copy link
Member

This is an internal conf. For the advanced users, we do not encourage them to disable it. If they want to disable it, they can simply set it to a number above 8000. Thus, setting maxLinesPerFunction to -1 is not needed, IMO.

@maropu
Copy link
Member Author

maropu commented Aug 28, 2017

ok, I'll close for now. Thanks!

@maropu maropu closed this Aug 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants