Riza Suminto has posted comments on this change. ( http://gerrit.cloudera.org:8080/22746 )
Change subject: IMPALA-13873: Missing equivalence conjunct in aggregation node with inline views ...................................................................... Patch Set 6: (1 comment) http://gerrit.cloudera.org:8080/#/c/22746/6/testdata/workloads/functional-planner/queries/PlannerTest/union.test File testdata/workloads/functional-planner/queries/PlannerTest/union.test: http://gerrit.cloudera.org:8080/#/c/22746/6/testdata/workloads/functional-planner/queries/PlannerTest/union.test@4637 PS6, Line 4637: # Regression test for IMPALA-13873: the conjunct 'b = min_b' in the aggregation node : # should not be discarded. : WITH u1 AS (select 10 a, 10 b), : t AS (select a, b, min(b) over (partition by a) min_b from u1 UNION select 10, 10, 20) : select t.* from t where t.b = t.min_b; > Can you provide an example for the third case, where a predicate MUST NOT b How about this? WITH u1 AS (select tinyint_col, id from functional.alltypestiny), t AS ( select tinyint_col, id, min(id) over (partition by tinyint_col) min_id from u1 UNION select tinyint_col, id, id+100 as min_id from u1) select t.* from t where t.id = t.min_id; I see the result is wrong. +-------------+----+--------+ | tinyint_col | id | min_id | +-------------+----+--------+ | 1 | 1 | 1 | | 1 | 1 | 101 | | 0 | 2 | 0 | | 0 | 6 | 106 | | 1 | 5 | 1 | | 0 | 6 | 0 | | 0 | 4 | 104 | | 1 | 3 | 103 | | 0 | 0 | 0 | | 1 | 3 | 1 | | 1 | 7 | 107 | | 0 | 0 | 100 | | 0 | 4 | 0 | | 0 | 2 | 102 | | 1 | 7 | 1 | | 1 | 5 | 105 | +-------------+----+--------+ -- To view, visit http://gerrit.cloudera.org:8080/22746 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I67a59cd96d83181ce249fd6ca141906f549a09b3 Gerrit-Change-Number: 22746 Gerrit-PatchSet: 6 Gerrit-Owner: Daniel Becker <daniel.bec...@cloudera.com> Gerrit-Reviewer: Daniel Becker <daniel.bec...@cloudera.com> Gerrit-Reviewer: Impala Public Jenkins <impala-public-jenk...@cloudera.com> Gerrit-Reviewer: Kurt Deschler <kdesc...@cloudera.com> Gerrit-Reviewer: Noemi Pap-Takacs <npaptak...@cloudera.com> Gerrit-Reviewer: Peter Rozsa <pro...@cloudera.com> Gerrit-Reviewer: Riza Suminto <riza.sumi...@cloudera.com> Gerrit-Comment-Date: Mon, 14 Apr 2025 18:07:22 +0000 Gerrit-HasComments: Yes