Fokko commented on code in PR #6984:
URL: https://github.com/apache/iceberg/pull/6984#discussion_r1128238558


##########
core/src/test/java/org/apache/iceberg/util/TestSortOrderUtil.java:
##########
@@ -303,4 +305,33 @@ public void 
testSortOrderClusteringWithRedundantPartitionFieldsMissing() {
         expected,
         SortOrderUtil.buildSortOrder(table.schema(), updatedSpec, order));
   }
+
+  @Test
+  public void testDropColumnFromDefaultSortOrder() {
+    TestTables.TestTable table =
+        TestTables.create(
+            tableDir, "test", SCHEMA, PartitionSpec.unpartitioned(), 
SortOrder.unsorted(), 1);
+    table.replaceSortOrder().asc("ts").commit();
+
+    Assertions.assertThatThrownBy(() -> 
table.updateSchema().deleteColumn("ts").commit())
+        .isInstanceOf(ValidationException.class)
+        .hasMessage("Cannot find source column for sort field: identity(3) ASC 
NULLS FIRST");

Review Comment:
   Ah, missed those



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