Skip to content

Conversation

@sundy-li
Copy link
Member

I hereby agree to the terms of the CLA available at: https://databend.rs/dev/policies/cla/

Summary

Summary about this PR

select * from table where 1 = 2 

will not read segments anymore.

Closes #issue

@vercel
Copy link

vercel bot commented Mar 16, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

1 Ignored Deployment
Name Status Preview Comments Updated
databend ⬜️ Ignored (Inspect) Mar 16, 2023 at 2:53AM (UTC)

@mergify mergify bot added the pr-chore this PR only has small changes that no need to record, like coding styles. label Mar 16, 2023
@sundy-li sundy-li changed the title chore(storage): const predication returns empty partitions chore(storage): const false predication returns empty partitions Mar 16, 2023
@BohuTANG
Copy link
Member

[SQL] explain select * from numbers(1) where number = 0 and false
[Diff] (-expected|+actual)
    Filter
    ├── filters: [false]
    ├── estimated rows: 0.00
    └── TableScan
        ├── table: default.system.numbers
-       ├── read rows: 1
-       ├── read bytes: 8
-       ├── partitions total: 1
-       ├── partitions scanned: 1
+       ├── read rows: 0
+       ├── read bytes: 0
+       ├── partitions total: 0
+       ├── partitions scanned: 0
        ├── push downs: [filters: [false], limit: NONE]
        └── estimated rows: 1.00
at tests/sqllogictests/suites/mode/standalone/explain/select.test:94

@BohuTANG BohuTANG merged commit e17730b into databendlabs:main Mar 16, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pr-chore this PR only has small changes that no need to record, like coding styles.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants