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


##########
core/src/test/java/org/apache/iceberg/TestSchemaUnionByFieldName.java:
##########
@@ -303,13 +303,33 @@ public void testTypePromoteFloatToDouble() {
   }
 
   @Test
-  public void testInvalidTypePromoteDoubleToFloat() {
+  public void testIgnoreTypePromoteDoubleToFloat() {
     Schema currentSchema = new Schema(required(1, "aCol", DoubleType.get()));
     Schema newSchema = new Schema(required(1, "aCol", FloatType.get()));
 
-    assertThatThrownBy(() -> new SchemaUpdate(currentSchema, 
1).unionByNameWith(newSchema).apply())
-        .isInstanceOf(IllegalArgumentException.class)
-        .hasMessage("Cannot change column type: aCol: double -> float");
+    Schema applied = new SchemaUpdate(currentSchema, 
1).unionByNameWith(newSchema).apply();
+    assertThat(applied.asStruct()).isEqualTo(currentSchema.asStruct());
+    assertThat(applied.asStruct().fields()).hasSize(1);
+    
assertThat(applied.asStruct().fields().get(0).type()).isEqualTo(DoubleType.get());
+  }
+
+  @Test
+  public void testIgnoreTypePromoteLongToInt() {

Review Comment:
   ```suggestion
     public void testDowncastLongToInt() {
   ```



-- 
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: issues-unsubscr...@iceberg.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscr...@iceberg.apache.org
For additional commands, e-mail: issues-h...@iceberg.apache.org

Reply via email to