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-22569] [SQL] Clean usage of addMutableState and splitExpressions #19790

Closed
wants to merge 1 commit into from

Conversation

gatorsmile
Copy link
Member

@gatorsmile gatorsmile commented Nov 21, 2017

What changes were proposed in this pull request?

This PR is to clean the usage of addMutableState and splitExpressions

  1. replace hardcoded type string to ctx.JAVA_BOOLEAN etc.
  2. create a default value of the initCode for ctx.addMutableStats
  3. Use named arguments when calling splitExpressions

How was this patch tested?

The existing test cases

@gatorsmile
Copy link
Member Author

cc @cloud-fan @kiszk

@SparkQA
Copy link

SparkQA commented Nov 21, 2017

Test build #84045 has finished for PR 19790 at commit a0272d9.

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

arguments =
("InternalRow", ctx.INPUT_ROW) :: ("UTF8String []", array) :: ("int", idxInVararg) :: Nil,
returnType = "int",
makeSplitFunction = { body =>
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: is it possible to eliminate the { }?

Copy link
Member Author

Choose a reason for hiding this comment

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

done.

@cloud-fan
Copy link
Contributor

LGTM, can you improve the PR description to describe the major change? e.g.

1. replace hardcoded type string to ctx.JAVA_BOOLEAN etc.
2. create a default value of the initCode for ctx.addMutableStats

@SparkQA
Copy link

SparkQA commented Nov 21, 2017

Test build #84057 has finished for PR 19790 at commit a5ee80b.

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

@cloud-fan
Copy link
Contributor

thanks, merging to master!

@asfgit asfgit closed this in 96e947e Nov 21, 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
Development

Successfully merging this pull request may close these issues.

3 participants