risinglight icon indicating copy to clipboard operation
risinglight copied to clipboard

storage: filter_column can't be all false

Open likg227 opened this issue 2 years ago • 3 comments

let filter_column = expr.get_filter_column(column_refs.len());
assert!(filter_column.any());

We assume that optimizer can ensure this for us.

likg227 avatar Jan 07 '22 03:01 likg227

~~duplicate with https://github.com/risinglightdb/risinglight/issues/289~~ not the same problem 😅

xxchan avatar Feb 19 '22 12:02 xxchan

>  select count(*) from t where false 
# What's this???
+-------+
| count |
+-------+
| 1     |
+-------+
in 2ms 35us 848ns
>  select count(*) from t where true
+-------+
| count |
+-------+
| 2     |
+-------+
in 2ms 500us 551ns
>  select count(*) from t where 1
thread 'tokio-runtime-worker' panicked at 'There should be at least 1 filter column', src/storage/secondary/rowset/rowset_iterator.rs:84:13

xxchan avatar Feb 19 '22 13:02 xxchan

🤣🤣 surprised to see count = 1

skyzh avatar Feb 19 '22 13:02 skyzh