vineetgarg02 commented on a change in pull request #1525: URL: https://github.com/apache/hive/pull/1525#discussion_r500661508
########## File path: ql/src/java/org/apache/hadoop/hive/ql/optimizer/calcite/rules/HiveSubQueryRemoveRule.java ########## @@ -406,6 +409,16 @@ private RexNode rewriteInExists(RexSubQuery e, Set<CorrelationId> variablesSet, offset = offset + 1; builder.push(e.rel); } + } else if (e.getKind() == SqlKind.EXISTS && !variablesSet.isEmpty()) { + // Query has 'exists' and correlation: Review comment: Can you add a comment to explain/mention why limit is being removed for correlated EXISTs? ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org