kasakrisz commented on code in PR #3993:
URL: https://github.com/apache/hive/pull/3993#discussion_r1091524011
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -7878,6 +7878,10 @@ protected Operator genFileSinkPlan(String dest, QB qb,
Operator input)
throw new SemanticException("Unknown destination type: " + destType);
}
+ if (!(destType == QBMetaData.DEST_DFS_FILE && qb.getIsQuery())) {
Review Comment:
* IIUC when destType=DEST_LOCAL_FILE we are inserting into a local directory
and no conversion is required since the target is not an actual table. Example.
https://github.com/apache/hive/blob/0a5558d71c474f285c1e6d338a4be93bd1c6ce13/ql/src/test/queries/clientpositive/insert_overwrite_local_directory_1.q#L2
I extended the if condition with checking whether the destinationTable is
null and does it has a storage handler.
* yes, isQuery should be false for ctas and mv
https://github.com/apache/hive/blob/0a5558d71c474f285c1e6d338a4be93bd1c6ce13/ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java#L2443-L2444
--
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]