Guillaume Massé created CALCITE-7080:
----------------------------------------
Summary: SqlUpdate unparse crash after a visit from SqlShuttle
Key: CALCITE-7080
URL: https://issues.apache.org/jira/browse/CALCITE-7080
Project: Calcite
Issue Type: Bug
Components: core
Affects Versions: 1.40.0
Reporter: Guillaume Massé
Assignee: Guillaume Massé
Fix For: 1.41.0
{code:java}
> Task :core:test FAILED
FAILURE 0.1sec, org.apache.calcite.sql.parser.CoreSqlParserTest >
testVisitSqlUpdateWithSqlShuttle()
java.lang.UnsupportedOperationException: class
org.apache.calcite.sql.SqlSyntax$7: SPECIAL
at org.apache.calcite.util.Util.needToImplement(Util.java:1112)
at org.apache.calcite.sql.SqlSyntax$7.unparse(SqlSyntax.java:129)
at org.apache.calcite.sql.SqlOperator.unparse(SqlOperator.java:414)
at org.apache.calcite.sql.SqlDialect.unparseCall(SqlDialect.java:468)
at org.apache.calcite.sql.SqlCall.unparse(SqlCall.java:140)
at org.apache.calcite.sql.SqlNode.toSqlString(SqlNode.java:157)
at org.apache.calcite.sql.SqlNode.toString(SqlNode.java:132)
at
org.apache.calcite.sql.parser.SqlParserTest.testVisitSqlUpdateWithSqlShuttle(SqlParserTest.java:6592)
{code}
SqlUpdate operator does not override createCall. When we visit a SqlUpdate it
will be converted to a SqlBasicCall and it won't call SqlUpdate unparse.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)