Closed yingsu00 closed 1 year ago
The filter with paddings should output the same but they all fail:
presto:test> set session hive.pushdown_filter_enabled=false;
SET SESSION
presto:test> select count(*) from household_demographics where hd_buy_potential='>10000 ';
_col0
-------
1200
(1 row)
presto:test> set session hive.pushdown_filter_enabled=true;
SET SESSION
presto:test> select count(*) from household_demographics where hd_buy_potential='>10000 ';
_col0
-------
0
(1 row)
Repro
The root cause was that the selective readers push down and evaluate the filters in SliceDictionarySelectiveReader, but it thinks all values are 15 bytes long. On the other hand the dictionary values were truncated, and doesn't include the paddings. The rowGroupFilter for '>10000' was with 6 chars only.