risinglight
risinglight copied to clipboard
expression: do not bind column for `count(*)` in binder
https://github.com/risinglightdb/risinglight/blob/40db687e7424da4ef96661c9cfe65adcbcf5a1a6/src/binder/expression/agg_call.rs#L65-L83
Currently, we always select the 0th column in binder for count(*). This has caused problems like https://github.com/risinglightdb/risinglight/issues/200. In the future, we should be able to do both of the following:
- bind all columns in binder, and do column prune in optimizer
- rewrite
count(*)to using statistics information (only for queries likeselect count(*) from table)
I will solve this problem after @st1page finishes his work.