risinglight
risinglight copied to clipboard
storage: filter_column can't be all false
let filter_column = expr.get_filter_column(column_refs.len());
assert!(filter_column.any());
We assume that optimizer can ensure this for us.
~~duplicate with https://github.com/risinglightdb/risinglight/issues/289~~ not the same problem 😅
> 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
🤣🤣 surprised to see count = 1