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_r250787811
 
 

 ##########
 File path: 
sql/core/src/main/scala/org/apache/spark/sql/execution/OptimizeMetadataOnlyQuery.scala
 ##########
 @@ -72,6 +72,10 @@ case class OptimizeMetadataOnlyQuery(catalog: 
SessionCatalog) extends Rule[Logic
             })
           }
           if (isAllDistinctAgg) {
+            logWarning("Since configuration `spark.sql.optimizer.metadataOnly` 
is enabled, " +
+              "Spark will scan partition-level metadata without scanning data 
files. " +
+              "This could result in wrong results when with empty partition 
data."
 
 Review comment:
   > when the partition metadata exists but the inclusive data 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