-
Notifications
You must be signed in to change notification settings - Fork 751
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7072 from leiysky/enable-push-down-filter-scan
fix(planner): Enable push down filter scan
- Loading branch information
Showing
12 changed files
with
111 additions
and
114 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
22 changes: 11 additions & 11 deletions
22
query/tests/it/sql/optimizer/heuristic/testdata/select.test
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,67 +1,67 @@ | ||
select * from numbers(1) | ||
---- | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [] | ||
|
||
|
||
select * from (select * from numbers(1)) as t1 where number = 1 | ||
---- | ||
Filter: [t1.number (#0) = 1] | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [t1.number (#0) = 1] | ||
|
||
|
||
# `b = 1` can not be pushed down | ||
select * from (select number as a, number + 1 as b from numbers(1)) as t1 where a = 1 and b = 1 | ||
---- | ||
Filter: [t1.a (#0) = 1, t1.b (#1) = 1] | ||
EvalScalar: [+(numbers.number (#0), 1)] | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [] | ||
|
||
|
||
select * from (select number as a, number + 1 as b from numbers(1)) as t1 where a = 1 | ||
---- | ||
EvalScalar: [+(numbers.number (#0), 1)] | ||
Filter: [t1.a (#0) = 1] | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [t1.a (#0) = 1] | ||
|
||
|
||
select * from numbers(1) where number = pow(1, 1 + 1) | ||
---- | ||
Filter: [numbers.number (#0) = 1] | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [numbers.number (#0) = 1] | ||
|
||
|
||
select * from numbers(1) where TRUE and 1 = 1 | ||
---- | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [] | ||
|
||
|
||
select * from numbers(1) where number = 0 and false | ||
---- | ||
Filter: [false] | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [false] | ||
|
||
|
||
select * from numbers(1) where number = 0 and null | ||
---- | ||
Filter: [false] | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [false] | ||
|
||
|
||
# If there is only one conjunction and the value is null, then we won't rewrite it | ||
select * from numbers(1) where null | ||
---- | ||
Filter: [NULL] | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [NULL] | ||
|
||
|
||
select a from (select number as a, number as b from numbers(1)) | ||
---- | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [] | ||
|
||
|
||
select a from (select number as a, number+1 as b from numbers(1)) | ||
---- | ||
Project: [number (#0)] | ||
Scan: default.system.numbers | ||
Scan: default.system.numbers, filters: [] | ||
|
||
|
Oops, something went wrong.
dc289e0
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
databend – ./
databend-databend.vercel.app
databend.vercel.app
databend.rs
databend-git-main-databend.vercel.app