[
https://issues.apache.org/jira/browse/HIVE-26519?focusedWorklogId=806941&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-806941
]
ASF GitHub Bot logged work on HIVE-26519:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 08/Sep/22 09:14
Start Date: 08/Sep/22 09:14
Worklog Time Spent: 10m
Work Description: lcspinter commented on code in PR #3577:
URL: https://github.com/apache/hive/pull/3577#discussion_r964513432
##########
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:
This can be private.
##########
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:
Could you please validate that the table is iceberg? Also, I would be
interested in checking some table properties.
Issue Time Tracking
-------------------
Worklog Id: (was: 806941)
Time Spent: 0.5h (was: 20m)
> 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: 0.5h
> 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)