-
Bug
-
Resolution: Done
-
Critical
-
8.12.11.6_4
Osisoft PI does not support conversion from Timestamp to Time, however, query such as
select cast(timestampvalue as time) from source.smalla
is pushed as
SELECT cast(g_0.TimestampValue AS Time) FROM dvqe..SmallA AS g_0
which results in the following stack trace:
(Worker4_QueryProcessorQueue25) Connector worker process failed for atomic-request=mrbob+Ekp30a.0.0.13: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT cast(g_0.TimestampValue AS Time) FROM dvqe..SmallA AS g_0] at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.11.6_4.jar:8.12.11.6_4] at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:363) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_141] at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_141] at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141] at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141] at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) at com.sun.proxy.$Proxy79.execute(Unknown Source) at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:142) at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391) at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281) at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280) at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_141] at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_141] at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_141] Caused by: java.sql.SQLException: [PIOLEDBENT] [SQL Analyzer] [Line 1:6] Cannot cast 'DateTime' to 'Time'. at com.osisoft.jdbc.StatementImpl.executeQuery(StatementImpl.java:360) at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344) at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119) [translator-jdbc-8.12.11.6_4.jar:8.12.11.6_4] ... 26 more Caused by: com.osisoft.rdsa.RdsaException: [PIOLEDBENT] [SQL Analyzer] [Line 1:6] Cannot cast 'DateTime' to 'Time'. at com.osisoft.rdsa.Command.ExecuteReader(Native Method) at com.osisoft.rdsa.Command.executeReader(Command.java:79) at com.osisoft.jdbc.StatementImpl.executeQuery(StatementImpl.java:356) ... 28 more