nastra commented on code in PR #16066:
URL: https://github.com/apache/iceberg/pull/16066#discussion_r3188606914


##########
spark/v3.4/spark/src/test/java/org/apache/iceberg/spark/source/ScanTestBase.java:
##########
@@ -95,14 +95,11 @@ protected void writeAndValidate(Schema writeSchema, Schema 
expectedSchema) throw
 
     HadoopTables tables = new HadoopTables(CONF);
     // If V3 spec features are used, set the format version to 3
-    Map<String, String> tableProperties =
-        writeSchema.columns().stream()
-                .anyMatch(f -> f.initialDefaultLiteral() != null || 
f.writeDefaultLiteral() != null)
-            ? ImmutableMap.of(TableProperties.FORMAT_VERSION, "3")
-            : ImmutableMap.of();
+    Map<String, String> tableProperties = 
ImmutableMap.of(TableProperties.FORMAT_VERSION, "3");
     Table table =
         tables.create(
             writeSchema, PartitionSpec.unpartitioned(), tableProperties, 
location.toString());
+    configureTable(table);

Review Comment:
   this just aligns whatever we currently have on main for Spark 4.1 and 4.0 
and was added by https://github.com/apache/iceberg/pull/12546



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

Reply via email to