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

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

                Author: ASF GitHub Bot
            Created on: 08/Sep/22 13:45
            Start Date: 08/Sep/22 13:45
    Worklog Time Spent: 10m 
      Work Description: ayushtkn commented on code in PR #3577:
URL: https://github.com/apache/hive/pull/3577#discussion_r965991159


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/StorageFormat.java:
##########
@@ -48,16 +48,30 @@ public class StorageFormat {
   private final Map<String, String> serdeProps;
 
   private enum StorageHandlerTypes {
-    ICEBERG("\'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler\'");
+    ICEBERG("\'org.apache.iceberg.mr.hive.HiveIcebergStorageHandler\'",
+        "org.apache.iceberg.mr.hive.HiveIcebergInputFormat", 
"org.apache.iceberg.mr.hive.HiveIcebergOutputFormat");
 
     private final String className;
-    StorageHandlerTypes(String className) {
+    private final String inputFormat;
+    private final String outputFormat;
+
+    StorageHandlerTypes(String className, String inputFormat, String 
outputFormat) {

Review Comment:
   Done



##########
iceberg/iceberg-handler/src/test/java/org/apache/iceberg/mr/hive/TestHiveIcebergStorageHandlerNoScan.java:
##########
@@ -1576,6 +1576,20 @@ public void testAlterTableToIcebergAndMetadataLocation() 
throws IOException {
         });
   }
 
+  @Test
+  public void testCTLT() {
+    // Create a normal table and add some data
+    shell.executeStatement("CREATE TABLE source(a int)");
+    shell.executeStatement("insert into source values(1)");
+
+    shell.executeStatement(String.format("CREATE TABLE dest LIKE source STORED 
BY ICEBERG %s ",
+        testTables.locationForCreateTableSQL(TableIdentifier.of("default", 
"dest"))));
+
+    // Try a select query and check if the table is empty .
+    String result = shell.executeAndStringify("select a from " + 
TableIdentifier.of("default", "dest").name());

Review Comment:
   Added





Issue Time Tracking
-------------------

    Worklog Id:     (was: 807036)
    Time Spent: 40m  (was: 0.5h)

> Iceberg: Add support for CTLT queries
> -------------------------------------
>
>                 Key: HIVE-26519
>                 URL: https://issues.apache.org/jira/browse/HIVE-26519
>             Project: Hive
>          Issue Type: Improvement
>            Reporter: Ayush Saxena
>            Assignee: Ayush Saxena
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 40m
>  Remaining Estimate: 0h
>
> Add support to run `create table Like` queries with iceberg tables



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to