Open satanson opened 6 months ago
We have marked this issue as stale because it has been inactive for 6 months. If this issue is still relevant, removing the stale label or adding a comment will keep it active. Otherwise, we'll close it in 10 days to keep the issue queue tidy. Thank you for your contribution to StarRocks!
Enhancement
report-version: main-67fc7a1
dataset: tpcds1g
reproduce steps:
create MV:
explain costs tpcds-query40.sql
test1 : MV rewrite fails, case-when clause with cast expr interpolation matches if-clause in MV
test2: MV rewriting succeeds, expressions in both query and and mv schema are matches, expressions in query has no cast expr interpolation.
test3: MV rewriting succeeds : case-when without cast expr interpolation matches if-clause in MV.
test4: MV rewriting succeeds : if-clause in query with cast expr interpolation matches if-clause in MV.
Conclusion: case-when-clause with cast-expr fails to fold cast expr, which prevent MV rewriting,so we should fix it.
How to setup StarRocks cluster and prepare tpcds-1g data