kaka11chen opened a new pull request, #26696:
URL: https://github.com/apache/doris/pull/26696
## Proposed changes
Backport from #26386.
Optimize orc/parquet string dict filter in not_single_conjunct case. We can
optimize this processing to filter block firstly by dict code, then filter by
not_single_conjunct. Because dict code is int, it will filter faster than
string.
For example:
```
select count(l_receiptdate) from lineitem_date_as_string where l_shipmode in
('MAIL', 'SHIP') and l_commitdate < l_receiptdate and l_receiptdate >=
'1994-01-01' and l_receiptdate < '1995-01-01';
```
`l_receiptdate` and `l_shipmode` will using string dict filtering, and
`l_commitdate < l_receiptdate` is the an not_single_conjunct which contains
dict filter field. We can optimize this processing to filter block firstly by
dict code, then filter by not_single_conjunct. Because dict code is int, it
will filter faster than string.
Before:
mysql> select count(l_receiptdate) from lineitem_date_as_string where
l_shipmode in ('MAIL', 'SHIP') and l_commitdate < l_receiptdate and
l_receiptdate >= '1994-01-01' and l_receiptdate < '1995-01-01';
+----------------------+
| count(l_receiptdate) |
+----------------------+
| 49314694 |
+----------------------+
1 row in set (6.87 sec)
After:
mysql> select count(l_receiptdate) from lineitem_date_as_string where
l_shipmode in ('MAIL', 'SHIP') and l_commitdate < l_receiptdate and
l_receiptdate >= '1994-01-01' and l_receiptdate < '1995-01-01';
+----------------------+
| count(l_receiptdate) |
+----------------------+
| 49314694 |
+----------------------+
1 row in set (4.85 sec)
## Further comments
If this is a relatively large or complex change, kick off the discussion at
[[email protected]](mailto:[email protected]) by explaining why you
chose the solution you did and what alternatives you considered, etc...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]