AngersZhuuuu commented on a change in pull request #29739:
URL: https://github.com/apache/spark/pull/29739#discussion_r490049331
##########
File path:
sql/hive/src/test/scala/org/apache/spark/sql/hive/execution/HiveTableScanSuite.scala
##########
@@ -187,6 +189,47 @@ class HiveTableScanSuite extends HiveComparisonTest with
SQLTestUtils with TestH
}
}
+ test("SPARK-32867: When explain, HiveTableRelation show limited message") {
+ withSQLConf(HiveUtils.CONVERT_METASTORE_ORC.key -> "false",
+ "hive.exec.dynamic.partition.mode" -> "nonstrict") {
+ withTable("df") {
+ spark.range(1000)
+ .select(col("id"), col("id").as("k"))
+ .write
+ .partitionBy("k")
+ .format("hive")
+ .mode("overwrite")
+ .saveAsTable("df")
+
+ val scan1 = getHiveTableScanExec("SELECT * FROM df WHERE df.k < 3")
+ assert(scan1.simpleString(100).replaceAll("#\\d+L", "") ==
+ "Scan hive default.df [id, k]," +
+ " HiveTableRelation [" +
+ "`default`.`df`," +
+ " org.apache.hadoop.hive.serde2.lazy.LazySimpleSerDe," +
+ " Data Cols: [id]," +
+ " Partition Cols: [k]," +
+ " Pruned Partitions: [k=0, k=1, k=2]," +
+ " Statistic: sizeInBytes=8.0 EiB" +
Review comment:
> Printing `8.0 EiB` looks weird and we need `Statistic` here?
Not so important, IMO, we can remove
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]