deniskuzZ commented on code in PR #3281:
URL: https://github.com/apache/hive/pull/3281#discussion_r885410160


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/TaskCompiler.java:
##########
@@ -517,17 +517,21 @@ private Path getDefaultCtasLocation(final ParseContext 
pCtx) throws SemanticExce
     try {
       String protoName = null, suffix = "";
       boolean isExternal = false;
-      
+      boolean useSuffix = HiveConf.getBoolVar(conf, 
HiveConf.ConfVars.HIVE_ACID_CREATE_TABLE_USE_SUFFIX)
+              || HiveConf.getBoolVar(conf, 
HiveConf.ConfVars.HIVE_ACID_LOCKLESS_READS_ENABLED);
+
       if (pCtx.getQueryProperties().isCTAS()) {
         protoName = pCtx.getCreateTable().getDbTableName();
         isExternal = pCtx.getCreateTable().isExternal();
-      
+        if (!isExternal && useSuffix) {

Review Comment:
   we should exclude managed non-txn tables as well, should be applied directly 
to the useSuffix
   ````
   AcidUtils.isTransactionalTable(tbl)
   ````



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

Reply via email to