You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@ignite.apache.org by "Aleksey Plekhanov (Jira)" <ji...@apache.org> on 2021/10/29 10:38:00 UTC

[jira] [Updated] (IGNITE-14730) Calcite engine. Cast to INTERVAL data type is not working

     [ https://issues.apache.org/jira/browse/IGNITE-14730?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Aleksey Plekhanov updated IGNITE-14730:
---------------------------------------
    Labels: calcite3-required  (was: calcite2-required calcite3-required)

> Calcite engine. Cast to INTERVAL data type is not working
> ---------------------------------------------------------
>
>                 Key: IGNITE-14730
>                 URL: https://issues.apache.org/jira/browse/IGNITE-14730
>             Project: Ignite
>          Issue Type: Bug
>            Reporter: Aleksey Plekhanov
>            Assignee: Aleksey Plekhanov
>            Priority: Minor
>              Labels: calcite3-required
>
> Postfix cast of any expression to INTERVAL data type, for example:
> {noformat}
> select null::interval day
> {noformat}
> Fails with the exception: 
> {noformat}
> class org.apache.ignite.internal.processors.query.IgniteSQLException: Failed to parse query.
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.prepareQuery(ExecutionServiceImpl.java:527)
> 	at org.apache.ignite.internal.processors.query.calcite.prepare.QueryPlanCacheImpl.queryPlan(QueryPlanCacheImpl.java:84)
> 	at org.apache.ignite.internal.processors.query.calcite.exec.ExecutionServiceImpl.executeQuery(ExecutionServiceImpl.java:390)
> 	at org.apache.ignite.internal.processors.query.calcite.CalciteQueryProcessor.query(CalciteQueryProcessor.java:259)
> 	at org.apache.ignite.internal.processors.query.calcite.integration.TableDmlIntegrationTest.executeSql(TableDmlIntegrationTest.java:284)
> 	at org.apache.ignite.internal.processors.query.calcite.integration.TableDmlIntegrationTest.test(TableDmlIntegrationTest.java:95)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> 	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> 	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> 	at java.lang.reflect.Method.invoke(Method.java:498)
> 	at org.junit.runners.model.FrameworkMethod$1.runReflectiveCall(FrameworkMethod.java:50)
> 	at org.junit.internal.runners.model.ReflectiveCallable.run(ReflectiveCallable.java:12)
> 	at org.junit.runners.model.FrameworkMethod.invokeExplosively(FrameworkMethod.java:47)
> 	at org.junit.internal.runners.statements.InvokeMethod.evaluate(InvokeMethod.java:17)
> 	at org.junit.internal.runners.statements.RunBefores.evaluate(RunBefores.java:26)
> 	at org.junit.internal.runners.statements.RunAfters.evaluate(RunAfters.java:27)
> 	at org.apache.ignite.testframework.junits.GridAbstractTest$7.run(GridAbstractTest.java:2432)
> 	at java.lang.Thread.run(Thread.java:748)
> Caused by: org.apache.calcite.sql.parser.SqlParseException: Encountered " "::" ":: "" at line 1, column 12.
> Was expecting:
>     <EOF> 
> {noformat}
>  
>  Whereas vanilla {{CAST(null as interval day)}} works well.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)