[ 
https://issues.apache.org/jira/browse/HIVE-25161?focusedWorklogId=602187&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-602187
 ]

ASF GitHub Bot logged work on HIVE-25161:
-----------------------------------------

                Author: ASF GitHub Bot
            Created on: 26/May/21 08:19
            Start Date: 26/May/21 08:19
    Worklog Time Spent: 10m 
      Work Description: marton-bod commented on a change in pull request #2316:
URL: https://github.com/apache/hive/pull/2316#discussion_r639504751



##########
File path: 
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerWithEngine.java
##########
@@ -540,6 +540,43 @@ public void testCTASFromHiveTable() {
     Assert.assertArrayEquals(new Object[]{2L, "Linda", "Finance"}, 
objects.get(1));
   }
 
+  @Test
+  public void testCTASPartitionedFromHiveTable() throws TException, 
InterruptedException {
+    Assume.assumeTrue("CTAS target table is supported fully only for 
HiveCatalog tables." +
+        "For other catalog types, the HiveIcebergSerDe will create the target 
Iceberg table in the correct catalog " +
+        "using the Catalogs.createTable function, but will not register the 
table in HMS since those catalogs do not " +
+        "use HiveTableOperations. This means that even though the CTAS query 
succeeds, the user would not be able to " +
+        "query this new table from Hive, since HMS does not know about it.",
+        testTableType == TestTables.TestTableType.HIVE_CATALOG);
+
+    shell.executeStatement("CREATE TABLE source (id bigint, name string) 
PARTITIONED BY (dept string) STORED AS ORC");
+    shell.executeStatement("INSERT INTO source VALUES (1, 'Mike', 'HR'), (2, 
'Linda', 'Finance')");

Review comment:
       It's because I wanted to use a regular Hive table as the source here 
(since that should be a typical CTAS use case for 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: 602187)
    Time Spent: 2h 50m  (was: 2h 40m)

> 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: 2h 50m
>  Remaining Estimate: 0h
>




--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to