abstractdog commented on code in PR #5613:
URL: https://github.com/apache/hive/pull/5613#discussion_r1926732011
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/SemanticAnalyzer.java:
##########
@@ -15713,6 +15714,7 @@ private void copyInfoToQueryProperties(QueryProperties
queryProperties) {
queryProperties.setNoScanAnalyzeCommand(qb.getParseInfo().isNoScanAnalyzeCommand());
queryProperties.setAnalyzeRewrite(qb.isAnalyzeRewrite());
queryProperties.setCTAS(qb.getTableDesc() != null);
+ queryProperties.setInsert(qb.getParseInfo().hasInsertTables());
Review Comment:
okay, I just brought this from a downstream-only commit which isn't that
clear...so qb.getParseInfo().hasInsertTables() is true in all these cases:
```
INSERT [OVERWRITE], UPDATE, DELETE, MERGE
```
that's because all the UPDATE/DELETE/MERGE operations are rewritten to
INSERTs, so isInsert brings much confusion here (whether it was an INSERT or it
was rewritten to an insert), so...hm, let me rewrite this property to
**isDML**, because that's the point here I want to exactly catch, if someone
needs isInsert for only INSERT INTO queries, it can be implemented later, I
don't have to bother with this now I think
let me add a unit test also to TestQueryProperties
--
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]