pvary commented on a change in pull request #2246:
URL: https://github.com/apache/iceberg/pull/2246#discussion_r577595509
##########
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:
Can we use `testTables.createTable(TestHiveShell shell, String
tableName, Schema schema, PartitionSpec spec, FileFormat fileFormat,
List<Record> records)` here?
Or it would be even better if we create a version of this method where we do
not need to execute a Hive query to insert the data. We do not test the Hive
`INSERT INTO` here and adding records directly to the table is faster.
----------------------------------------------------------------
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]