impala-reviews mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Alex Behm (Code Review)" <>
Subject [Impala-ASF-CR] IMPALA-5531: Fix correctness issue in correlated aggregate subqueries
Date Tue, 22 Aug 2017 04:32:55 GMT
Alex Behm has posted comments on this change.

Change subject: IMPALA-5531: Fix correctness issue in correlated aggregate subqueries

Patch Set 2:

File fe/src/main/java/org/apache/impala/analysis/

Line 692:          stmt.selectList_.isDistinct()) &&
> I am not sure the BinaryPredicate check is redundant. The first is applied 
My mistake. It's definitely not redundant, I somehow misinterpreted 'expr'.
File fe/src/main/java/org/apache/impala/analysis/

Line 341:       canRewriteCorrelatedSubquery(expr, onClauseConjuncts);
Why not fold the new logic into this function and move everything down? Our checks are already
somewhat spread out and it seems worth while to consolidate as much as possible.

Line 721:<Expr, String> toSql =
Add a static helper that does toSql() on a list. Might live in Expr or ToSqlUtils or wherever
you think t's appropriate.
File fe/src/test/java/org/apache/impala/analysis/

Line 733:             "id %s (select %s from functional.alltypestiny t where t.bool_col =
false " +
Add a correlated predicate in the usbquery that does not reference 't' from the subquery.
This is to cover the new logic that requires the correlated predicate to reference tuples
from the subquery.

Line 737:         AnalyzesOk(String.format("select id from functional.allcomplextypes t where
id " +
Just to be sure: Your original fix broke this test right?

Line 777:               "where t.int_struct_col.f1 =", cmpOp, aggFn),
Why this change?

To view, visit
To unsubscribe, visit

Gerrit-MessageType: comment
Gerrit-Change-Id: I6ca7b60ef0543430d2f5a802285254ebb52db2ab
Gerrit-PatchSet: 2
Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-Owner: Dimitris Tsirogiannis <>
Gerrit-Reviewer: Alex Behm <>
Gerrit-Reviewer: Dimitris Tsirogiannis <>
Gerrit-HasComments: Yes

View raw message