maropu commented on a change in pull request #23635: [SPARK-26709][SQL]
OptimizeMetadataOnlyQuery does not handle empty records correctly
URL: https://github.com/apache/spark/pull/23635#discussion_r250566874
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
##########
@@ -585,9 +585,10 @@ object SQLConf {
.doc("When true, enable the metadata-only query optimization that use the
table's metadata " +
"to produce the partition columns instead of table scans. It applies
when all the columns " +
"scanned are partition columns and the query has an aggregate operator
that satisfies " +
- "distinct semantics.")
+ "distinct semantics. By default the optimization is disabled, since it
may return " +
+ "incorrect results with empty tables.")
.booleanConf
- .createWithDefault(true)
+ .createWithDefault(false)
Review comment:
How about making this conf. internal and always printing a warning message
when this flag enabled and the rule applied?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]