simhadri-g commented on code in PR #3307:
URL: https://github.com/apache/hive/pull/3307#discussion_r879908488


##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -13900,7 +13901,11 @@ private void addDbAndTabToOutputs(String[] 
qualifiedTabName, TableType type,
     for(Map.Entry<String,String> serdeMap : 
storageFormat.getSerdeProps().entrySet()){
       t.setSerdeParam(serdeMap.getKey(), serdeMap.getValue());
     }
-    outputs.add(new WriteEntity(t, WriteEntity.WriteType.DDL_NO_LOCK));
+    if (tblProps.get("created_with_ctas") == "true") {
+      outputs.add(new WriteEntity(t, WriteType.CTAS));

Review Comment:
   In CreateTableOperation, DDLUtils.addIfAbsentByName would populate the 
output only if it was missed in the SemanticAnalyzer stage. 
   
   So I think, removing this step in CreateTableOperation and retaining it only 
in SemanticAnalyze would be fine.



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