doris icon indicating copy to clipboard operation
doris copied to clipboard

[fix](multi-catalog) Disable string dictionary filtering when predicate express is not slot

Open suxiaogang223 opened this issue 4 months ago • 14 comments

Proposed changes

follow up https://github.com/apache/doris/pull/35335/ When the "case when ... then ... when ... then ... else" occurs, function_expr may not exist in the pushed down predicate, but the handling of null values ​​is still problematic.

table data:

mysql> select o_orderpriority from test_string_dict_filter_orc;
+-----------------+
| o_orderpriority |
+-----------------+
| 5-LOW           |
| 1-URGENT        |
| 5-LOW           |
| NULL            |
| 5-LOW           |
+-----------------+

before:

mysql> select count(o_orderpriority) from ( select (case when o_orderpriority = 'x' then '1' when o_orderpriority = 'y' then '2' else '0' end) as o_orderpriority from test_string_dict_filter_orc ) as A where o_orderpriority = '0';
+------------------------+
| count(o_orderpriority) |
+------------------------+
|                      4 |
+------------------------+

after:

mysql> select count(o_orderpriority) from ( select (case when o_orderpriority = 'x' then '1' when o_orderpriority = 'y' then '2' else '0' end) as o_orderpriority from test_string_dict_filter_orc ) as A where o_orderpriority = '0';
+------------------------+
| count(o_orderpriority) |
+------------------------+
|                      5 |
+------------------------+

suxiaogang223 avatar Oct 18 '24 13:10 suxiaogang223