deniskuzZ commented on code in PR #4026:
URL: https://github.com/apache/hive/pull/4026#discussion_r1104111263
##########
ql/src/java/org/apache/hadoop/hive/ql/parse/UpdateDeleteSemanticAnalyzer.java:
##########
@@ -145,11 +163,38 @@ private void reparseAndSuperAnalyze(ASTNode tree, Table
mTable, ASTNode tabNameN
where = (ASTNode)children.get(whereIndex);
assert where.getToken().getType() == HiveParser.TOK_WHERE :
"Expected where clause, but found " + where.getName();
- }
- // Add a sort by clause so that the row ids come out in the correct order
- appendSortBy(rewrittenQueryStr, columnAppender.getSortKeys());
+ if (shouldOverwrite) {
+ if (where.getChildCount() == 1) {
+
+ // Add isNull check for the where clause condition, since null is
treated as false in where condition and
+ // not null also resolves to false, so we need to explicitly handle
this case.
+ ASTNode functionNode = new ASTNode(new
CommonToken(HiveParser.TOK_FUNCTION, "TOK_FUNCTION"));
Review Comment:
should we do this if `where.getChild(0)` is a terminal node?
--
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]