You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2021/09/24 10:22:31 UTC

[GitHub] [spark] AngersZhuuuu opened a new pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

AngersZhuuuu opened a new pull request #34097:
URL: https://github.com/apache/spark/pull/34097


   ### What changes were proposed in this pull request?
   Refactor generated code of InSet
   
   ### Why are the changes needed?
   Make generated code more simple
   
   
   ### Does this PR introduce _any_ user-facing change?
   No
   
   
   ### How was this patch tested?
   Existed UT
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AngersZhuuuu commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927225409


   > @AngersZhuuuu,
   > 
   > > Make generated code more simple
   > 
   > can you elabourate it more in the PR description?
   
   DOne


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927265705


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48147/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] cloud-fan commented on pull request #34097: [SPARK-36838][SQL] Improve InSet generated code performance

Posted by GitBox <gi...@apache.org>.
cloud-fan commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927499873


   late LGTM


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] viirya commented on a change in pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #34097:
URL: https://github.com/apache/spark/pull/34097#discussion_r716157390



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
##########
@@ -612,26 +612,27 @@ case class InSet(child: Expression, hset: Set[Any]) extends UnaryExpression with
         ""
       }
 
-      val ret = child.dataType match {
+      val isNaNCode = child.dataType match {
         case DoubleType => Some((v: Any) => s"java.lang.Double.isNaN($v)")
         case FloatType => Some((v: Any) => s"java.lang.Float.isNaN($v)")
         case _ => None
       }
 
-      ret.map { isNaN =>
+      if (hasNaN && isNaNCode.isDefined) {
         s"""
-          |if ($setTerm.contains($c)) {
-          |  ${ev.value} = true;
-          |} else if (${isNaN(c)}) {
-          |  ${ev.value} =  $hasNaN;
-          |}
-          |$setIsNull
-          |""".stripMargin
-      }.getOrElse(
+           |if (${isNaNCode.get(c)}) {

Review comment:
       NaN seems rarer? Can we keep original order? I.e., check `$setTerm.contains($c)` first.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926822151


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48118/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927133614


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48135/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927134632


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48135/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926573208


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48113/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927259624


   **[Test build #143630 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143630/testReport)** for PR 34097 at commit [`85297cf`](https://github.com/apache/spark/commit/85297cf9017a5a58c5cee2e9140197ccd607b188).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927237205


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48142/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927237197


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48142/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927297066


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143635/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926521162


   **[Test build #143601 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143601/testReport)** for PR 34097 at commit [`6f13869`](https://github.com/apache/spark/commit/6f1386933d9678c1ca4976c518cd44fec73f8a06).
    * This patch **fails to build**.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926573208


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48113/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926518050


   **[Test build #143601 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143601/testReport)** for PR 34097 at commit [`6f13869`](https://github.com/apache/spark/commit/6f1386933d9678c1ca4976c518cd44fec73f8a06).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AngersZhuuuu commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927215585


   ping @cloud-fan 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927401256


   @AngersZhuuuu mind updating PR title too since this is not just a refactoring?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927121841


   **[Test build #143623 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143623/testReport)** for PR 34097 at commit [`d406a3a`](https://github.com/apache/spark/commit/d406a3ad4a581ac714e660acfce2375cd6d5e8ad).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #34097: [SPARK-36838][SQL] Improve InSet generated code performance

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927492316


   Merged to master. (since this is improvement)


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926825493


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48118/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927163496


   **[Test build #143623 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143623/testReport)** for PR 34097 at commit [`d406a3a`](https://github.com/apache/spark/commit/d406a3ad4a581ac714e660acfce2375cd6d5e8ad).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926521208


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143601/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926518050


   **[Test build #143601 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143601/testReport)** for PR 34097 at commit [`6f13869`](https://github.com/apache/spark/commit/6f1386933d9678c1ca4976c518cd44fec73f8a06).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AngersZhuuuu commented on a change in pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on a change in pull request #34097:
URL: https://github.com/apache/spark/pull/34097#discussion_r716158611



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
##########
@@ -612,26 +612,27 @@ case class InSet(child: Expression, hset: Set[Any]) extends UnaryExpression with
         ""
       }
 
-      val ret = child.dataType match {
+      val isNaNCode = child.dataType match {
         case DoubleType => Some((v: Any) => s"java.lang.Double.isNaN($v)")
         case FloatType => Some((v: Any) => s"java.lang.Float.isNaN($v)")
         case _ => None
       }
 
-      ret.map { isNaN =>
+      if (hasNaN && isNaNCode.isDefined) {
         s"""
-          |if ($setTerm.contains($c)) {
-          |  ${ev.value} = true;
-          |} else if (${isNaN(c)}) {
-          |  ${ev.value} =  $hasNaN;
-          |}
-          |$setIsNull
-          |""".stripMargin
-      }.getOrElse(
+           |if (${isNaNCode.get(c)}) {

Review comment:
       > NaN seems rarer? Can we keep original order? I.e., check `$setTerm.contains($c)` first.
   
   Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon closed pull request #34097: [SPARK-36838][SQL] Improve InSet generated code performance

Posted by GitBox <gi...@apache.org>.
HyukjinKwon closed pull request #34097:
URL: https://github.com/apache/spark/pull/34097


   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927127962


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48135/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926920195


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143606/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927223930


   @AngersZhuuuu,
   
   > Make generated code more simple
   
   can you elabourate it more in the PR description?


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927228025


   **[Test build #143630 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143630/testReport)** for PR 34097 at commit [`85297cf`](https://github.com/apache/spark/commit/85297cf9017a5a58c5cee2e9140197ccd607b188).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926759993


   **[Test build #143606 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143606/testReport)** for PR 34097 at commit [`6f13869`](https://github.com/apache/spark/commit/6f1386933d9678c1ca4976c518cd44fec73f8a06).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926759993


   **[Test build #143606 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143606/testReport)** for PR 34097 at commit [`6f13869`](https://github.com/apache/spark/commit/6f1386933d9678c1ca4976c518cd44fec73f8a06).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926521208


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143601/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926785523


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48118/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927264782


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48147/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927259947


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143630/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927296801


   **[Test build #143635 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143635/testReport)** for PR 34097 at commit [`84cd398`](https://github.com/apache/spark/commit/84cd398af67355473c638a45600a5d0f1d7ac2a7).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] HyukjinKwon commented on a change in pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
HyukjinKwon commented on a change in pull request #34097:
URL: https://github.com/apache/spark/pull/34097#discussion_r716133921



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
##########
@@ -612,26 +612,28 @@ case class InSet(child: Expression, hset: Set[Any]) extends UnaryExpression with
         ""
       }
 
-      val ret = child.dataType match {
+      val isNaNCode = child.dataType match {
         case DoubleType => Some((v: Any) => s"java.lang.Double.isNaN($v)")
         case FloatType => Some((v: Any) => s"java.lang.Float.isNaN($v)")
         case _ => None
       }
 
-      ret.map { isNaN =>
-        s"""
-          |if ($setTerm.contains($c)) {
-          |  ${ev.value} = true;
-          |} else if (${isNaN(c)}) {
-          |  ${ev.value} =  $hasNaN;
-          |}
-          |$setIsNull
-          |""".stripMargin
-      }.getOrElse(
-        s"""
-           |${ev.value} = $setTerm.contains($c);
-           |$setIsNull
-         """.stripMargin)
+      hasNaN match {

Review comment:
       Can we just use if-else here? Also, let's file a separate JIRA. This is technically a performance improvement to avoid dispatching on nan per the values at in-set.
   




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927228025


   **[Test build #143630 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143630/testReport)** for PR 34097 at commit [`85297cf`](https://github.com/apache/spark/commit/85297cf9017a5a58c5cee2e9140197ccd607b188).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AngersZhuuuu commented on a change in pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on a change in pull request #34097:
URL: https://github.com/apache/spark/pull/34097#discussion_r716135156



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
##########
@@ -612,26 +612,28 @@ case class InSet(child: Expression, hset: Set[Any]) extends UnaryExpression with
         ""
       }
 
-      val ret = child.dataType match {
+      val isNaNCode = child.dataType match {
         case DoubleType => Some((v: Any) => s"java.lang.Double.isNaN($v)")
         case FloatType => Some((v: Any) => s"java.lang.Float.isNaN($v)")
         case _ => None
       }
 
-      ret.map { isNaN =>
-        s"""
-          |if ($setTerm.contains($c)) {
-          |  ${ev.value} = true;
-          |} else if (${isNaN(c)}) {
-          |  ${ev.value} =  $hasNaN;
-          |}
-          |$setIsNull
-          |""".stripMargin
-      }.getOrElse(
-        s"""
-           |${ev.value} = $setTerm.contains($c);
-           |$setIsNull
-         """.stripMargin)
+      hasNaN match {

Review comment:
       > Can we just use if-else here? Also, let's file a separate JIRA. This is technically a performance improvement to avoid dispatching on nan per the values at in-set.
   
   Done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927237205


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48142/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AngersZhuuuu commented on pull request #34097: [SPARK-36838][SQL] Improve InSet generated code performance

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927456539


   > @AngersZhuuuu mind updating PR title too since this is not just a refactoring?
   
   updated
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AngersZhuuuu commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926756935


   retest this please


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927297066


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143635/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927121841


   **[Test build #143623 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143623/testReport)** for PR 34097 at commit [`d406a3a`](https://github.com/apache/spark/commit/d406a3ad4a581ac714e660acfce2375cd6d5e8ad).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AngersZhuuuu commented on a change in pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on a change in pull request #34097:
URL: https://github.com/apache/spark/pull/34097#discussion_r716158582



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
##########
@@ -612,26 +612,27 @@ case class InSet(child: Expression, hset: Set[Any]) extends UnaryExpression with
         ""
       }
 
-      val ret = child.dataType match {
+      val isNaNCode = child.dataType match {
         case DoubleType => Some((v: Any) => s"java.lang.Double.isNaN($v)")
         case FloatType => Some((v: Any) => s"java.lang.Float.isNaN($v)")
         case _ => None
       }
 
-      ret.map { isNaN =>
+      if (hasNaN && isNaNCode.isDefined) {
         s"""
-          |if ($setTerm.contains($c)) {
-          |  ${ev.value} = true;
-          |} else if (${isNaN(c)}) {
-          |  ${ev.value} =  $hasNaN;
-          |}
-          |$setIsNull
-          |""".stripMargin
-      }.getOrElse(
+           |if (${isNaNCode.get(c)}) {
+           |  ${ev.value} =  true;

Review comment:
       done




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AngersZhuuuu commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AngersZhuuuu commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927319840


   ping @cloud-fan 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] viirya commented on a change in pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
viirya commented on a change in pull request #34097:
URL: https://github.com/apache/spark/pull/34097#discussion_r716157178



##########
File path: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/predicates.scala
##########
@@ -612,26 +612,27 @@ case class InSet(child: Expression, hset: Set[Any]) extends UnaryExpression with
         ""
       }
 
-      val ret = child.dataType match {
+      val isNaNCode = child.dataType match {
         case DoubleType => Some((v: Any) => s"java.lang.Double.isNaN($v)")
         case FloatType => Some((v: Any) => s"java.lang.Float.isNaN($v)")
         case _ => None
       }
 
-      ret.map { isNaN =>
+      if (hasNaN && isNaNCode.isDefined) {
         s"""
-          |if ($setTerm.contains($c)) {
-          |  ${ev.value} = true;
-          |} else if (${isNaN(c)}) {
-          |  ${ev.value} =  $hasNaN;
-          |}
-          |$setIsNull
-          |""".stripMargin
-      }.getOrElse(
+           |if (${isNaNCode.get(c)}) {
+           |  ${ev.value} =  true;

Review comment:
       nit: remove extra space after `=`.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927232018


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48142/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA removed a comment on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927251264


   **[Test build #143635 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143635/testReport)** for PR 34097 at commit [`84cd398`](https://github.com/apache/spark/commit/84cd398af67355473c638a45600a5d0f1d7ac2a7).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926545916


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48113/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927251264


   **[Test build #143635 has started](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143635/testReport)** for PR 34097 at commit [`84cd398`](https://github.com/apache/spark/commit/84cd398af67355473c638a45600a5d0f1d7ac2a7).


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927134632


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48135/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926920195


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143606/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927163776


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143623/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927163776


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143623/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926825493


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48118/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927265705


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder-K8s/48147/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927258069


   Kubernetes integration test starting
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48147/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] AmplabJenkins removed a comment on pull request #34097: [SPARK-36838][SQL] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
AmplabJenkins removed a comment on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-927259947


   
   Refer to this link for build results (access rights to CI server needed): 
   https://amplab.cs.berkeley.edu/jenkins//job/SparkPullRequestBuilder/143630/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926918859


   **[Test build #143606 has finished](https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder/143606/testReport)** for PR 34097 at commit [`6f13869`](https://github.com/apache/spark/commit/6f1386933d9678c1ca4976c518cd44fec73f8a06).
    * This patch passes all tests.
    * This patch merges cleanly.
    * This patch adds no public classes.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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


[GitHub] [spark] SparkQA commented on pull request #34097: [SPARK-36792][SQL][FOLLOWUP] Refactor InSet generated code

Posted by GitBox <gi...@apache.org>.
SparkQA commented on pull request #34097:
URL: https://github.com/apache/spark/pull/34097#issuecomment-926569108


   Kubernetes integration test status failure
   URL: https://amplab.cs.berkeley.edu/jenkins/job/SparkPullRequestBuilder-K8s/48113/
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



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