[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 3: Verified+1


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 3
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 25 Aug 2020 23:08:39 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has submitted this change and it was merged. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..

IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

The bug was the the statement rewriter converted NOT IN 
predicates to !=  predicates when the subquery could
be an empty set. This was invalid, because NOT IN ()
is true, but != () is false.

Testing:
Added targeted planner and end-to-end tests.

Ran exhaustive tests.

Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Reviewed-on: http://gerrit.cloudera.org:8080/16338
Reviewed-by: Impala Public Jenkins 
Tested-by: Impala Public Jenkins 
---
M fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
M 
testdata/workloads/functional-query/queries/QueryTest/subquery-in-constant-lhs.test
3 files changed, 115 insertions(+), 5 deletions(-)

Approvals:
  Impala Public Jenkins: Looks good to me, approved; Verified

--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: merged
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 4
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Tim Armstrong (Code Review)
Tim Armstrong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 3:

This was the hive data loading issue again


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 3
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 25 Aug 2020 18:05:38 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 3:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/6327/ 
DRY_RUN=false


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 3
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 25 Aug 2020 18:05:30 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 3: Code-Review+2


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 3
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 25 Aug 2020 18:05:29 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 2: Verified-1

Build failed: https://jenkins.impala.io/job/gerrit-verify-dryrun/6324/


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 2
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 25 Aug 2020 18:02:41 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Tim Armstrong (Code Review)
Tim Armstrong has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 2:

Thanks for the review!


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 2
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Tim Armstrong 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 25 Aug 2020 16:13:00 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 2: Code-Review+2


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 2
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 25 Aug 2020 12:55:49 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Zoltan Borok-Nagy (Code Review)
Zoltan Borok-Nagy has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 1: Code-Review+2


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 25 Aug 2020 12:55:16 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-25 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 2:

Build started: https://jenkins.impala.io/job/gerrit-verify-dryrun/6324/ 
DRY_RUN=false


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 2
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Tue, 25 Aug 2020 12:55:50 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-19 Thread Shant Hovsepian (Code Review)
Shant Hovsepian has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 1: Code-Review+1

Nice catch.


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Thu, 20 Aug 2020 01:10:26 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-14 Thread Impala Public Jenkins (Code Review)
Impala Public Jenkins has posted comments on this change. ( 
http://gerrit.cloudera.org:8080/16338 )

Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..


Patch Set 1:

Build Successful

https://jenkins.impala.io/job/gerrit-code-review-checks/6929/ : Initial code 
review checks passed. Use gerrit-verify-dryrun-external or gerrit-verify-dryrun 
to run full precommit tests.


--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: comment
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Armstrong 
Gerrit-Reviewer: Impala Public Jenkins 
Gerrit-Reviewer: Shant Hovsepian 
Gerrit-Reviewer: Zoltan Borok-Nagy 
Gerrit-Comment-Date: Fri, 14 Aug 2020 16:31:22 +
Gerrit-HasComments: No


[Impala-ASF-CR] IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

2020-08-14 Thread Tim Armstrong (Code Review)
Tim Armstrong has uploaded this change for review. ( 
http://gerrit.cloudera.org:8080/16338


Change subject: IMPALA-7782: fix constant NOT IN subqueries that can return 0 
rows
..

IMPALA-7782: fix constant NOT IN subqueries that can return 0 rows

The bug was the the statement rewriter converted NOT IN 
predicates to !=  predicates when the subquery could
be an empty set. This was invalid, because NOT IN ()
is true, but != () is false.

Testing:
Added targeted planner and end-to-end tests.

Ran exhaustive tests.

Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
---
M fe/src/main/java/org/apache/impala/analysis/StmtRewriter.java
M 
testdata/workloads/functional-planner/queries/PlannerTest/subquery-rewrite.test
M 
testdata/workloads/functional-query/queries/QueryTest/subquery-in-constant-lhs.test
3 files changed, 115 insertions(+), 5 deletions(-)



  git pull ssh://gerrit.cloudera.org:29418/Impala-ASF refs/changes/38/16338/1
--
To view, visit http://gerrit.cloudera.org:8080/16338
To unsubscribe, visit http://gerrit.cloudera.org:8080/settings

Gerrit-Project: Impala-ASF
Gerrit-Branch: master
Gerrit-MessageType: newchange
Gerrit-Change-Id: I66c726f0f66ce2f609e6ba44057191f5929a67fc
Gerrit-Change-Number: 16338
Gerrit-PatchSet: 1
Gerrit-Owner: Tim Armstrong