[
https://issues.apache.org/jira/browse/HIVE-26680?focusedWorklogId=824717&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-824717
]
ASF GitHub Bot logged work on HIVE-26680:
-----------------------------------------
Author: ASF GitHub Bot
Created on: 09/Nov/22 18:04
Start Date: 09/Nov/22 18:04
Worklog Time Spent: 10m
Work Description: deniskuzZ commented on code in PR #3715:
URL: https://github.com/apache/hive/pull/3715#discussion_r1018259841
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -7610,30 +7610,44 @@ protected Operator genFileSinkPlan(String dest, QB qb,
Operator input)
destTableIsMaterialization = false;
tableName =
HiveTableName.ofNullableWithNoDefault(viewDesc.getViewName());
tblProps = viewDesc.getTblProps();
+ // Add suffix only when required confs are present
+ // and user has not specified a location to the table.
+ createTableUseSuffix = (HiveConf.getBoolVar(conf,
ConfVars.HIVE_ACID_CREATE_TABLE_USE_SUFFIX)
+ || HiveConf.getBoolVar(conf,
ConfVars.HIVE_ACID_LOCKLESS_READS_ENABLED))
+ && viewDesc.getLocation() == null;
}
destTableIsTransactional = tblProps != null &&
AcidUtils.isTablePropertyTransactional(tblProps);
if (destTableIsTransactional) {
isNonNativeTable = MetaStoreUtils.isNonNativeTable(tblProps);
boolean isCtas = tblDesc != null && tblDesc.isCTAS();
+ boolean isCMV = viewDesc != null && qb.isMaterializedView();
Review Comment:
how can we be sure that this is a "create MV" operation and not select from
MV?
Issue Time Tracking
-------------------
Worklog Id: (was: 824717)
Time Spent: 3h 10m (was: 3h)
> Make CMV use Direct Insert Semantics
> ------------------------------------
>
> Key: HIVE-26680
> URL: https://issues.apache.org/jira/browse/HIVE-26680
> Project: Hive
> Issue Type: Improvement
> Reporter: Sourabh Badhya
> Assignee: Sourabh Badhya
> Priority: Major
> Labels: pull-request-available
> Time Spent: 3h 10m
> Remaining Estimate: 0h
>
> As similar to CTAS, CMV can also use Direct Insert approach which can
> potentially save a lot of filesystem operations.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)