You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "anton5798 (via GitHub)" <gi...@apache.org> on 2024/03/06 21:18:48 UTC

[PR] [SPARK-47070][FOLLOW-UP] Add a flag guarding a subquery in aggregate rewrite [spark]

anton5798 opened a new pull request, #45412:
URL: https://github.com/apache/spark/pull/45412

   ### What changes were proposed in this pull request?
   
   Add a flag that guards a recently introduced new codepath inside optimizer that wraps `exists` variables into an agg function. See [#45133](https://github.com/apache/spark/pull/45133) for details.
   
   ### Tests
   No additional tests.


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


Re: [PR] [SPARK-47070][SQL][FOLLOW-UP] Add a flag guarding a subquery in aggregate rewrite [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #45412:
URL: https://github.com/apache/spark/pull/45412#issuecomment-1982062236

   cc @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


Re: [PR] [SPARK-47070][SQL][FOLLOW-UP] Add a flag guarding a subquery in aggregate rewrite [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #45412:
URL: https://github.com/apache/spark/pull/45412#issuecomment-1982034513

   @anton5798 mind keeping the PR description template? https://github.com/apache/spark/blob/master/.github/PULL_REQUEST_TEMPLATE


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


Re: [PR] [SPARK-47070][SQL][FOLLOW-UP] Add a flag guarding a subquery in aggregate rewrite [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on code in PR #45412:
URL: https://github.com/apache/spark/pull/45412#discussion_r1515374917


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -3509,6 +3509,17 @@ object SQLConf {
       .booleanConf
       .createWithDefault(true)
 
+  val WRAP_EXISTS_IN_AGGREGATE_FUNCTION =
+    buildConf("spark.sql.optimizer.wrapExistsInAggregateFunction")
+      .internal()
+      .doc("When true, the optimizer will wrap newly introduced `exists` attributes in an" +
+      "aggregate function to ensure that Aggregate nodes preserve semantic invariant that each" +
+      "variable among agg expressions appears either in grouping expressions or belongs to" +

Review Comment:
   nit, missing spaces
   
   ```suggestion
         .doc("When true, the optimizer will wrap newly introduced `exists` attributes in an " +
         "aggregate function to ensure that Aggregate nodes preserve semantic invariant that each " +
         "variable among agg expressions appears either in grouping expressions or belongs to " +
   ```



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


Re: [PR] [SPARK-47070][SQL][FOLLOW-UP] Add a flag guarding a subquery in aggregate rewrite [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon closed pull request #45412: [SPARK-47070][SQL][FOLLOW-UP] Add a flag guarding a subquery in aggregate rewrite
URL: https://github.com/apache/spark/pull/45412


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


Re: [PR] [SPARK-47070][SQL][FOLLOW-UP] Add a flag guarding a subquery in aggregate rewrite [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on PR #45412:
URL: https://github.com/apache/spark/pull/45412#issuecomment-1982197769

   Merged to master.


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


Re: [PR] [SPARK-47070][FOLLOW-UP] Add a flag guarding a subquery in aggregate rewrite [spark]

Posted by "HyukjinKwon (via GitHub)" <gi...@apache.org>.
HyukjinKwon commented on code in PR #45412:
URL: https://github.com/apache/spark/pull/45412#discussion_r1515285320


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -3509,6 +3509,17 @@ object SQLConf {
       .booleanConf
       .createWithDefault(true)
 
+  val WRAP_EXISTS_IN_AGGREGATE_FUNCTION =
+    buildConf("spark.sql.optimizer.wrapExistsInAggregateFunction")
+      .internal()
+      .doc("When true, the optimizer will wrap newly introduced `exists` attributes in an" +
+      "aggregate function to ensure that Aggregate nodes preserve semantic invariant that each" +
+      "variable among agg expressions appears either in grouping expressions or belongs to" +
+      "and aggregate function.")
+      .version("3.5.0")

Review Comment:
   3.5.2 or 4.0.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.

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


Re: [PR] [SPARK-47070][SQL][FOLLOW-UP] Add a flag guarding a subquery in aggregate rewrite [spark]

Posted by "zhengruifeng (via GitHub)" <gi...@apache.org>.
zhengruifeng commented on code in PR #45412:
URL: https://github.com/apache/spark/pull/45412#discussion_r1515374917


##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -3509,6 +3509,17 @@ object SQLConf {
       .booleanConf
       .createWithDefault(true)
 
+  val WRAP_EXISTS_IN_AGGREGATE_FUNCTION =
+    buildConf("spark.sql.optimizer.wrapExistsInAggregateFunction")
+      .internal()
+      .doc("When true, the optimizer will wrap newly introduced `exists` attributes in an" +
+      "aggregate function to ensure that Aggregate nodes preserve semantic invariant that each" +
+      "variable among agg expressions appears either in grouping expressions or belongs to" +

Review Comment:
   nit, missing spaces
   
   ```suggestion
         .doc("When true, the optimizer will wrap newly introduced `exists` attributes in an " +
         "aggregate function to ensure that Aggregate nodes preserve semantic invariant that each " +
         "variable among agg expressions appears either in grouping expressions or belongs to " +
   ```



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