marton-bod commented on a change in pull request #2246:
URL: https://github.com/apache/iceberg/pull/2246#discussion_r577626975
##########
File path:
mr/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerWithEngine.java
##########
@@ -395,6 +395,25 @@ public void testInsertFromSelectWithProjection() throws
IOException {
HiveIcebergTestUtils.validateData(table, expected, 0);
}
+ @Test
+ public void testInsertFromHiveTableWithSameColumnNames() throws IOException {
+ Assume.assumeTrue("Tez write is not implemented yet",
executionEngine.equals("mr"));
+
+ shell.executeStatement(
+ "CREATE TABLE hive_customers(customer_id bigint, first_name string)
PARTITIONED BY (last_name string)");
+ shell.executeStatement(
+ "INSERT INTO hive_customers VALUES (0, 'Alice', 'Brown'), (1, 'Bob',
'Green'), (2, 'Trudy', 'Pink')");
Review comment:
I switched to using Iceberg tables to make it simpler. Originally I used
Hive tables in the test because with Hive, `SELECT *` does not put the
partition column into `hive.io.file.readcolumn.names` which leads to this
unexpected failure, while this behaviour regarding partition columns is not
present in Iceberg. However, we can reproduce the issue by using an Iceberg
source table as well (with the same columns as the target table), just not
selecting all of its columns.
----------------------------------------------------------------
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]