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_r250564550
 
 

 ##########
 File path: sql/core/src/test/scala/org/apache/spark/sql/SQLQuerySuite.scala
 ##########
 @@ -2966,6 +2966,17 @@ class SQLQuerySuite extends QueryTest with 
SharedSQLContext {
       }
     }
   }
+
+  test("SPARK-26709: OptimizeMetadataOnlyQuery does not handle empty records 
correctly") {
 
 Review comment:
   Also, can we add a test case for hive tables?, e.g.,
   ```
   
   scala> sql("CREATE TABLE t (id STRING) PARTITIONED BY (p STRING)")
   scala> sql("INSERT INTO t VALUES ('1', '3')")
   scala> sql("TRUNCATE TABLE t PARTITION (p = '3')")
   scala> sql("SET spark.sql.optimizer.metadataOnly=true")
   scala> spark.table("t").selectExpr("max(p)").show
   +------+
   |max(p)|
   +------+
   |     3|
   +------+
   
   scala> sql("SET spark.sql.optimizer.metadataOnly=false")
   scala> spark.table("t").selectExpr("max(p)").show
   +------+
   |max(p)|
   +------+
   |  null|
   +------+
   ```

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