You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@calcite.apache.org by Nishchith Shetty <in...@gmail.com> on 2021/07/13 13:28:41 UTC
[dev] Need help with a query failing at validation.
Hi, I'm Nishchith
I've been using calcite for quite some time, recently I was using it to for
a query which ran successfully on snowflake but erred out at validation
step with:
*Query: *SELECT * FROM TABLE PIVOT(sum(X) FOR Y IN (v1, v2, v3)) AS P(a,
b, c, d)
*Error: *org.apache.calcite.runtime.CalciteContextException: From line 1,
column 82 to line 1, column 219: Duplicate relation name 'P' in FROM clause
It seems while I remove the cast after P(alias), it works fine. Can anyone
share some pointers where the issue could be?
Thanks,
*Nishchith*