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

 ##########
 File path: 
sql/catalyst/src/main/scala/org/apache/spark/sql/internal/SQLConf.scala
 ##########
 @@ -582,12 +582,14 @@ object SQLConf {
     .createWithDefault(HiveCaseSensitiveInferenceMode.INFER_AND_SAVE.toString)
 
   val OPTIMIZER_METADATA_ONLY = buildConf("spark.sql.optimizer.metadataOnly")
+    .internal()
     .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.")
 
 Review comment:
   > may return incorrect results when the files are empty. 

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

Reply via email to