uros-b commented on code in PR #57629:
URL: https://github.com/apache/spark/pull/57629#discussion_r3689571771


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -3000,6 +3000,17 @@ object SQLConf {
     .booleanConf
     .createWithDefault(true)
 
+  val INSERT_MAP_SORT_IN_DISTINCT_AGGREGATES_ENABLED =
+    buildConf("spark.sql.optimizer.insertMapSortInDistinctAggregates.enabled")
+      .internal()
+      .doc("When true, map-typed arguments of distinct aggregates are 
normalized with MapSort. " +
+        "When false, MapSort is not added specifically for distinct aggregate 
arguments; " +
+        "grouping expression normalization is unchanged.")
+      .version("4.3.0")
+      .withBindingPolicy(ConfigBindingPolicy.SESSION)

Review Comment:
   Should this be ConfigBindingPolicy.NOT_APPLICABLE instead?
   
   The decision procedure in ConfigBindingPolicy's scaladoc keys on whether the 
config can change how a view/UDF/procedure body resolves; this is an 
optimizer-only killswitch, so it can't affect the analyzed plan, which puts it 
in the NOT_APPLICABLE bucket ("this covers most configs"). SESSION is for 
configs that do change resolution and should follow the caller's session.



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

Reply via email to