You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Optimizer adds redundant projections on casts with confusing alias #3786
Projection: CAST(date_dim.d_moy AS Int64) AS CAST(date_dim.d_moy AS Int64)date_dim.d_moy, store_sales.ss_customer_sk, date_dim.d_year
Inner Join: store_sales.ss_sold_date_sk = date_dim.d_date_sk
changed the title [-]Optimizer reduntant projections on casts with confusing alias[/-][+]Optimizer adds reduntant projections on casts with confusing alias[/+]on Oct 10, 2022
changed the title [-]Optimizer adds reduntant projections on casts with confusing alias[/-][+]Optimizer adds redundant projections on casts with confusing alias[/+]on Oct 10, 2022
Activity
[-]Optimizer reduntant projections on casts with confusing alias[/-][+]Optimizer adds reduntant projections on casts with confusing alias[/+][-]Optimizer adds reduntant projections on casts with confusing alias[/-][+]Optimizer adds redundant projections on casts with confusing alias[/+]alamb commentedon Oct 11, 2022
Note I tried to explain in #3794 why aliases are needed for optimizer rewrite passes in general.
This may also be related to #3770
alamb commentedon Oct 11, 2022
Using
EXPLAIN VERBOSEon the plan should reveal which optimizer pass is making this change. If I had to guess, I would guess CommonSubexprEliminateliukun4515 commentedon Oct 12, 2022
Maybe related to this issue #3635 which will produce redundant projection after run the optimizer
andygrove commentedon Oct 17, 2022
Another example:
The alias name should just be:
and not
andygrove commentedon Oct 25, 2022
Another example in #3884 (comment)
andygrove commentedon Nov 1, 2022
I confirmed that this does happen in
common_sub_expression_eliminateandygrove commentedon Nov 1, 2022
Fixing this will involve a significant refactor/rewrite of portions of
common_sub_expression_eliminatejackwener commentedon Dec 11, 2022
related with #4575