stevenzwu commented on code in PR #16692:
URL: https://github.com/apache/iceberg/pull/16692#discussion_r3554777382
##########
spark/v4.1/spark/src/test/java/org/apache/iceberg/spark/sql/TestFilterPushDown.java:
##########
@@ -647,6 +648,46 @@ public void testVariantExtractFiltering() {
});
}
+ @TestTemplate
+ public void testFilterPushdownOnInitialDefaultColumnAbsentFromFile() {
+ sql(
+ "CREATE TABLE %s (id BIGINT, name STRING) USING iceberg "
+ + "TBLPROPERTIES ('format-version' = '3')",
+ tableName);
+ configurePlanningMode(planningMode);
+
+ sql("INSERT INTO %s VALUES (1, 'Alice')", tableName);
+
+ Table table = validationCatalog.loadTable(tableIdent);
+ table.updateSchema().addColumn("c", Types.StringType.get(),
Expressions.lit("US")).commit();
+ sql("REFRESH TABLE %s", tableName);
+
+ sql("INSERT INTO %s VALUES (2, 'Bob', 'US')", tableName);
Review Comment:
I would suggest also include a row with non-US values to cover the case that
actual rows are read from the file
--
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]