-
Notifications
You must be signed in to change notification settings - Fork 447
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[CH] Eliminate common subexpression by ExpressionParser
#8283
Labels
Comments
An example as following. select
case when bus_type = 34 then split(order_id,'_')[2]
when bus_type in (116,118) then split(order_id,'_')[4]
when bus_type in (117) then split(order_id,'_')[5] end as uid
,case when bus_type = 34 then split(order_id,'_')[4]
when bus_type in (116,118) then split(order_id,'_')[6]
when bus_type in (117) then split(order_id,'_')[7] end
as id
from t
where day = '2024-12-15'
and appid=60
and bus_type in (34,116,117,118) ; Without elimination in
With elimination in
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Description
We have had
CommonSubexpressionEliminateRule
to eliminate common subexpression before, but it cannot cover all cases.Since we have moved all conversions from substrait expression to CH
ActionsDAG
intoExpressionParser
, we can add the CSE elimination inExpressionParser
.The text was updated successfully, but these errors were encountered: