[GitHub] spark pull request #14144: [SPARK-16488] Fix codegen variable namespace coll...

2016-07-11 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/spark/pull/14144


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #14144: [SPARK-16488] Fix codegen variable namespace coll...

2016-07-11 Thread rxin
Github user rxin commented on a diff in the pull request:

https://github.com/apache/spark/pull/14144#discussion_r70364188
  
--- Diff: 
sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
 ---
@@ -449,6 +449,20 @@ class DataFrameReaderWriterSuite extends QueryTest 
with SharedSQLContext with Be
 }
   }
 
+  test("pmod with partitionBy") {
--- End diff --

you can remove this once https://github.com/apache/spark/pull/14146 makes 
it in.



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #14144: [SPARK-16488] Fix codegen variable namespace coll...

2016-07-11 Thread rxin
Github user rxin commented on a diff in the pull request:

https://github.com/apache/spark/pull/14144#discussion_r70363441
  
--- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/arithmetic.scala
 ---
@@ -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")
--- End diff --

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



---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org



[GitHub] spark pull request #14144: [SPARK-16488] Fix codegen variable namespace coll...

2016-07-11 Thread sameeragarwal
GitHub user sameeragarwal opened a pull request:

https://github.com/apache/spark/pull/14144

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

## 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.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/sameeragarwal/spark codegen-bug

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/spark/pull/14144.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

This closes #14144


commit 8e7b05f0f59d58bf6482e069b31c102eff5a1b83
Author: Sameer Agarwal 
Date:   2016-07-12T00:45:32Z

Fix codegen variable namespace collision for pmod




---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

-
To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org
For additional commands, e-mail: reviews-h...@spark.apache.org