felixloesing commented on code in PR #13776:
URL: https://github.com/apache/gluten/pull/13776#discussion_r4744263302
##########
gluten-iceberg/src/test/scala/org/apache/gluten/execution/IcebergSuite.scala:
##########
@@ -626,6 +626,27 @@ abstract class IcebergSuite extends
WholeStageTransformerSuite {
}
}
+ test("iceberg scan with no data files") {
+ withTable("iceberg_empty", "iceberg_pruned") {
+ spark.sql("create table iceberg_empty (id int, name string) using
iceberg")
+ runQueryAndCompare("select * from iceberg_empty") {
+ checkGlutenPlan[IcebergScanTransformer]
+ }
+
+ spark.sql("""
+ |create table iceberg_pruned (id int, name string)
+ | using iceberg partitioned by (name)
+ |""".stripMargin)
+ spark.sql("""insert into iceberg_pruned values (1, "v1"), (2, "v2")""")
+ runQueryAndCompare("select * from iceberg_pruned where name = 'v3'") {
+ checkGlutenPlan[IcebergScanTransformer]
+ }
+ runQueryAndCompare("select true from iceberg_pruned where id > 100 limit
1") {
+ checkGlutenPlan[IcebergScanTransformer]
+ }
+ }
+ }
Review Comment:
Added the two tests
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]