kgyrtkirk commented on a change in pull request #2442:
URL: https://github.com/apache/hive/pull/2442#discussion_r709936548
##########
File path: ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java
##########
@@ -472,6 +474,28 @@ private void setLoadFileLocation(
loc = cmv.getLocation();
}
Path location = (loc == null) ? getDefaultCtasLocation(pCtx) : new
Path(loc);
+ if (pCtx.getQueryProperties().isCTAS()) {
+ boolean isExternal = pCtx.getCreateTable().isExternal();
+ boolean isAcid = pCtx.getCreateTable().getTblProps().getOrDefault(
+ hive_metastoreConstants.TABLE_IS_TRANSACTIONAL,
"false").equalsIgnoreCase("true") ||
+
pCtx.getCreateTable().getTblProps().containsKey(hive_metastoreConstants.TABLE_TRANSACTIONAL_PROPERTIES);
+ if ((HiveConf.getBoolVar(conf,
HiveConf.ConfVars.CREATE_TABLE_AS_EXTERNAL) || isExternal) && !isAcid) {
Review comment:
1. doesnt matter; if that will be a performance bottleneck later we will
handle it - but as it is now; it only adds complexity/reduces
readability...this stuff works incorrectly because its too complicated already;
it would be better to stop add twists...
2. add a parameter to the rpc call and pass the value of
`hive.create.as.external.legacy` over to the transformer so it will be able to
handle that as well.
3. can't we keep a full table object in the `ctd` instead of just some parts
of it? could that help overcome that issue?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]