You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "xzh_dz (Jira)" <ji...@apache.org> on 2020/11/18 08:55:00 UTC
[jira] [Updated] (CALCITE-4407) Support unparse special syntax when
operator is DELETE
[ https://issues.apache.org/jira/browse/CALCITE-4407?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
xzh_dz updated CALCITE-4407:
----------------------------
Summary: Support unparse special syntax when operator is DELETE (was: Support unparse special syntax when operator is DELETA)
> Support unparse special syntax when operator is DELETE
> ------------------------------------------------------
>
> Key: CALCITE-4407
> URL: https://issues.apache.org/jira/browse/CALCITE-4407
> Project: Calcite
> Issue Type: Wish
> Reporter: xzh_dz
> Priority: Major
> 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)