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*