[JBoss JIRA] (TEIID-5119) Osisoft Translator - Teiid pushes cast from Timestamp to Time
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5119?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5119:
-------------------------------------
Thanks [~shawkins] with above comment I could even solve TEIID-5117. I never used convert(int, int) before, or do not remember using.
> Osisoft Translator - Teiid pushes cast from Timestamp to Time
> -------------------------------------------------------------
>
> Key: TEIID-5119
> URL: https://issues.jboss.org/browse/TEIID-5119
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Priority: Critical
>
> Osisoft PI does not support conversion from Timestamp to Time, however, query such as
> {code:sql}
> select cast(timestampvalue as time) from source.smalla
> {code}
> is pushed as
> {code:sql}
> SELECT cast(g_0.TimestampValue AS Time) FROM dvqe..SmallA AS g_0
> {code}
> which results in the following stack trace:
> {noformat}
> (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
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (TEIID-5119) Osisoft Translator - Teiid pushes cast from Timestamp to Time
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5119?page=com.atlassian.jira.plugin... ]
Work on TEIID-5119 started by Ramesh Reddy.
-------------------------------------------
> Osisoft Translator - Teiid pushes cast from Timestamp to Time
> -------------------------------------------------------------
>
> Key: TEIID-5119
> URL: https://issues.jboss.org/browse/TEIID-5119
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Priority: Critical
>
> Osisoft PI does not support conversion from Timestamp to Time, however, query such as
> {code:sql}
> select cast(timestampvalue as time) from source.smalla
> {code}
> is pushed as
> {code:sql}
> SELECT cast(g_0.TimestampValue AS Time) FROM dvqe..SmallA AS g_0
> {code}
> which results in the following stack trace:
> {noformat}
> (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
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (TEIID-5119) Osisoft Translator - Teiid pushes cast from Timestamp to Time
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5119?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5119:
-------------------------------------
Thanks [~shawkins]. Found that I can do
{code}
SELECT cast(format(g_0.TimestampValue, 'hh:mm:ss.fff') as Time) AS c_0 FROM dvqe..SmallA AS g_0
{code}
Which seems to work.
> Osisoft Translator - Teiid pushes cast from Timestamp to Time
> -------------------------------------------------------------
>
> Key: TEIID-5119
> URL: https://issues.jboss.org/browse/TEIID-5119
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Priority: Critical
>
> Osisoft PI does not support conversion from Timestamp to Time, however, query such as
> {code:sql}
> select cast(timestampvalue as time) from source.smalla
> {code}
> is pushed as
> {code:sql}
> SELECT cast(g_0.TimestampValue AS Time) FROM dvqe..SmallA AS g_0
> {code}
> which results in the following stack trace:
> {noformat}
> (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
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (TEIID-5093) Amazon s3 csv/xml lookup querry exception
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5093?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5093:
---------------------------------------
After TEIID-5121 this exception will not occur, but I still want to use this issue to consider if S3 should be returning streaming lobs by default.
> Amazon s3 csv/xml lookup querry exception
> -----------------------------------------
>
> Key: TEIID-5093
> URL: https://issues.jboss.org/browse/TEIID-5093
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Mario Majernik
> Assignee: Steven Hawkins
> Priority: Blocker
>
> Querry :
> {code:java}
> SELECT IntKey, StringKey, lookup('BQT1.SmallB', 'DoubleNum', 'IntKey', IntKey) AS DoubleNum FROM BQT1.SmallA UNION SELECT IntKey, lookup('BQT1.SmallA', 'StringKey', 'IntKey', IntKey) AS StringKey, DoubleNum FROM BQT1.SmallA
> {code}
> returns TeiidSQLException for csv and xml files from amazon s3.
> Stacktrace:
> {code:java}
> WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue41) TEIID30020 Processing exception for request 8O9K6VJIjd9y.7 'TEIID30180 java.sql.SQLException: java.sql.SQLException: TEIID60019 Streaming result has already been read once. Ensure that only one read operation needs to be performed, for example XMLPARSE without the WELLFORMED operation must read the entire stream to validate its contents. Or you may choose to use a non-streaming result. '. Originally TeiidProcessingException BinaryWSProcedureExecution.java:78. Enable more detailed logging to see the entire stacktrace.
> {code}
> Teiid command log for querry:
> {code:java}
> 15:11:34,160 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) 8O9K6VJIjd9y START USER COMMAND: startTime=2017-10-09 15:11:34.16 requestID=8O9K6VJIjd9y.7 txID=null sessionID=8O9K6VJIjd9y applicationName=JDBC principal=user@teiid-security vdbName=csv vdbVersion=1 sql=SELECT IntKey, StringKey, lookup('BQT1.SmallB', 'DoubleNum', 'IntKey', IntKey) AS DoubleNum FROM BQT1.SmallA UNION SELECT IntKey, lookup('BQT1.SmallA', 'StringKey', 'IntKey', IntKey) AS StringKey, DoubleNum FROM BQT1.SmallA
> 15:11:34,192 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue40) 8O9K6VJIjd9y START DATA SRC COMMAND: startTime=2017-10-09 15:11:34.192 requestID=8O9K6VJIjd9y.7 sourceCommandID=6 executionID=2 txID=null modelName=sourceModel translatorName=user-s3 sessionID=8O9K6VJIjd9y principal=user@teiid-security sql=EXEC sourceModel.getTextFile('csv/smallaCsv.csv')
> 15:11:34,856 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue41) 8O9K6VJIjd9y END SRC COMMAND: endTime=2017-10-09 15:11:34.856 requestID=8O9K6VJIjd9y.7 sourceCommandID=6 executionID=2 txID=null modelName=sourceModel translatorName=user-s3 sessionID=8O9K6VJIjd9y principal=user@teiid-security finalRowCount=1 cpuTime(ns)=34673443
> 15:11:34,862 INFO [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue41) 8O9K6VJIjd9y ERROR USER COMMAND: endTime=2017-10-09 15:11:34.862 requestID=8O9K6VJIjd9y.7 txID=null sessionID=8O9K6VJIjd9y principal=user@teiid-security vdbName=csv vdbVersion=1 finalRowCount=null
> 15:11:34,876 INFO [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue41) 8O9K6VJIjd9y END USER COMMAND: endTime=2017-10-09 15:11:34.876 requestID=8O9K6VJIjd9y.7 txID=null sessionID=8O9K6VJIjd9y principal=user@teiid-security vdbName=csv vdbVersion=1 finalRowCount=0
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (TEIID-5118) Osisoft Translator - NPE when using ORDER BY
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5118?page=com.atlassian.jira.plugin... ]
Work on TEIID-5118 started by Ramesh Reddy.
-------------------------------------------
> Osisoft Translator - NPE when using ORDER BY
> --------------------------------------------
>
> Key: TEIID-5118
> URL: https://issues.jboss.org/browse/TEIID-5118
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Priority: Critical
> Attachments: osisoft-pi-vdb.xml
>
>
> Any query with an ORDER BY clause run against Osisoft PI datasource fails with a NullPointerException
> Stack trace:
> {noformat}
> 10:17:09,235 ERROR [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue17) Connector worker process failed for atomic-request=mcBkcBzOiieD.5.0.5: java.lang.NullPointerException
> at org.teiid.translator.jdbc.pi.PISQLConversionVisitor.visit(PISQLConversionVisitor.java:157) [translator-jdbc-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.language.ColumnReference.acceptVisitor(ColumnReference.java:72) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:91) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.SQLConversionVisitor.append(SQLConversionVisitor.java:130) [translator-jdbc-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.language.visitor.SQLStringVisitor.visit(SQLStringVisitor.java:737) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.SortSpecification.acceptVisitor(SortSpecification.java:53) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:91) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.SQLConversionVisitor.append(SQLConversionVisitor.java:130) [translator-jdbc-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:102) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.visit(SQLStringVisitor.java:733) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.OrderBy.acceptVisitor(OrderBy.java:45) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:91) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.SQLConversionVisitor.append(SQLConversionVisitor.java:130) [translator-jdbc-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.language.visitor.SQLStringVisitor.visit(SQLStringVisitor.java:790) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.Select.acceptVisitor(Select.java:110) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:91) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.SQLConversionVisitor.append(SQLConversionVisitor.java:130) [translator-jdbc-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.translator.jdbc.TranslatedCommand.translateCommand(TranslatedCommand.java:76) [translator-jdbc-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.translator.jdbc.JDBCBaseExecution.translateCommand(JDBCBaseExecution.java:120) [translator-jdbc-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:114) [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$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_141]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> 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]
> {noformat}
> I tried remote debugging the server process and it appears that when running query such as
> {code:sql}
> SELECT FloatNum FROM BQT1.SmallA ORDER BY FloatNum ASC
> {code}
> the PISQLConversionVisitor.visit(ColumnReference obj) is called twice, the first time the ColumnReference object has value "g_0.FloatNum" and all fields set, the second time the object has only name set to "c_2" and nothing else (table, metadata object etc).
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (TEIID-5119) Osisoft Translator - Teiid pushes cast from Timestamp to Time
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5119?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5119:
---------------------------------------
[~rareddy] you can use the convert modifier if there is a way to emulate support. If there is not, then use the supportsConvert method to prevent pushdown of this particular conversion.
> Osisoft Translator - Teiid pushes cast from Timestamp to Time
> -------------------------------------------------------------
>
> Key: TEIID-5119
> URL: https://issues.jboss.org/browse/TEIID-5119
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Priority: Critical
>
> Osisoft PI does not support conversion from Timestamp to Time, however, query such as
> {code:sql}
> select cast(timestampvalue as time) from source.smalla
> {code}
> is pushed as
> {code:sql}
> SELECT cast(g_0.TimestampValue AS Time) FROM dvqe..SmallA AS g_0
> {code}
> which results in the following stack trace:
> {noformat}
> (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
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (TEIID-5119) Osisoft Translator - Teiid pushes cast from Timestamp to Time
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5119?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5119:
-------------------------------------
[~shawkins] Is there a way to prevent this on ConvertModifier?
> Osisoft Translator - Teiid pushes cast from Timestamp to Time
> -------------------------------------------------------------
>
> Key: TEIID-5119
> URL: https://issues.jboss.org/browse/TEIID-5119
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Priority: Critical
>
> Osisoft PI does not support conversion from Timestamp to Time, however, query such as
> {code:sql}
> select cast(timestampvalue as time) from source.smalla
> {code}
> is pushed as
> {code:sql}
> SELECT cast(g_0.TimestampValue AS Time) FROM dvqe..SmallA AS g_0
> {code}
> which results in the following stack trace:
> {noformat}
> (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
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (TEIID-5120) Osisoft Translator - Wrong pushdown of LENGTH function
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5120?page=com.atlassian.jira.plugin... ]
Work on TEIID-5120 started by Ramesh Reddy.
-------------------------------------------
> Osisoft Translator - Wrong pushdown of LENGTH function
> ------------------------------------------------------
>
> Key: TEIID-5120
> URL: https://issues.jboss.org/browse/TEIID-5120
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
>
> The LENGTH function is pushed down to Osisoft PI as-is, but fails on the datasource with
> {noformat}
> com.osisoft.rdsa.RdsaException: [PIOLEDBENT] [SQL Analyzer] [Line 0:4294967295] Function name 'length' is invalid.
> {noformat}
> This seems to be a mistake in PI OLEDB Enterprise 2016 User Guide, as this document mentions on page 32 that LENGTH is an alias for LEN.
> However, since LEN actually works, I suggest changing the pushdown in teiid as a workaround.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months
[JBoss JIRA] (TEIID-5117) Osisoft Translator - Casting to bigdecimal results in NULL value
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5117?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5117:
-------------------------------------
[~asmigala] So, in the first case with casting as BigDecimal, the cast is applied at the engine level. I think maybe NULLs are coming from TEIID-5116 in that case. We should apply a patch and verify.
> Osisoft Translator - Casting to bigdecimal results in NULL value
> ----------------------------------------------------------------
>
> Key: TEIID-5117
> URL: https://issues.jboss.org/browse/TEIID-5117
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
>
> Casting any value obtained from an Osisoft PI datasource results in NULL, regardless of the original value.
> E.g. a query such as
> {code:sql}
> select cast(stringnum as bigdecimal), cast(intnum as bigdecimal), cast(shortvalue as bigdecimal) from Source.smalla
> {code}
> returns result set full of NULLs.
> The SOURCE SRC COMMAND in teiid-command.log for this query is however
> {code:sql}
> SELECT g_0.StringNum, g_0.IntNum, g_0.ShortValue FROM dvqe..SmallA AS g_0
> {code}
> i.e. the cast is not pushed down (as Osisoft doesn't support bigdecimal datatype).
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
7 years, 2 months