Alex Behm has posted comments on this change. ( http://gerrit.cloudera.org:8080/9005 )
Change subject: IMPALA-6314: Add run time scalar subquery check for uncorrelated subqueries ...................................................................... Patch Set 9: (2 comments) http://gerrit.cloudera.org:8080/#/c/9005/9/be/src/exec/cardinality-check-node.h File be/src/exec/cardinality-check-node.h: http://gerrit.cloudera.org:8080/#/c/9005/9/be/src/exec/cardinality-check-node.h@25 PS9, Line 25: namespace impala { Side note: I could hot a DCHECK with this query: select a from (values(1 a),(2),(3)) v where a = (select x from (values(1 x),(2),(3)) v); http://gerrit.cloudera.org:8080/#/c/9005/9/be/src/exec/cardinality-check-node.h@38 PS9, Line 38: virtual Status Open(RuntimeState* state) override; > I tried to craft a test scenario, but couldn't really succeed with it. Thanks for your attempt and details. The following ideas might help: 1. Use num_nodes=1 to keep things simple and avoid exchanges 2. Use batch_size=1 to return batches with one row at a time 3. Use limit 1 at the top of the query so it succeeds once the first row is seen 4. You need to get the subquery on the probe side of the join. I got the join to be inverted with the following query: select 1 from (values(1 a)) v where a = (select bigint_col from functional.alltypes limit 1); -- To view, visit http://gerrit.cloudera.org:8080/9005 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: Impala-ASF Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I0f52b93a60eeacedd242a2f17fa6b99c4fc38e06 Gerrit-Change-Number: 9005 Gerrit-PatchSet: 9 Gerrit-Owner: Zoltan Borok-Nagy <[email protected]> Gerrit-Reviewer: Alex Behm <[email protected]> Gerrit-Reviewer: Attila Jeges <[email protected]> Gerrit-Reviewer: Csaba Ringhofer <[email protected]> Gerrit-Reviewer: Dimitris Tsirogiannis <[email protected]> Gerrit-Reviewer: Tim Armstrong <[email protected]> Gerrit-Reviewer: Vuk Ercegovac <[email protected]> Gerrit-Reviewer: Zoltan Borok-Nagy <[email protected]> Gerrit-Comment-Date: Mon, 29 Jan 2018 21:17:18 +0000 Gerrit-HasComments: Yes
