Uploaded image for project: 'Teiid'
  1. Teiid
  2. TEIID-5126

Osisoft translator - SUBSTRING fails when start > string length

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Won't Fix
    • Affects Version/s: 8.12.11.6_4
    • Fix Version/s: 10.1
    • Component/s: JDBC Driver
    • Labels:
      None

      Description

      Calling a query such as

      SELECT cast(TIMESTAMPVALUE as string), SUBSTRING(TIMESTAMPVALUE, 22, 0) FROM BQT1.SmallA
      

      fails with the following (the length of timestampvalue converted to string is 20):

      Connector worker process failed for atomic-request=HOiQATHW3fPH.12.0.9: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT TOP 100 cast(g_0.TimestampValue AS String) AS c_0, SUBSTR(cast(g_0.TimestampValue AS String), 22, 0) AS c_1 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$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]
      Caused by: java.sql.SQLException: [PIOLEDBENT] Arguments are invalid.
              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]
              ... 18 more
      Caused by: com.osisoft.rdsa.RdsaException: [PIOLEDBENT] Arguments are invalid.
              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)
              ... 20 more
      

      This appears to be an issue with the SUBSTR implementation on the PI server, we are ok with either a workaround or documenting as KI.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                rareddy Ramesh Reddy
                Reporter:
                asmigala Andrej Šmigala
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: