jchen5 commented on code in PR #43111:
URL: https://github.com/apache/spark/pull/43111#discussion_r1342986860
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -3416,6 +3416,14 @@ object SQLConf {
.booleanConf
.createWithDefault(true)
+ val DECORRELATE_EXISTS_AND_IN_SUBQUERIES =
+ buildConf("spark.sql.optimizer.decorrelateExistsIn.enabled")
+ .internal()
+ .doc("Decorrelate EXISTS and IN subqueries.")
+ .version("4.0.0")
+ .booleanConf
+ .createWithDefault(true)
Review Comment:
I think there might be some correctness fixes here for COUNT bug in
IN/EXISTS too, enabled by moving those to DecorrelateInnerQuery, right? I know
not every query is fixed but there are some that are fixed, such as the example
query you have added to one of your tests `select * from t1 where exists
(select count(*) from t2 where t2.c1 = t1.c1);`
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala:
##########
@@ -3416,6 +3416,14 @@ object SQLConf {
.booleanConf
.createWithDefault(true)
+ val DECORRELATE_EXISTS_AND_IN_SUBQUERIES =
+ buildConf("spark.sql.optimizer.decorrelateExistsIn.enabled")
+ .internal()
+ .doc("Decorrelate EXISTS and IN subqueries.")
+ .version("4.0.0")
+ .booleanConf
+ .createWithDefault(true)
Review Comment:
I think there are some correctness fixes here for COUNT bug in IN/EXISTS
too, enabled by moving those to DecorrelateInnerQuery. I know not every query
is fixed but there are some that are fixed, such as the example query you have
added to one of your tests `select * from t1 where exists (select count(*) from
t2 where t2.c1 = t1.c1);`
--
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]