[ https://issues.apache.org/jira/browse/HIVE-25161?focusedWorklogId=604192&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-604192 ]
ASF GitHub Bot logged work on HIVE-25161: ----------------------------------------- Author: ASF GitHub Bot Created on: 31/May/21 15:22 Start Date: 31/May/21 15:22 Worklog Time Spent: 10m Work Description: pvary commented on a change in pull request #2316: URL: https://github.com/apache/hive/pull/2316#discussion_r642560615 ########## File path: iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerWithEngine.java ########## @@ -535,19 +531,45 @@ public void testCTASFromHiveTable() { TableProperties.DEFAULT_FILE_FORMAT, fileFormat)); List<Object[]> objects = shell.executeStatement("SELECT * FROM target ORDER BY id"); - Assert.assertEquals(2, objects.size()); - Assert.assertArrayEquals(new Object[]{1L, "Mike", "HR"}, objects.get(0)); - Assert.assertArrayEquals(new Object[]{2L, "Linda", "Finance"}, objects.get(1)); + HiveIcebergTestUtils.validateData(HiveIcebergStorageHandlerTestUtils.CUSTOMER_RECORDS, + HiveIcebergTestUtils.valueForRow(HiveIcebergStorageHandlerTestUtils.CUSTOMER_SCHEMA, objects), 0); + } + + @Test + public void testCTASPartitionedFromHiveTable() throws TException, InterruptedException { + Assume.assumeTrue(HiveIcebergSerDe.CTAS_EXCEPTION_MSG, testTableType == TestTables.TestTableType.HIVE_CATALOG); + + shell.executeStatement("CREATE TABLE source (id bigint, name string) PARTITIONED BY (dept string) STORED AS ORC"); + shell.executeStatement(testTables.getInsertQuery( + HiveIcebergStorageHandlerTestUtils.CUSTOMER_RECORDS, TableIdentifier.of("default", "source"), false)); + + shell.executeStatement(String.format( + "CREATE TABLE target PARTITIONED BY (dept, name) " + + "STORED BY '%s' TBLPROPERTIES ('%s'='%s') AS SELECT * FROM source", Review comment: nit: after @lcspinter's patch we can use `STORED BY ICEBERG` -- 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: us...@infra.apache.org Issue Time Tracking ------------------- Worklog Id: (was: 604192) Time Spent: 6.5h (was: 6h 20m) > Implement CTAS for partitioned Iceberg tables > --------------------------------------------- > > Key: HIVE-25161 > URL: https://issues.apache.org/jira/browse/HIVE-25161 > Project: Hive > Issue Type: New Feature > Reporter: Marton Bod > Assignee: Marton Bod > Priority: Major > Labels: pull-request-available > Time Spent: 6.5h > Remaining Estimate: 0h > -- This message was sent by Atlassian Jira (v8.3.4#803005)