-
Notifications
You must be signed in to change notification settings - Fork 47
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
Failed to create materialized view due to name conflict #356
Labels
bug
Something isn't working
Comments
for a temporary workaround: -- SELECT least(order.OrderQty, book.OrderQty) AS LastQty, order.CumQty + order.LastQty AS CumQty
++ SELECT order.CumQty + order.LastQty AS CumQty, least(order.OrderQty, book.OrderQty) AS LastQty
OR
++ SELECT least(order.OrderQty, book.OrderQty) AS LastXQty, order.CumQty + order.LastQty AS CumQty |
create stream cte1 ( `Id` int32, `OrderQty` float, `LastQty` float);
create stream cte2 ( `Id` int32, `OrderQty` float, `LastQty` float);
-- runnable:
SELECT
cte1.LastQty + cte1.OrderQty AS LastQty,
least(cte1.LastQty, cte2.LastQty) AS OrderQty
FROM
cte1
INNER JOIN cte2 ON cte1.Id = cte2.Id;
-- cannot run without visit again:
SELECT
least(cte1.LastQty, cte2.LastQty) AS OrderQty,
cte1.LastQty + cte1.OrderQty AS LastQty
FROM
cte1
INNER JOIN cte2 ON cte1.Id = cte2.Id; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
In the above query, the field
LastQty
has caused conflict, while it should not.Rewriting to following query works but it is not necessary
The text was updated successfully, but these errors were encountered: