Skip to content

[SPARK-16488] Fix codegen variable namespace collision in pmod and partitionBy #14144

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
wants to merge 2 commits into from

Conversation

sameeragarwal
Copy link
Member

What changes were proposed in this pull request?

This patch fixes a variable namespace collision bug in pmod and partitionBy

How was this patch tested?

Regression test for one possible occurrence. A more general fix in ExpressionEvalHelper.checkEvaluation will be in a subsequent PR.

@sameeragarwal
Copy link
Member Author

cc @rxin

@@ -498,34 +498,35 @@ case class Pmod(left: Expression, right: Expression) extends BinaryArithmetic wi

override def doGenCode(ctx: CodegenContext, ev: ExprCode): ExprCode = {
nullSafeCodeGen(ctx, ev, (eval1, eval2) => {
val r = ctx.freshName("r")
Copy link
Contributor

Choose a reason for hiding this comment

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

while you are at this, can you pick a better name? "r" is not very informative.

@rxin
Copy link
Contributor

rxin commented Jul 12, 2016

LGTM pending Jenkins.

@SparkQA
Copy link

SparkQA commented Jul 12, 2016

Test build #62129 has finished for PR 14144 at commit 8e7b05f.

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

@rxin
Copy link
Contributor

rxin commented Jul 12, 2016

Merging in master/2.0.

@asfgit asfgit closed this in 9cc74f9 Jul 12, 2016
asfgit pushed a commit that referenced this pull request Jul 12, 2016
…rtitionBy

This patch fixes a variable namespace collision bug in pmod and partitionBy

Regression test for one possible occurrence. A more general fix in `ExpressionEvalHelper.checkEvaluation` will be in a subsequent PR.

Author: Sameer Agarwal <sameer@databricks.com>

Closes #14144 from sameeragarwal/codegen-bug.

(cherry picked from commit 9cc74f9)
Signed-off-by: Reynold Xin <rxin@databricks.com>
@SparkQA
Copy link

SparkQA commented Jul 12, 2016

Test build #62135 has finished for PR 14144 at commit 8b2639f.

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

asfgit pushed a commit that referenced this pull request Jul 13, 2016
…rtitionBy

This patch fixes a variable namespace collision bug in pmod and partitionBy

Regression test for one possible occurrence. A more general fix in `ExpressionEvalHelper.checkEvaluation` will be in a subsequent PR.

Author: Sameer Agarwal <sameer@databricks.com>

Closes #14144 from sameeragarwal/codegen-bug.

(cherry picked from commit 9cc74f9)
Signed-off-by: Reynold Xin <rxin@databricks.com>
(cherry picked from commit 6892614)
Signed-off-by: Reynold Xin <rxin@databricks.com>
zzcclp pushed a commit to zzcclp/spark that referenced this pull request Jul 13, 2016
…rtitionBy

This patch fixes a variable namespace collision bug in pmod and partitionBy

Regression test for one possible occurrence. A more general fix in `ExpressionEvalHelper.checkEvaluation` will be in a subsequent PR.

Author: Sameer Agarwal <sameer@databricks.com>

Closes apache#14144 from sameeragarwal/codegen-bug.

(cherry picked from commit 9cc74f9)
Signed-off-by: Reynold Xin <rxin@databricks.com>
(cherry picked from commit 6892614)
Signed-off-by: Reynold Xin <rxin@databricks.com>
(cherry picked from commit d1c992f)
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