Shant Hovsepian has posted comments on this change. ( http://gerrit.cloudera.org:8080/16052 )
Change subject: IMPALA-9784: Non correlated subqueries in HAVING. ...................................................................... Patch Set 2: (1 comment) http://gerrit.cloudera.org:8080/#/c/16052/2/fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java File fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java: http://gerrit.cloudera.org:8080/#/c/16052/2/fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java@466 PS2, Line 466: // TODO: IMPALA-5100 to cover all cases, we do let through runtime scalars with I relaxed some of these rules to let through subqueries such as (select count(a) from t group by b where b=1). Referenced the jira to enhance the scalar subquery planner checks to handle more expression evaluation but for now thought the tradeoff was better to let these queries through wrapped in a CardinalityCheckNode. There are case where two different runtime scalar subqueries in nested query blocks could run and have runtime errors that interfere with each other since we don't have independent execution, but I checked and many other database (hive, vertica, vectorwise) have this kind of behavior. It feels like a worthwhile trade off to allow more queries to run where some might have a runtime error in an off chance when we'd just otherwise not let the query run at all. Also it's needed to support Q44 from TPC-DS. -- To view, visit http://gerrit.cloudera.org:8080/16052 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I124a58a09a1a47e1222a22d84b54fe7d07844461 Gerrit-Change-Number: 16052 Gerrit-PatchSet: 2 Gerrit-Owner: Shant Hovsepian <[email protected]> Gerrit-Reviewer: Aman Sinha <[email protected]> Gerrit-Reviewer: Impala Public Jenkins <[email protected]> Gerrit-Reviewer: Shant Hovsepian <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Comment-Date: Thu, 25 Jun 2020 19:52:56 +0000 Gerrit-HasComments: Yes
