RussellSpitzer commented on code in PR #7324:
URL: https://github.com/apache/iceberg/pull/7324#discussion_r1166073390


##########
core/src/test/java/org/apache/iceberg/TestSortOrder.java:
##########
@@ -365,4 +367,26 @@ public void testPreservingOrderSortedColumnNames() {
     Set<String> sortedCols = SortOrderUtil.orderPreservingSortedColumns(order);
     Assert.assertEquals(ImmutableSet.of("data"), sortedCols);
   }
+
+  @Test
+  public void testCaseSensitiveSortedColumnNames() {
+    String fieldName = "ext1";
+    Assertions.assertThatThrownBy(
+            () ->
+                SortOrder.builderFor(SCHEMA)
+                    .caseSensitive(true)
+                    .withOrderId(10)
+                    .asc(fieldName)
+                    .build())
+        .isInstanceOf(ValidationException.class)
+        .hasMessageContaining(String.format("Cannot find field '%s' in 
struct", fieldName));
+    Assertions.assertThatNoException()

Review Comment:
   I'd rather we check that we mapped the correct field id :)



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