aokolnychyi commented on code in PR #8381:
URL: https://github.com/apache/iceberg/pull/8381#discussion_r1310628675
##########
spark/v3.1/spark-extensions/src/test/java/org/apache/iceberg/spark/extensions/TestAlterTablePartitionFields.java:
##########
@@ -358,21 +384,34 @@ public void testReplaceNamedPartition() {
sql("ALTER TABLE %s REPLACE PARTITION FIELD day_col WITH hours(ts)",
tableName);
table.refresh();
- expected =
- PartitionSpec.builderFor(table.schema())
- .withSpecId(2)
- .alwaysNull("ts", "day_col")
- .hour("ts")
- .build();
+ if (formatVersion == 1) {
+ expected =
+ PartitionSpec.builderFor(table.schema())
+ .withSpecId(2)
+ .alwaysNull("ts", "day_col")
+ .hour("ts")
+ .build();
+ } else {
+ expected =
+ PartitionSpecParser.fromJson(
+ table.schema(),
Review Comment:
Agreed, I'll create an issue to address that.
--
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]