Uploaded image for project: 'ModeShape'
  1. ModeShape
  2. MODE-2220

using uppercase() on transform_withSQL.transform_selectSQL generates error

    Details

    • Steps to Reproduce:
      Hide

      publish a teiid view model with a sql select transformation.

      issue a query including a ucase on the column with a like '%<SEARCH>%'

      Show
      publish a teiid view model with a sql select transformation. issue a query including a ucase on the column with a like '%<SEARCH>%'

      Description

      following is stack trace when performing a search using LIKE and ucase on modeshape table/column:

      14:27:48,921 WARN  [org.teiid.CONNECTOR] (Worker39_QueryProcessorQueue1816) Connector worker process failed for atomic-request=WpidMF9SD0dt.4.0.367: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0."jcr:name", g_0."jcr:path", g_0."jcr:score", g_0."mode:depth", g_0."mode:localName", g_0."transform:deleteAllowed", g_0."transform:deleteSql", g_0."transform:deleteSqlDefault", g_0."transform:insertAllowed", g_0."transform:insertSql", g_0."transform:insertSqlDefault", g_0."transform:outputLocked", g_0."transform:selectSql", g_0."transform:updateAllowed", g_0."transform:updateSql", g_0."transform:updateSqlDefault" FROM "transform:withSql" AS g_0 WHERE UpperCase(g_0."transform:selectSql") LIKE '%ORDER_EPPO_PUBKEY%']
      	at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:88)
      	at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:312) [teiid-engine-8.4.1-redhat-7.jar:8.4.1-redhat-7]
      	at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:301) [teiid-engine-8.4.1-redhat-7.jar:8.4.1-redhat-7]
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:113) [teiid-engine-8.4.1-redhat-7.jar:8.4.1-redhat-7]
      	at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110) [teiid-engine-8.4.1-redhat-7.jar:8.4.1-redhat-7]
      	at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_60]
      	at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58) [teiid-engine-8.4.1-redhat-7.jar:8.4.1-redhat-7]
      	at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:269) [teiid-engine-8.4.1-redhat-7.jar:8.4.1-redhat-7]
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.4.1-redhat-7.jar:8.4.1-redhat-7]
      	at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214) [teiid-engine-8.4.1-redhat-7.jar:8.4.1-redhat-7]
      	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_60]
      	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_60]
      	at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_60]
      Caused by: java.sql.SQLException: The JCR-SQL2 query "SELECT g_0."jcr:name", g_0."jcr:path", g_0."jcr:score", g_0."mode:depth", g_0."mode:localName", g_0."transform:deleteAllowed", g_0."transform:deleteSql", g_0."transform:deleteSqlDefault", g_0."transform:insertAllowed", g_0."transform:insertSql", g_0."transform:insertSqlDefault", g_0."transform:outputLocked", g_0."transform:selectSql", g_0."transform:updateAllowed", g_0."transform:updateSql", g_0."transform:updateSqlDefault" FROM "transform:withSql" AS g_0 WHERE UpperCase(g_0."transform:selectSql") LIKE '%ORDER_EPPO_PUBKEY%'" is not well-formed: Expecting a constraint, but found 'UpperCase' at line 1, column 467
      	at org.modeshape.jdbc.JcrStatement.execute(JcrStatement.java:433)
      	at org.modeshape.jdbc.JcrStatement.executeQuery(JcrStatement.java:479)
      	at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
      	at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:80)
      	... 12 more
      Caused by: javax.jcr.query.InvalidQueryException: The JCR-SQL2 query "SELECT g_0."jcr:name", g_0."jcr:path", g_0."jcr:score", g_0."mode:depth", g_0."mode:localName", g_0."transform:deleteAllowed", g_0."transform:deleteSql", g_0."transform:deleteSqlDefault", g_0."transform:insertAllowed", g_0."transform:insertSql", g_0."transform:insertSqlDefault", g_0."transform:outputLocked", g_0."transform:selectSql", g_0."transform:updateAllowed", g_0."transform:updateSql", g_0."transform:updateSqlDefault" FROM "transform:withSql" AS g_0 WHERE UpperCase(g_0."transform:selectSql") LIKE '%ORDER_EPPO_PUBKEY%'" is not well-formed: Expecting a constraint, but found 'UpperCase' at line 1, column 467
      	at org.modeshape.jcr.JcrQueryManager.createQuery(JcrQueryManager.java:146)
      	at org.modeshape.jcr.JcrQueryManager.createQuery(JcrQueryManager.java:101)
      	at org.modeshape.jdbc.delegate.LocalRepositoryDelegate.execute(LocalRepositoryDelegate.java:139)
      	at org.modeshape.jdbc.JcrStatement.execute(JcrStatement.java:429)
      	... 15 more
      
      14:27:48,931 WARN  [org.teiid.PROCESSOR] (Worker38_QueryProcessorQueue1817) TEIID30020 Processing exception for request WpidMF9SD0dt.4 'TEIID30504 New_ModeShape: 0 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT g_0."jcr:name", g_0."jcr:path", g_0."jcr:score", g_0."mode:depth", g_0."mode:localName", g_0."transform:deleteAllowed", g_0."transform:deleteSql", g_0."transform:deleteSqlDefault", g_0."transform:insertAllowed", g_0."transform:insertSql", g_0."transform:insertSqlDefault", g_0."transform:outputLocked", g_0."transform:selectSql", g_0."transform:updateAllowed", g_0."transform:updateSql", g_0."transform:updateSqlDefault" FROM "transform:withSql" AS g_0 WHERE UpperCase(g_0."transform:selectSql") LIKE '%ORDER_EPPO_PUBKEY%']'. Originally TeiidProcessingException 'The JCR-SQL2 query "SELECT g_0."jcr:name", g_0."jcr:path", g_0."jcr:score", g_0."mode:depth", g_0."mode:localName", g_0."transform:deleteAllowed", g_0."transform:deleteSql", g_0."transform:deleteSqlDefault", g_0."transform:insertAllowed", g_0."transform:insertSql", g_0."transform:insertSqlDefault", g_0."transform:outputLocked", g_0."transform:selectSql", g_0."transform:updateAllowed", g_0."transform:updateSql", g_0."transform:updateSqlDefault" FROM "transform:withSql" AS g_0 WHERE UpperCase(g_0."transform:selectSql") LIKE '%ORDER_EPPO_PUBKEY%'" is not well-formed: Expecting a constraint, but found 'UpperCase' at line 1, column 467' JcrQueryManager.java:146. Enable more detailed logging to see the entire stacktrace.
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                hchiorean Horia Chiorean
                Reporter:
                virtualdatabase Tom Johnston
              • Votes:
                0 Vote for this issue
                Watchers:
                4 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: