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
[Bug] unnecessary cast will be added on children in CaseExpr sometimes #9599
I had searched in the issues and found no similar issues.
Version
master
What's Wrong?
Unnecessary cast will be added on CaseExpr's children when do analyze on it sometimes.
This results in unequal results being returned when comparing two equal cast expressions.
What You Expected?
Do not add unnecessary cast on its children
How to Reproduce?
Create 2 tables
CREATETABLEtbl1(k1 INT, v1 INT) DISTRIBUTED BY hash(k1) PROPERTIES("replication_num"="1");
CREATETABLEtbl2(k2 INT, v2 INT) DISTRIBUTED BY hash(k2) PROPERTIES("replication_num"="1");
restart fe
execute query
SELECT
k1,
sum(CASE WHEN v2 <10 THEN v1 ELSE 0 END) s
FROM
tbl1,
tbl2
GROUP BY
k1;
query analyzed failed and return
select list expression not produced by aggregation output (missing from GROUP BY clause?): ...
Activity