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

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

                Author: ASF GitHub Bot
            Created on: 08/Dec/21 08:55
            Start Date: 08/Dec/21 08:55
    Worklog Time Spent: 10m 
      Work Description: pvary commented on a change in pull request #2847:
URL: https://github.com/apache/hive/pull/2847#discussion_r764662834



##########
File path: 
iceberg/iceberg-handler/src/main/java/org/apache/iceberg/mr/hive/HiveIcebergSerDe.java
##########
@@ -166,22 +167,33 @@ private void createTableForCTAS(Configuration 
configuration, Properties serDePro
       serDeProperties.put(InputFormatConfig.PARTITION_SPEC, 
PartitionSpecParser.toJson(spec));
     }
 
+    // clean up the properties for table creation (so that internal serde 
props don't become table props)
+    Properties createProps = getCTASTableCreationProperties(serDeProperties);
+
     // create CTAS table
     LOG.info("Creating table {} for CTAS with schema: {}, and spec: {}",
         serDeProperties.get(Catalogs.NAME), tableSchema, 
serDeProperties.get(InputFormatConfig.PARTITION_SPEC));
-    Catalogs.createTable(configuration, serDeProperties);
+    Catalogs.createTable(configuration, createProps);
 
     // set this in the query state so that we can rollback the table in the 
lifecycle hook in case of failures
     SessionStateUtil.addResource(configuration, 
InputFormatConfig.CTAS_TABLE_NAME,
         serDeProperties.getProperty(Catalogs.NAME));
   }
 
-  private void assertNotVectorizedTez(Configuration configuration) {
-    if ("tez".equals(configuration.get("hive.execution.engine")) &&
-        "true".equals(configuration.get("hive.vectorized.execution.enabled"))) 
{
-      throw new UnsupportedOperationException("Vectorized execution on Tez is 
currently not supported when using " +
-          "Iceberg tables. Please set hive.vectorized.execution.enabled=false 
and rerun the query.");
-    }
+  private Properties getCTASTableCreationProperties(Properties 
serDeProperties) {

Review comment:
       maybe `filterCTASTableCreationProperties`?




-- 
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.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


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

            Worklog Id:     (was: 692319)
    Remaining Estimate: 0h
            Time Spent: 10m

> Iceberg CTAS should honor location clause and have correct table properties
> ---------------------------------------------------------------------------
>
>                 Key: HIVE-25788
>                 URL: https://issues.apache.org/jira/browse/HIVE-25788
>             Project: Hive
>          Issue Type: Bug
>            Reporter: Marton Bod
>            Assignee: Marton Bod
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Currently Iceberg CTAS does not take the LOCATION clause into consideration. 
> Also, these tables end up with some unintended table properties coming from 
> the SerDe, such as partition.columns or partition.columns.comments, etc.



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to