You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@calcite.apache.org by "Julian Hyde (JIRA)" <ji...@apache.org> on 2018/02/21 21:04:00 UTC
[jira] [Updated] (CALCITE-2188) JDBC adapter generates invalid SQL
for DATE/INTERVAL arithmetic
[ https://issues.apache.org/jira/browse/CALCITE-2188?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Julian Hyde updated CALCITE-2188:
---------------------------------
Component/s: (was: core)
jdbc-adapter
> JDBC adapter generates invalid SQL for DATE/INTERVAL arithmetic
> ---------------------------------------------------------------
>
> Key: CALCITE-2188
> URL: https://issues.apache.org/jira/browse/CALCITE-2188
> Project: Calcite
> Issue Type: Bug
> Components: jdbc-adapter
> Reporter: Rahul Raj
> Assignee: Julian Hyde
> Priority: Major
>
> Calcite errors on Date interval addition/subtraction in the where clause.
> Eg: "select * from \"sakila\".\"actor\" where \"last_update\" - INTERVAL '20' SECOND > TIMESTAMP '2005-10-17 00:00:00' "
> Caused by: java.lang.UnsupportedOperationException: class org.apache.calcite.sql.SqlSyntax$6: SPECIAL
> at org.apache.calcite.util.Util.needToImplement(Util.java:925) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlSyntax$6.unparse(SqlSyntax.java:116) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlOperator.unparse(SqlOperator.java:332) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlDialect.unparseCall(SqlDialect.java:332) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.dialect.MysqlSqlDialect.unparseCall(MysqlSqlDialect.java:154) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlCall.unparse(SqlCall.java:103) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlUtil.unparseBinarySyntax(SqlUtil.java:323) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlSyntax$3.unparse(SqlSyntax.java:65) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlOperator.unparse(SqlOperator.java:332) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlDialect.unparseCall(SqlDialect.java:332) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.dialect.MysqlSqlDialect.unparseCall(MysqlSqlDialect.java:154) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlCall.unparse(SqlCall.java:103) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlNodeList.andOrList(SqlNodeList.java:142) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlOperator.unparseListClause(SqlOperator.java:347) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlSelectOperator.unparse(SqlSelectOperator.java:197) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlSelect.unparse(SqlSelect.java:240) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlNode.toSqlString(SqlNode.java:152) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.calcite.sql.SqlNode.toSqlString(SqlNode.java:158) ~[calcite-core-1.15.0-drill-r0.jar:1.15.0-drill-r0]
> at org.apache.drill.exec.store.jdbc.JdbcPrel.<init>(JdbcPrel.java:65) ~[drill-jdbc-storage-1.13.0-SNAPSHOT.jar:1.13.0-SNAPSHOT]
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)