xzh_dz created CALCITE-4407:
-------------------------------
Summary: Support unparse special syntax when operator is DELETA
Key: CALCITE-4407
URL: https://issues.apache.org/jira/browse/CALCITE-4407
Project: Calcite
Issue Type: Wish
Reporter: xzh_dz
Attachments: image-2020-11-18-16-12-18-340.png
This exception can be reproduced as below:
SqlParserTest:
{code:java}
// code placeholder
@Test void testSqlDeleteSqlBasicCallToString() throws Exception {
final String sql0 = "delete from emps";
final SqlNode sqlNode0 = getSqlParser(sql0).parseStmt();
final SqlNode sqlNodeVisited0 = sqlNode0.accept(new SqlShuttle() {
@Override public SqlNode visit(SqlIdentifier identifier) {
return new SqlIdentifier(identifier.names,
identifier.getParserPosition());
}
});
System.out.println(sqlNodeVisited0.toString());
}{code}
Exception:
{code:java}
// code placeholder
java.lang.UnsupportedOperationException: class
org.apache.calcite.sql.SqlSyntax$7:
SPECIALjava.lang.UnsupportedOperationException: class
org.apache.calcite.sql.SqlSyntax$7: SPECIAL
at org.apache.calcite.util.Util.needToImplement(Util.java:1080) at
org.apache.calcite.sql.SqlSyntax$7.unparse(SqlSyntax.java:128) at
org.apache.calcite.sql.SqlOperator.unparse(SqlOperator.java:377) at
org.apache.calcite.sql.SqlDialect.unparseCall(SqlDialect.java:453) at
org.apache.calcite.sql.SqlCall.unparse(SqlCall.java:103) at
org.apache.calcite.sql.SqlNode.toSqlString(SqlNode.java:155)
{code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)