rdblue commented on a change in pull request #227: ORC column map fix
URL: https://github.com/apache/incubator-iceberg/pull/227#discussion_r355233297
 
 

 ##########
 File path: data/src/test/java/org/apache/iceberg/data/TestReadProjection.java
 ##########
 @@ -135,6 +135,37 @@ public void testReorderedProjection() throws Exception {
     Assert.assertNull("Should contain the correct 2 value", projected.get(2));
   }
 
+  @Test
+  public void testRenamedAddedField() throws Exception {
+    Schema schema = new Schema(
+        Types.NestedField.required(1, "a", Types.LongType.get()),
+        Types.NestedField.required(2, "b", Types.LongType.get()),
+        Types.NestedField.required(3, "d", Types.LongType.get())
+    );
+
+    Record record = GenericRecord.create(schema.asStruct());
+    record.setField("a", 100L);
+    record.setField("b", 200L);
+    record.setField("d", 300L);
+
+    Schema renamedAdded = new Schema(
+        Types.NestedField.optional(1, "a", Types.LongType.get()),
+        Types.NestedField.optional(2, "b", Types.LongType.get()),
+        Types.NestedField.optional(3, "c", Types.LongType.get()),
+        Types.NestedField.optional(4, "d", Types.LongType.get())
+    );
+
+    Record projected = writeAndRead("rename_and_add_column_projection", 
schema, renamedAdded, record);
+    Assert.assertEquals("Should contain the correct value in colum 1", 
projected.get(0), 100L);
 
 Review comment:
   Nit: typo "colum" -> "column"

----------------------------------------------------------------
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.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to