[JBoss JIRA] (TEIID-3726) CTEs combined with constant values yield an error message
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3726?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3726.
---------------------------------
> CTEs combined with constant values yield an error message
> ---------------------------------------------------------
>
> Key: TEIID-3726
> URL: https://issues.jboss.org/browse/TEIID-3726
> Project: Teiid
> Issue Type: Bug
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.12, 8.11.5
>
>
> When a statement contains a WITH clause and then uses the defined table expression in combination with a constant expression for a column in the SELECT clause, different exceptions are thrown, depending on the datatype in the CTE.
> For example, running the following query:
> {code:sql}
> WITH tmp as
> (SELECT * FROM pg.test1 )
> SELECT 123 as col2, tmp.* FROM tmp
> {code}
> where pg.test1 has only one column of "string" datatype, this exception is thrown:
> {code:sql}
> 11:38:48,960 ERROR [org.teiid.TRANSPORT] (New I/O worker #1) TEIID40113 Unhandled exception, aborting operation: org.teiid.transport.ObjectEncoder$FailedWriteException: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.String". Please ensure that the column's modeled datatype matches the expected data.
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:136) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.9.Final-redhat-1.jar:3.6.9.Final-redhat-1]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.9.Final-redhat-1.jar:3.6.9.Final-redhat-1]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.9.Final-redhat-1.jar:3.6.9.Final-redhat-1]
> at org.teiid.transport.SSLAwareChannelHandler$ObjectChannelImpl.write(SSLAwareChannelHandler.java:93) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.transport.SocketClientInstance.send(SocketClientInstance.java:88) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.transport.ServerWorkItem.sendResult(ServerWorkItem.java:135) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.transport.ServerWorkItem$1.onCompletion(ServerWorkItem.java:105) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem.sendResultsIfNeeded(RequestWorkItem.java:984) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem$1.flushBatchDirect(RequestWorkItem.java:666) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.query.processor.BatchCollector.flushBatch(BatchCollector.java:223) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:194) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:462) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:344) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:271) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
> Caused by: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 0 doesn't match the runtime type "java.lang.String". Please ensure that the column's modeled datatype matches the expected data.
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:878) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.ResultsMessage.writeExternal(ResultsMessage.java:319) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1458) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) [rt.jar:1.7.0_67]
> at org.teiid.net.socket.Message.writeExternal(Message.java:61) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1458) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) [rt.jar:1.7.0_67]
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:131) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> ... 25 more
> Caused by: java.lang.ClassCastException: java.lang.String cannot be cast to java.lang.Integer
> at org.teiid.client.BatchSerializer$IntColumnSerializer.writeObject(BatchSerializer.java:563) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.BatchSerializer$ColumnSerializer.writeColumn(BatchSerializer.java:534) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:867) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> ... 36 more
> {code}
> If datatypes match, like in this query:
> {code:sql}
> WITH tmp as
> (SELECT * FROM pg.test1 )
> SELECT '123' as col2, tmp.* FROM tmp
> {code}
> a different exception is thrown:
> {code:sql}
> 11:41:22,456 ERROR [org.teiid.TRANSPORT] (New I/O worker #1) TEIID40113 Unhandled exception, aborting operation: org.teiid.transport.ObjectEncoder$FailedWriteException: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:136) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.9.Final-redhat-1.jar:3.6.9.Final-redhat-1]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.9.Final-redhat-1.jar:3.6.9.Final-redhat-1]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.9.Final-redhat-1.jar:3.6.9.Final-redhat-1]
> at org.teiid.transport.SSLAwareChannelHandler$ObjectChannelImpl.write(SSLAwareChannelHandler.java:93) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.transport.SocketClientInstance.send(SocketClientInstance.java:88) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.transport.ServerWorkItem.sendResult(ServerWorkItem.java:135) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.transport.ServerWorkItem$1.onCompletion(ServerWorkItem.java:105) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem.sendResultsIfNeeded(RequestWorkItem.java:984) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem$1.flushBatchDirect(RequestWorkItem.java:666) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.query.processor.BatchCollector.flushBatch(BatchCollector.java:223) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:194) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:462) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:344) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:271) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.0.Beta3.jar:8.12.0.Beta3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) [rt.jar:1.7.0_67]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
> Caused by: java.lang.IndexOutOfBoundsException: Index: 1, Size: 1
> at java.util.ArrayList.rangeCheck(ArrayList.java:635) [rt.jar:1.7.0_67]
> at java.util.ArrayList.get(ArrayList.java:411) [rt.jar:1.7.0_67]
> at org.teiid.client.BatchSerializer.writeIsNullData(BatchSerializer.java:476) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.BatchSerializer$ColumnSerializer.writeColumn(BatchSerializer.java:529) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:867) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at org.teiid.client.ResultsMessage.writeExternal(ResultsMessage.java:319) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1458) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) [rt.jar:1.7.0_67]
> at org.teiid.net.socket.Message.writeExternal(Message.java:61) [teiid-client-8.12.0.Beta3.jar:8.12.0.Beta3]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1458) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1429) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1177) [rt.jar:1.7.0_67]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:347) [rt.jar:1.7.0_67]
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:131) [teiid-runtime-8.12.0.Beta3.jar:8.12.0.Beta3]
> ... 25 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (TEIID-3490) WITH [TABLENAME] AS clause being sent to source query
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3490?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3490.
---------------------------------
> WITH [TABLENAME] AS clause being sent to source query
> -----------------------------------------------------
>
> Key: TEIID-3490
> URL: https://issues.jboss.org/browse/TEIID-3490
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
> Fix For: 8.7.1.6_2, 8.11, 8.7.4
>
>
> The transformation for that table is:
> WITH MONTHEND AS (SELECT CONVERT(SQLBqt.tinya.DateValue, DATE) AS REFERENCE_VALUE FROM SQLBqt.tinya WHERE SQLBqt.tinya.IntKey = 2)
> SELECT
> RATES.INTKEY, MAX(CASE WHEN RATES.INTKEY = 20 THEN RATES.STRINGKEY END) AS GBP_RATE, MAX(CASE WHEN RATES.INTKEY = 25 THEN RATES.STRINGKEY END) AS EUR_RATE, MAX(CASE WHEN RATES.INTKEY = 30 THEN RATES.STRINGKEY END) AS USD_RATE
> FROM
> Oraclebqt.dssmalla2 AS RATES
> WHERE
> (RATES.INTKEY IN (20, 25, 30)) AND (RATES.DATEVALUE = (SELECT MONTHEND.REFERENCE_VALUE FROM MONTHEND))
> GROUP BY RATES.INTKEY
> source queries are showing the With clause being pushed down to Oracle and they shouldn't be.
> 11:11:54,283 DEBUG [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue30) Vw26e70yOBmw.6.3.2 Processing NEW request: WITH MONTHEND (REFERENCE_VALUE) AS (SELECT CONVERT(g_0.DateValue, DATE) FROM SQLBqt.tinya AS g_0 WHERE g_0.IntKey = 2) SELECT g_0.INTKEY, MAX(CASE WHEN g_0.INTKEY = 20 THEN g_0.STRINGKEY END), MAX(CASE WHEN g_0.INTKEY = 25 THEN g_0.STRINGKEY END), MAX(CASE WHEN g_0.INTKEY = 30 THEN g_0.STRINGKEY END) FROM Oraclebqt.DSSMALLA2 AS g_0 WHERE (g_0.INTKEY IN (20, 25, 30)) AND (g_0.DATEVALUE = {d'2000-01-03'}) GROUP BY g_0.INTKEY
> 11:11:54,283 DEBUG [org.jboss.jca.core.connectionmanager.pool.strategy.OnePool] (Worker3_QueryProcessorQueue30) Oraclebqt: getConnection(null, WrappedConnectionRequestInfo@2efc4e0e[userName=bqt2]) [0/20]
> 11:11:54,283 INFO [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue30) OracleExecutionFactory Commit=true;DatabaseProductName=Oracle;DatabaseProductVersion=Oracle Database 11g Enterprise Edition Release 11.1.0.6.0 - 64bit Production
> With the Partitioning, OLAP, Data Mining and Real Application Testing options;DriverMajorVersion=11;DriverMajorVersion=2;DriverName=Oracle JDBC driver;DriverVersion=11.2.0.1.0;IsolationLevel=2
> 11:11:54,283 DEBUG [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue30) Vw26e70yOBmw.6.3.2 Obtained execution
> 11:11:54,283 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue30) START DATA SRC COMMAND: startTime=2015-05-22 11:11:54.283 requestID=Vw26e70yOBmw.6 sourceCommandID=3 executionID=2 txID=null modelName=Oraclebqt translatorName=oracle sessionID=Vw26e70yOBmw principal=teiiduser@teiid-security sql=WITH MONTHEND (REFERENCE_VALUE) AS (SELECT CONVERT(g_0.DateValue, DATE) FROM SQLBqt.tinya AS g_0 WHERE g_0.IntKey = 2) SELECT g_0.INTKEY, MAX(CASE WHEN g_0.INTKEY = 20 THEN g_0.STRINGKEY END), MAX(CASE WHEN g_0.INTKEY = 25 THEN g_0.STRINGKEY END), MAX(CASE WHEN g_0.INTKEY = 30 THEN g_0.STRINGKEY END) FROM Oraclebqt.DSSMALLA2 AS g_0 WHERE (g_0.INTKEY IN (20, 25, 30)) AND (g_0.DATEVALUE = {d'2000-01-03'}) GROUP BY g_0.INTKEY
> 11:11:54,285 DEBUG [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue30) Source-specific command: WITH MONTHEND AS (SELECT trunc(cast(g_0."DateValue" AS date)) AS REFERENCE_VALUE FROM "bqt2"."dbo"."tinya" g_0 WHERE g_0."IntKey" = 2) SELECT g_0."INTKEY", MAX(CASE WHEN g_0."INTKEY" = 20 THEN g_0."STRINGKEY" END), MAX(CASE WHEN g_0."INTKEY" = 25 THEN g_0."STRINGKEY" END), MAX(CASE WHEN g_0."INTKEY" = 30 THEN g_0."STRINGKEY" END) FROM "BQT2"."DSSMALLA2" g_0 WHERE g_0."INTKEY" IN (20, 25, 30) AND g_0."DATEVALUE" = {d '2000-01-03'} GROUP BY g_0."INTKEY"
> 11:11:54,285 TRACE [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue30) Source sql WITH MONTHEND AS (SELECT trunc(cast(g_0."DateValue" AS date)) AS REFERENCE_VALUE FROM "bqt2"."dbo"."tinya" g_0 WHERE g_0."IntKey" = 2) SELECT g_0."INTKEY", MAX(CASE WHEN g_0."INTKEY" = 20 THEN g_0."STRINGKEY" END), MAX(CASE WHEN g_0."INTKEY" = 25 THEN g_0."STRINGKEY" END), MAX(CASE WHEN g_0."INTKEY" = 30 THEN g_0."STRINGKEY" END) FROM "BQT2"."DSSMALLA2" g_0 WHERE g_0."INTKEY" IN (20, 25, 30) AND g_0."DATEVALUE" = {d '2000-01-03'} GROUP BY g_0."INTKEY"
> 11:11:55,514 DEBUG [org.teiid.COMMAND_LOG] (Worker3_QueryProcessorQueue30) ERROR SRC COMMAND: endTime=2015-05-22 11:11:55.514 requestID=Vw26e70yOBmw.6 sourceCommandID=3 executionID=2 txID=null modelName=Oraclebqt translatorName=oracle sessionID=Vw26e70yOBmw principal=teiiduser@teiid-security finalRowCount=null
> 11:11:55,514 WARN [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue30) Connector worker process failed for atomic-request=Vw26e70yOBmw.6.3.2: org.teiid.translator.jdbc.JDBCExecutionException: 907 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: WITH MONTHEND AS (SELECT trunc(cast(g_0."DateValue" AS date)) AS REFERENCE_VALUE FROM "bqt2"."dbo"."tinya" g_0 WHERE g_0."IntKey" = 2) SELECT g_0."INTKEY", MAX(CASE WHEN g_0."INTKEY" = 20 THEN g_0."STRINGKEY" END), MAX(CASE WHEN g_0."INTKEY" = 25 THEN g_0."STRINGKEY" END), MAX(CASE WHEN g_0."INTKEY" = 30 THEN g_0."STRINGKEY" END) FROM "BQT2"."DSSMALLA2" g_0 WHERE g_0."INTKEY" IN (20, 25, 30) AND g_0."DATEVALUE" = {d '2000-01-03'} GROUP BY g_0."INTKEY"]
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (TEIID-3689) StaxSource error with a comment
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3689?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3689.
---------------------------------
> StaxSource error with a comment
> -------------------------------
>
> Key: TEIID-3689
> URL: https://issues.jboss.org/browse/TEIID-3689
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
>
> Having a stax source such as a streaming result from a web service that is processed by xmltable that contains comments will result in an exception such as:
> 14:39:23,673 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) TEIID30019 Unexpected exception for request Wel3MG40y9Hs.0: java.lang.UnsupportedOperationException: append() method is not supported in this class
> at net.sf.saxon.event.ProxyReceiver.append(ProxyReceiver.java:229) [saxonhe-9.2.1.5.jar:]
> at net.sf.saxon.evpull.EventIteratorToReceiver.copy(EventIteratorToReceiver.java:50) [saxonhe-9.2.1.5.jar:]
> at net.sf.saxon.event.Sender.sendPullEventSource(Sender.java:523) [saxonhe-9.2.1.5.jar:]
> at net.sf.saxon.event.Sender.send(Sender.java:148) [saxonhe-9.2.1.5.jar:]
> at net.sf.saxon.Configuration.buildDocument(Configuration.java:3317) [saxonhe-9.2.1.5.jar:]
> at net.sf.saxon.Configuration.buildDocument(Configuration.java:3262) [saxonhe-9.2.1.5.jar:]
> at org.teiid.query.xquery.saxon.XQueryEvaluator.evaluateXQuery(XQueryEvaluator.java:152) [teiid-engine-8.7.3.redhat-2.jar:8.7.3.redhat-2]
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (TEIID-3691) Add ability to set escape tokens within literals
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3691?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3691.
---------------------------------
> Add ability to set escape tokens within literals
> ------------------------------------------------
>
> Key: TEIID-3691
> URL: https://issues.jboss.org/browse/TEIID-3691
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Reporter: Don Krapohl
> Assignee: Steven Hawkins
>
> A mismatch of escape sequences exists between Teiid and some databases (Impala for sure). Teiid uses doubled up quotes for single/double whereas some databases expect C-style escapes like \' or \". When string literals are pushed down they fail to parse on the underlying database using Teiid's escapes.
> Teiid uses multiple quotes to escape a single within a string literal. Example would be searching for the string literal Haggley's within single quotes. In Teiid the parser will fail with a parser error using any of these options:
> * Surround with double quotes ("Haggley's")
> * Escape with C-style escape ('Haggley\'s')
> Making the query parse in Teiid the filter value would be 'Haggley''s'. When pushed down into the database this is not valid syntax and should be translated as 'Haggley\'s' or other escape sequence as appropriate to the underlying data store.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (TEIID-3536) Infinispan-dsl-cache translator: Can't delete or update rows which were previously inserted through hotrod protocol
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3536?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3536.
---------------------------------
> Infinispan-dsl-cache translator: Can't delete or update rows which were previously inserted through hotrod protocol
> -------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-3536
> URL: https://issues.jboss.org/browse/TEIID-3536
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Reporter: Filip Elias
> Assignee: Steven Hawkins
> Fix For: 8.7.1.6_2, 8.12
>
> Attachments: server1.log, server2.log
>
>
> Rows which have been inserted into cache directly through hotrod protocol can't be deleted or updated (update command returns correct number of rows to be updated but no rows are actually updated) using the Infinispan-dsl-cache translator.
> If the rows are inserted through Infinispan-dsl-cache translator, then they can be deleted or updated.
> Server1.log contains logs for an attempt to delete row which was previously directly inserted through hotrod protocol. It contains logs for two queries:
> 1, select * from smalla where intkey = 10 (returns 1 row)
> 2, delete from smalla where intkey = 10 (deletes 0 rows)
> Server2.log contains logs for an attempt to delete row which was inserted using the Infinispan-dsl-cache translator. It contains logs for two queries:
> 1, insert into smalla(intKey, stringKey,booleanValue) values(141,'ss',false) (correctly inserts 1 row)
> 2, delete from smalla where intkey = 10 (correctly deletes 1 row)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (TEIID-3646) Teiid Result Set Caching OPTION NOCACHE problem
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3646?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3646.
---------------------------------
> Teiid Result Set Caching OPTION NOCACHE problem
> -----------------------------------------------
>
> Key: TEIID-3646
> URL: https://issues.jboss.org/browse/TEIID-3646
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.7.1.6_2
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
>
> When using 'OPTION NOCACHE' in a query, there are probably still cached results for the query.
> The tested query:
> {code:sql}
> /*+ cache */ SELECT * FROM Customers OPTION NOCACHE
> {code}
> Test scenario:
> Insert value into db, directly through its jdbc driver:
> {code:sql}INSERT INTO Customers VALUES(1, 'name1'){code}
> Check via teiid, that query returns one row. This result set should not be cached.
> {code:sql}/*+ cache */ SELECT * FROM Customers OPTION NOCACHE{code}
> Insert another row into db, via its jdbc driver, not through teiid:
> {code:sql}INSERT INTO Customers VALUES(2, 'name2'){code}
> Check that this query returns again current state of db (2 rows) now:
> {code:sql}/*+ cache */ SELECT * FROM Customers OPTION NOCACHE{code}
> But this check fails, teiid returns only one row, seemingly the result set for query with 'OPTION NOCACHE' gets cached.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months
[JBoss JIRA] (TEIID-3704) ROUND() function fails when pushed down to PostgreSQL with real/double precision datatypes
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3704?page=com.atlassian.jira.plugin... ]
Steven Hawkins closed TEIID-3704.
---------------------------------
> ROUND() function fails when pushed down to PostgreSQL with real/double precision datatypes
> -------------------------------------------------------------------------------------------
>
> Key: TEIID-3704
> URL: https://issues.jboss.org/browse/TEIID-3704
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 7.7
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 8.12
>
>
> I defined in PostgreSQL the following table:
> {code:sql}
> CREATE TABLE round_test
> (
> col1 real,
> col2 double precision
> )
> {code}
> Running one of these queries:
> {code:sql}
> select ROUND(col1,1) FROM pg.round_test;
> select ROUND(col2,1) FROM pg.round_test;
> {code}
> the ROUND function is pushed down to PostgreSQL that throws the following exceptions, respectively:
> {code:sql}
> 13:32:45,934 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue30) DoIZjz21JLyd Connector worker process failed for atomic-request=DoIZjz21JLyd.13.0.3: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT round(g_0."col1", 1) AS c_0 FROM "public"."round_test" AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.0.Beta1.jar:8.12.0.Beta1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:349)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_67]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_67]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_67]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_67]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy47.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_67]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> 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:1145) [rt.jar:1.7.0_67]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
> Caused by: org.postgresql.util.PSQLException: ERROR: function round(real, integer) does not exist
> HINT: No function matches the given name and argument types. You might need to add explicit type casts.
> Position: 8
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) [translator-jdbc-8.12.0.Beta1.jar:8.12.0.Beta1]
> ... 18 more
> {code}
> and
> {code:sql}
> 13:33:25,912 WARN [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue30) DoIZjz21JLyd Connector worker process failed for atomic-request=DoIZjz21JLyd.13.0.3: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT round(g_0."col2", 1) AS c_0 FROM "public"."round_test" AS g_0]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.0.Beta1.jar:8.12.0.Beta1]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:349)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.7.0_67]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57) [rt.jar:1.7.0_67]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.7.0_67]
> at java.lang.reflect.Method.invoke(Method.java:606) [rt.jar:1.7.0_67]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy47.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262) [rt.jar:1.7.0_67]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> 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:1145) [rt.jar:1.7.0_67]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) [rt.jar:1.7.0_67]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.7.0_67]
> Caused by: org.postgresql.util.PSQLException: ERROR: function round(double precision, integer) does not exist
> HINT: No function matches the given name and argument types. You might need to add explicit type casts.
> Position: 8
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:462)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123) [translator-jdbc-8.12.0.Beta1.jar:8.12.0.Beta1]
> ... 18 more
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
9 years, 2 months