aokolnychyi commented on a change in pull request #23171: [SPARK-26205][SQL] 
Optimize InSet Expression for bytes, shorts, ints, dates
URL: https://github.com/apache/spark/pull/23171#discussion_r262151097
 
 

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
 ##########
 @@ -171,6 +171,16 @@ object SQLConf {
       .intConf
       .createWithDefault(10)
 
+  val OPTIMIZER_INSET_SWITCH_THRESHOLD =
+    buildConf("spark.sql.optimizer.inSetSwitchThreshold")
+      .internal()
+      .doc("Configures the max set size in InSet for which Spark will generate 
code with " +
+        "switch statements. This is applicable only to bytes, shorts, ints, 
dates.")
+      .intConf
+      .checkValue(threshold => threshold >= 0 && threshold <= 600, "The max 
set size " +
+        "for using switch statements in InSet must be positive and less than 
or equal to 600")
 
 Review comment:
   Yeah, I've started with `threshold > 0` but then changed it to `threshold >= 
0` and forgot to update the description. I kept 0 as a possible value to ensure 
we can disable this optimization if needed. Do you think it makes sense or 
shall we require `threshold > 0`?

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to