[JBoss JIRA] (TEIID-5020) Join query results in NullPointerException
by Johnathon Lee (JIRA)
[ https://issues.jboss.org/browse/TEIID-5020?page=com.atlassian.jira.plugin... ]
Johnathon Lee updated TEIID-5020:
---------------------------------
Fix Version/s: 8.12.13.6_3
> Join query results in NullPointerException
> ------------------------------------------
>
> Key: TEIID-5020
> URL: https://issues.jboss.org/browse/TEIID-5020
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.11.6_3, 9.3.2
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
> Fix For: 10.0, 9.3.3, 8.12.13.6_3
>
>
> Running Join query results in NPE:
> 10:36:06,836 ERROR [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue17) TEIID30019 Unexpected exception for request KuTljjNz7YSM.1: java.lang.NullPointerException
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:423) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:415) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:491) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:399) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:276) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:223) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:243) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.datamgr.LanguageBridgeFactory.translate(LanguageBridgeFactory.java:186) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.<init>(ConnectorWorkItem.java:176) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.datamgr.ConnectorManager.registerRequest(ConnectorManager.java:203) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.process.DataTierManagerImpl.registerRequest(DataTierManagerImpl.java:997) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.tempdata.TempTableDataManager.registerRequest(TempTableDataManager.java:179) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.AccessNode.registerRequest(AccessNode.java:497) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.AccessNode.openInternal(AccessNode.java:265) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.AccessNode.open(AccessNode.java:168) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.RelationalNode.open(RelationalNode.java:254) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.UnionAllNode.open(UnionAllNode.java:123) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.JoinStrategy.openRight(JoinStrategy.java:105) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:231) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:102) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:150) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:281) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.11.6_3-redhat-3.jar:8.12.11.6_3-redhat-3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_131]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_131]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5037) Couchbase UNION doesn't work correctly
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5037?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5037.
-----------------------------------
Fix Version/s: 10.0
8.12.x-6.4
9.3.3
Resolution: Done
The visitor was holding state from the first branch that bled into the second. This was updated so that each is rendered in isolation.
> Couchbase UNION doesn't work correctly
> --------------------------------------
>
> Key: TEIID-5037
> URL: https://issues.jboss.org/browse/TEIID-5037
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 10.0, 8.12.x-6.4, 9.3.3
>
>
> UNION operator is returning correct data.
> {code:sql|title=query_smalla}
> SELECT IntKey, ShortValue FROM BQT1.SmallA WHERE ShortValue = -32745
> {code}
> || IntKey || ShortValue ||
> | 23 | -32745 |
> {code:sql|title=query_smallb}
> SELECT IntKey, ShortValue FROM BQT2.SmallB WHERE ShortValue = -32750
> {code}
> || IntKey || ShortValue ||
> | 18 | -32750 |
> {code:sql|title=query_union}
> SELECT IntKey, ShortValue FROM BQT1.SmallA WHERE ShortValue = -32745 UNION SELECT IntKey, ShortValue FROM BQT2.SmallB WHERE ShortValue = -32750
> {code}
> || IntKey || ShortValue ||
> | <null> | -32750 |
> | 23 | -32745 |
> {code:title=teiid-command.log}
> 14:19:54,385 INFO [org.teiid.COMMAND_LOG] (New I/O worker #3) nxUTZWzvm0Te START USER COMMAND: startTime=2017-08-25 14:19:54.385 requestID=nxUTZWzvm0Te.9 txID=null sessionID=nxUTZWzvm0Te applicationName=JDBC principal=user@teiid-security vdbName=couchbase vdbVersion=1 sql=SELECT IntKey, ShortValue FROM BQT1.SmallA WHERE ShortValue = -32745 UNION SELECT IntKey, ShortValue FROM BQT2.SmallB WHERE ShortValue = -32750
> 14:19:54,389 DEBUG [org.teiid.COMMAND_LOG] (Worker78_QueryProcessorQueue660) nxUTZWzvm0Te START DATA SRC COMMAND: startTime=2017-08-25 14:19:54.389 requestID=nxUTZWzvm0Te.9 sourceCommandID=0 executionID=158 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=nxUTZWzvm0Te principal=user@teiid-security sql=SELECT Couchbase_small.SmallA.IntKey AS c_0, convert(Couchbase_small.SmallA.ShortValue, short) AS c_1 FROM Couchbase_small.SmallA WHERE convert(Couchbase_small.SmallA.ShortValue, short) = -32745 UNION SELECT Couchbase_small.SmallB.IntKey AS c_0, convert(Couchbase_small.SmallB.ShortValue, short) AS c_1 FROM Couchbase_small.SmallB WHERE convert(Couchbase_small.SmallB.ShortValue, short) = -32750
> 14:19:54,390 DEBUG [org.teiid.COMMAND_LOG] (Worker78_QueryProcessorQueue660) nxUTZWzvm0Te SOURCE SRC COMMAND: endTime=2017-08-25 14:19:54.39 requestID=nxUTZWzvm0Te.9 sourceCommandID=0 executionID=158 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=nxUTZWzvm0Te principal=user@teiid-security sourceCommand=[SELECT `$cb_c1_IntKey`, TONUMBER(`$cb_c2_ShortValue`) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_IntKey` = `$cb_t1`.`IntKey`, `$cb_c2_ShortValue` = `$cb_t1`.`ShortValue` WHERE TONUMBER(`$cb_c2_ShortValue`) = -32745 AND `$cb_t1`.`type` = 'SmallA' UNION SELECT `$cb_c3_IntKey`, TONUMBER(`$cb_c2_ShortValue`) FROM `dvqe_small` `$cb_t2` LET `$cb_c1_IntKey` = `$cb_t2`.`IntKey`, `$cb_c2_ShortValue` = `$cb_t2`.`ShortValue`, `$cb_c3_IntKey` = `$cb_t2`.`IntKey` WHERE TONUMBER(`$cb_c2_ShortValue`) = -32750 AND `$cb_t2`.`type` = 'SmallA']
> 14:19:54,674 DEBUG [org.teiid.COMMAND_LOG] (Worker77_QueryProcessorQueue661) nxUTZWzvm0Te END SRC COMMAND: endTime=2017-08-25 14:19:54.674 requestID=nxUTZWzvm0Te.9 sourceCommandID=0 executionID=158 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=nxUTZWzvm0Te principal=user@teiid-security finalRowCount=2 cpuTime(ns)=1197365
> 14:19:54,683 INFO [org.teiid.COMMAND_LOG] (Worker77_QueryProcessorQueue662) nxUTZWzvm0Te END USER COMMAND: endTime=2017-08-25 14:19:54.683 requestID=nxUTZWzvm0Te.9 txID=null sessionID=nxUTZWzvm0Te principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=2
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5036) Couchbase EXCEPT returns more values than expected
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5036?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5036.
-----------------------------------
Fix Version/s: 10.0
8.12.x-6.4
9.3.3
Resolution: Done
The visitor was holding state from the first branch that bled into the second. This was updated so that each is rendered in isolation.
> Couchbase EXCEPT returns more values than expected
> --------------------------------------------------
>
> Key: TEIID-5036
> URL: https://issues.jboss.org/browse/TEIID-5036
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Fix For: 10.0, 8.12.x-6.4, 9.3.3
>
>
> Except doesn't work as expected, it returns all the results from the first table, it does not remove entries which are present in the second table. Might be connected to TEIID-5035.
> {code:sql|title=query_small_a}
> SELECT IntKey FROM BQT1.SmallA
> {code}
> || IntKey ||
> || 0 ||
> || 1 ||
> || 10 ||
> || 11 ||
> || 12 ||
> || 13 ||
> || 14 ||
> || 15 ||
> || 16 ||
> || 17 ||
> || 18 ||
> || 19 ||
> || 2 ||
> || 20 ||
> || 21 ||
> || 22 ||
> || 23 ||
> || 24 ||
> || 25 ||
> || 26 ||
> || 27 ||
> || 28 ||
> || 29 ||
> || 3 ||
> || 30 ||
> || 31 ||
> || 32 ||
> || 33 ||
> || 34 ||
> || 35 ||
> || 36 ||
> || 37 ||
> || 38 ||
> || 39 ||
> || 4 ||
> || 40 ||
> || 41 ||
> || 42 ||
> || 43 ||
> || 44 ||
> || 45 ||
> || 46 ||
> || 47 ||
> || 48 ||
> || 49 ||
> || 5 ||
> || 6 ||
> || 7 ||
> || 8 ||
> || 9 ||
> {code:sql|title=query_small_b}
> SELECT IntNum FROM BQT1.SmallB
> {code}
> || IntNum ||
> || <null> ||
> || -23 ||
> || -14 ||
> || -13 ||
> || -12 ||
> || -11 ||
> || -10 ||
> || -9 ||
> || <null> ||
> || -7 ||
> || -6 ||
> || -5 ||
> || -22 ||
> || -4 ||
> || -3 ||
> || -2 ||
> || -1 ||
> || 0 ||
> || 1 ||
> || 2 ||
> || 3 ||
> || 4 ||
> || 5 ||
> || -21 ||
> || 6 ||
> || 7 ||
> || <null> ||
> || 9 ||
> || 10 ||
> || 11 ||
> || 12 ||
> || 13 ||
> || 14 ||
> || 15 ||
> || -20 ||
> || 16 ||
> || 17 ||
> || 18 ||
> || 19 ||
> || 20 ||
> || 21 ||
> || 22 ||
> || 23 ||
> || <null> ||
> || 25 ||
> || -19 ||
> || -18 ||
> || -17 ||
> || -16 ||
> || -15 ||
> {code:sql|title=query_smalla_except_smallb}
> SELECT IntKey FROM BQT1.SmallA EXCEPT SELECT IntNum FROM BQT1.SmallB
> {code}
> || IntKey ||
> || 13 ||
> || 32 ||
> || 30 ||
> || 17 ||
> || 8 ||
> || 36 ||
> || 11 ||
> || 34 ||
> || 4 ||
> || 15 ||
> || 38 ||
> || 0 ||
> || 19 ||
> || 6 ||
> || 2 ||
> || 47 ||
> || 45 ||
> || 43 ||
> || 41 ||
> || 49 ||
> || 26 ||
> || 28 ||
> || 22 ||
> || 24 ||
> || 20 ||
> || 31 ||
> || 10 ||
> || 12 ||
> || 35 ||
> || 14 ||
> || 33 ||
> || 16 ||
> || 9 ||
> || 39 ||
> || 18 ||
> || 7 ||
> || 37 ||
> || 5 ||
> || 3 ||
> || 1 ||
> || 44 ||
> || 40 ||
> || 46 ||
> || 42 ||
> || 48 ||
> || 29 ||
> || 25 ||
> || 27 ||
> || 21 ||
> || 23 ||
> {code:title=teiid-command.log}
> 10:08:57,788 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) QE2ZpDa/Btt5 START USER COMMAND: startTime=2017-08-25 10:08:57.788 requestID=QE2ZpDa/Btt5.153 txID=null sessionID=QE2ZpDa/Btt5 applicationName=JDBC principal=user@teiid-security vdbName=couchbase vdbVersion=1 sql=SELECT IntKey FROM BQT1.SmallA EXCEPT SELECT IntNum FROM BQT1.SmallB
> 10:08:57,795 DEBUG [org.teiid.COMMAND_LOG] (Worker52_QueryProcessorQueue466) QE2ZpDa/Btt5 START DATA SRC COMMAND: startTime=2017-08-25 10:08:57.795 requestID=QE2ZpDa/Btt5.153 sourceCommandID=0 executionID=113 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sql=SELECT Couchbase_small.SmallA.IntKey AS c_0 FROM Couchbase_small.SmallA EXCEPT SELECT Couchbase_small.SmallB.IntNum AS c_0 FROM Couchbase_small.SmallB
> 10:08:57,795 DEBUG [org.teiid.COMMAND_LOG] (Worker52_QueryProcessorQueue466) QE2ZpDa/Btt5 SOURCE SRC COMMAND: endTime=2017-08-25 10:08:57.795 requestID=QE2ZpDa/Btt5.153 sourceCommandID=0 executionID=113 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sourceCommand=[SELECT `$cb_c1_IntKey` FROM `dvqe_small` `$cb_t1` LET `$cb_c1_IntKey` = `$cb_t1`.`IntKey` WHERE `$cb_t1`.`type` = 'SmallA' EXCEPT SELECT `$cb_c2_IntNum` FROM `dvqe_small` `$cb_t2` LET `$cb_c1_IntKey` = `$cb_t2`.`IntKey`, `$cb_c2_IntNum` = `$cb_t2`.`IntNum` WHERE `$cb_t2`.`type` = 'SmallA']
> 10:08:58,061 DEBUG [org.teiid.COMMAND_LOG] (Worker51_QueryProcessorQueue467) QE2ZpDa/Btt5 END SRC COMMAND: endTime=2017-08-25 10:08:58.061 requestID=QE2ZpDa/Btt5.153 sourceCommandID=0 executionID=113 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security finalRowCount=50 cpuTime(ns)=1088787
> 10:08:58,069 INFO [org.teiid.COMMAND_LOG] (Worker51_QueryProcessorQueue468) QE2ZpDa/Btt5 END USER COMMAND: endTime=2017-08-25 10:08:58.069 requestID=QE2ZpDa/Btt5.153 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=50
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5035) Couchbase INTERSECT doesn't return any values
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5035?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5035.
-----------------------------------
Fix Version/s: 10.0
8.12.x-6.4
9.3.3
Resolution: Done
The visitor was holding state from the first branch that bled into the second. This was updated so that each is rendered in isolation.
> Couchbase INTERSECT doesn't return any values
> ---------------------------------------------
>
> Key: TEIID-5035
> URL: https://issues.jboss.org/browse/TEIID-5035
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 10.0, 8.12.x-6.4, 9.3.3
>
>
> INTERSECT operator pushed to Couchbase returns no rows, even though there is an intersection in the values.
> {code:sql|title=query_smallA}
> SELECT IntKey FROM BQT1.SmallA
> {code}
> || IntKey ||
> || 0 ||
> || 1 ||
> || 10 ||
> || 11 ||
> || 12 ||
> || 13 ||
> || 14 ||
> || 15 ||
> || 16 ||
> || 17 ||
> || 18 ||
> || 19 ||
> || 2 ||
> || 20 ||
> || 21 ||
> || 22 ||
> || 23 ||
> || 24 ||
> || 25 ||
> || 26 ||
> || 27 ||
> || 28 ||
> || 29 ||
> || 3 ||
> || 30 ||
> || 31 ||
> || 32 ||
> || 33 ||
> || 34 ||
> || 35 ||
> || 36 ||
> || 37 ||
> || 38 ||
> || 39 ||
> || 4 ||
> || 40 ||
> || 41 ||
> || 42 ||
> || 43 ||
> || 44 ||
> || 45 ||
> || 46 ||
> || 47 ||
> || 48 ||
> || 49 ||
> || 5 ||
> || 6 ||
> || 7 ||
> || 8 ||
> || 9 ||
> {code:sql|title=query_smallB}
> SELECT IntKey FROM BQT1.SmallB
> {code}
> || IntKey ||
> || 0 ||
> || 1 ||
> || 10 ||
> || 11 ||
> || 12 ||
> || 13 ||
> || 14 ||
> || 15 ||
> || 16 ||
> || 17 ||
> || 18 ||
> || 19 ||
> || 2 ||
> || 20 ||
> || 21 ||
> || 22 ||
> || 23 ||
> || 24 ||
> || 25 ||
> || 26 ||
> || 27 ||
> || 28 ||
> || 29 ||
> || 3 ||
> || 30 ||
> || 31 ||
> || 32 ||
> || 33 ||
> || 34 ||
> || 35 ||
> || 36 ||
> || 37 ||
> || 38 ||
> || 39 ||
> || 4 ||
> || 40 ||
> || 41 ||
> || 42 ||
> || 43 ||
> || 44 ||
> || 45 ||
> || 46 ||
> || 47 ||
> || 48 ||
> || 49 ||
> || 5 ||
> || 6 ||
> || 7 ||
> || 8 ||
> || 9 ||
> {code:sql|title=query_intersect}
> SELECT IntKey FROM BQT1.SmallA INTERSECT SELECT IntKey FROM BQT1.SmallB
> {code}
> || IntKey ||
> {code:title=teiid-command.log}
> 16:54:04,453 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) QE2ZpDa/Btt5 START USER COMMAND: startTime=2017-08-24 16:54:04.453 requestID=QE2ZpDa/Btt5.141 txID=null sessionID=QE2ZpDa/Btt5 applicationName=JDBC principal=user@teiid-security vdbName=couchbase vdbVersion=1 sql=SELECT IntKey FROM BQT1.SmallA INTERSECT SELECT IntKey FROM BQT1.SmallB
> 16:54:04,455 DEBUG [org.teiid.COMMAND_LOG] (Worker45_QueryProcessorQueue420) QE2ZpDa/Btt5 START DATA SRC COMMAND: startTime=2017-08-24 16:54:04.455 requestID=QE2ZpDa/Btt5.141 sourceCommandID=0 executionID=102 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sql=SELECT Couchbase_small.SmallA.IntKey AS c_0 FROM Couchbase_small.SmallA INTERSECT SELECT Couchbase_small.SmallB.IntKey AS c_0 FROM Couchbase_small.SmallB
> 16:54:04,455 DEBUG [org.teiid.COMMAND_LOG] (Worker45_QueryProcessorQueue420) QE2ZpDa/Btt5 SOURCE SRC COMMAND: endTime=2017-08-24 16:54:04.455 requestID=QE2ZpDa/Btt5.141 sourceCommandID=0 executionID=102 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sourceCommand=[SELECT `$cb_c1_IntKey` FROM `dvqe_small` `$cb_t1` LET `$cb_c1_IntKey` = `$cb_t1`.`IntKey` WHERE `$cb_t1`.`type` = 'SmallA' INTERSECT SELECT `$cb_c2_IntKey` FROM `dvqe_small` `$cb_t2` LET `$cb_c1_IntKey` = `$cb_t2`.`IntKey`, `$cb_c2_IntKey` = `$cb_t2`.`IntKey` WHERE `$cb_t2`.`type` = 'SmallA']
> 16:54:04,680 DEBUG [org.teiid.COMMAND_LOG] (Worker44_QueryProcessorQueue421) QE2ZpDa/Btt5 END SRC COMMAND: endTime=2017-08-24 16:54:04.68 requestID=QE2ZpDa/Btt5.141 sourceCommandID=0 executionID=102 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security finalRowCount=0 cpuTime(ns)=953196
> 16:54:04,687 INFO [org.teiid.COMMAND_LOG] (Worker44_QueryProcessorQueue422) QE2ZpDa/Btt5 END USER COMMAND: endTime=2017-08-24 16:54:04.687 requestID=QE2ZpDa/Btt5.141 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=0
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5033) Couchbase substring function is 0-based
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5033?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5033.
-----------------------------------
Fix Version/s: 10.0
8.12.x-6.4
9.3.3
Resolution: Done
Added a substringfunctionmodifier to handle the specifics of couchbase.
> Couchbase substring function is 0-based
> ---------------------------------------
>
> Key: TEIID-5033
> URL: https://issues.jboss.org/browse/TEIID-5033
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Fix For: 10.0, 8.12.x-6.4, 9.3.3
>
>
> There is difference in SUBSTRING function handling in Teiid and Couchbase.
> Teiid handling:
> {code:sql|title=query1}
> SELECT SUBSTRING('49',1)
> {code}
> || expr1 ||
> || 49 ||
> Couchbase pushdown:
> {code:sql|title=query2}
> SELECT SUBSTRING(IntKey,1) FROM BQT1.SmallA WHERE IntKey=49
> {code}
> || expr1 ||
> || 9 ||
> {code:title=teiid-command.log}
> 16:04:32,385 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) QE2ZpDa/Btt5 START USER COMMAND: startTime=2017-08-24 16:04:32.385 requestID=QE2ZpDa/Btt5.116 txID=null sessionID=QE2ZpDa/Btt5 applicationName=JDBC principal=user@teiid-security vdbName=couchbase vdbVersion=1 sql=SELECT SUBSTRING(IntKey,1) FROM BQT1.SmallA WHERE IntKey=49
> 16:04:32,390 DEBUG [org.teiid.COMMAND_LOG] (Worker35_QueryProcessorQueue325) QE2ZpDa/Btt5 START DATA SRC COMMAND: startTime=2017-08-24 16:04:32.39 requestID=QE2ZpDa/Btt5.116 sourceCommandID=0 executionID=79 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sql=SELECT SUBSTRING(convert(Couchbase_small.SmallA.IntKey, string), 1) FROM Couchbase_small.SmallA WHERE Couchbase_small.SmallA.IntKey = 49
> 16:04:32,391 DEBUG [org.teiid.COMMAND_LOG] (Worker35_QueryProcessorQueue325) QE2ZpDa/Btt5 SOURCE SRC COMMAND: endTime=2017-08-24 16:04:32.391 requestID=QE2ZpDa/Btt5.116 sourceCommandID=0 executionID=79 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sourceCommand=[SELECT SUBSTR(TOSTRING(`$cb_c1_IntKey`), 1) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_IntKey` = `$cb_t1`.`IntKey` WHERE `$cb_c1_IntKey` = 49 AND `$cb_t1`.`type` = 'SmallA']
> 16:04:32,607 DEBUG [org.teiid.COMMAND_LOG] (Worker34_QueryProcessorQueue326) QE2ZpDa/Btt5 END SRC COMMAND: endTime=2017-08-24 16:04:32.607 requestID=QE2ZpDa/Btt5.116 sourceCommandID=0 executionID=79 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=1689816
> 16:04:32,610 INFO [org.teiid.COMMAND_LOG] (Worker34_QueryProcessorQueue327) QE2ZpDa/Btt5 END USER COMMAND: endTime=2017-08-24 16:04:32.61 requestID=QE2ZpDa/Btt5.116 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5034) Couchbase SUBSTRING function returns null when reaches end of string
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5034?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5034.
-----------------------------------
Resolution: Done
Added a substringfunctionmodifier to handle the specifics of couchbase.
> Couchbase SUBSTRING function returns null when reaches end of string
> --------------------------------------------------------------------
>
> Key: TEIID-5034
> URL: https://issues.jboss.org/browse/TEIID-5034
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
>
> Couchbase return null when y points after the string end in SUBSTRING(VALUE, x, y). That's not what is expected from Teiid.
> Teiid:
> {code:sql|title=query1}
> SELECT SUBSTRING('49',1, 10)
> {code}
> || expr1 ||
> || 49 ||
> Couchbase pushdown:
> {code:sql|title=query2}
> SELECT SUBSTRING(BQT1.SmallA.intkey, 1, 10) FROM BQT1.SmallA WHERE IntKey=49
> {code}
> || expr1 ||
> || <null> ||
> {code:title=teiid-command.log}
> 16:18:57,156 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) QE2ZpDa/Btt5 START USER COMMAND: startTime=2017-08-24 16:18:57.156 requestID=QE2ZpDa/Btt5.124 txID=null sessionID=QE2ZpDa/Btt5 applicationName=JDBC principal=user@teiid-security vdbName=couchbase vdbVersion=1 sql=SELECT SUBSTRING(BQT1.SmallA.intkey, 1, 10) FROM BQT1.SmallA WHERE IntKey=49
> 16:18:57,160 DEBUG [org.teiid.COMMAND_LOG] (Worker39_QueryProcessorQueue353) QE2ZpDa/Btt5 START DATA SRC COMMAND: startTime=2017-08-24 16:18:57.16 requestID=QE2ZpDa/Btt5.124 sourceCommandID=0 executionID=85 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sql=SELECT SUBSTRING(convert(Couchbase_small.SmallA.IntKey, string), 1, 10) FROM Couchbase_small.SmallA WHERE Couchbase_small.SmallA.IntKey = 49
> 16:18:57,160 DEBUG [org.teiid.COMMAND_LOG] (Worker39_QueryProcessorQueue353) QE2ZpDa/Btt5 SOURCE SRC COMMAND: endTime=2017-08-24 16:18:57.16 requestID=QE2ZpDa/Btt5.124 sourceCommandID=0 executionID=85 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sourceCommand=[SELECT SUBSTR(TOSTRING(`$cb_c1_IntKey`), 1, 10) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_IntKey` = `$cb_t1`.`IntKey` WHERE `$cb_c1_IntKey` = 49 AND `$cb_t1`.`type` = 'SmallA']
> 16:18:57,449 DEBUG [org.teiid.COMMAND_LOG] (Worker38_QueryProcessorQueue354) QE2ZpDa/Btt5 END SRC COMMAND: endTime=2017-08-24 16:18:57.449 requestID=QE2ZpDa/Btt5.124 sourceCommandID=0 executionID=85 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security finalRowCount=1 cpuTime(ns)=1213042
> 16:18:57,456 INFO [org.teiid.COMMAND_LOG] (Worker38_QueryProcessorQueue355) QE2ZpDa/Btt5 END USER COMMAND: endTime=2017-08-24 16:18:57.456 requestID=QE2ZpDa/Btt5.124 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5031) Couchbase issues in functions where result is different datatype than the argument
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5031?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5031.
-----------------------------------
Fix Version/s: 10.0
8.12.x-6.4
9.3.3
Resolution: Done
Couchbase can return mixed values for a computation - one value could be an integer, others decimal. The Teiid column auto type correction logic only looks at the first non-null value to determine what corrections are needed.
The fix here was to push the type value logic down further so that translator returns a consistent type.
> Couchbase issues in functions where result is different datatype than the argument
> ----------------------------------------------------------------------------------
>
> Key: TEIID-5031
> URL: https://issues.jboss.org/browse/TEIID-5031
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 10.0, 8.12.x-6.4, 9.3.3
>
>
> {code:sql|title=query1}
> SELECT IntNum ,1/IntNum FROM BQT1.SmallA WHERE IntNum <> 0
> {code}
> {code:title=error for query1}
> Error: TEIID20001 The modeled datatype integer for column 1 doesn't match the runtime type "java.lang.Integer". Please ensure that the column's modeled datatype matches the expected data.
> {code}
> {code:title=server.log for query1}
> 10:37:30,613 ERROR [org.teiid.TRANSPORT] (New I/O worker #2) TEIID40113 Unhandled exception, aborting operation: org.teiid.transport.ObjectEncoder$FailedWriteException: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 1 doesn't match the runtime type "java.lang.Integer". 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.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.jboss.netty.channel.Channels.write(Channels.java:704) [netty-3.6.10.Final-redhat-1.jar:3.6.10.Final-redhat-1]
> at org.jboss.netty.channel.Channels.write(Channels.java:671) [netty-3.6.10.Final-redhat-1.jar:3.6.10.Final-redhat-1]
> at org.jboss.netty.channel.AbstractChannel.write(AbstractChannel.java:248) [netty-3.6.10.Final-redhat-1.jar:3.6.10.Final-redhat-1]
> at org.teiid.transport.SSLAwareChannelHandler$ObjectChannelImpl.write(SSLAwareChannelHandler.java:94) [teiid-runtime-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.transport.SocketClientInstance.send(SocketClientInstance.java:94) [teiid-runtime-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.transport.ServerWorkItem.sendResult(ServerWorkItem.java:135) [teiid-runtime-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.transport.ServerWorkItem$1.onCompletion(ServerWorkItem.java:105) [teiid-runtime-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135) [teiid-client-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40) [teiid-client-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79) [teiid-client-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.sendResultsIfNeeded(RequestWorkItem.java:996) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.process.RequestWorkItem$1.flushBatchDirect(RequestWorkItem.java:676) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.query.processor.BatchCollector.flushBatch(BatchCollector.java:223) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:194) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
> Caused by: org.teiid.core.TeiidRuntimeException: TEIID20001 The modeled datatype integer for column 1 doesn't match the runtime type "java.lang.Integer". 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.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.client.ResultsMessage.writeExternal(ResultsMessage.java:319) [teiid-client-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459) [rt.jar:1.8.0_121]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430) [rt.jar:1.8.0_121]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) [rt.jar:1.8.0_121]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) [rt.jar:1.8.0_121]
> at org.teiid.net.socket.Message.writeExternal(Message.java:61) [teiid-client-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at java.io.ObjectOutputStream.writeExternalData(ObjectOutputStream.java:1459) [rt.jar:1.8.0_121]
> at java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java:1430) [rt.jar:1.8.0_121]
> at java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java:1178) [rt.jar:1.8.0_121]
> at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java:348) [rt.jar:1.8.0_121]
> at org.teiid.transport.ObjectEncoder.handleDownstream(ObjectEncoder.java:131) [teiid-runtime-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> ... 25 more
> Caused by: java.lang.ClassCastException: java.lang.Double cannot be cast to java.lang.Integer
> at org.teiid.client.BatchSerializer$IntColumnSerializer.writeObject(BatchSerializer.java:563) [teiid-client-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.client.BatchSerializer$ColumnSerializer.writeColumn(BatchSerializer.java:534) [teiid-client-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.client.BatchSerializer.writeBatch(BatchSerializer.java:867) [teiid-client-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> ... 36 more
> {code}
> {code:title=teiid-command.log for query1}
> 10:37:30,390 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) QE2ZpDa/Btt5 START USER COMMAND: startTime=2017-08-24 10:37:30.39 requestID=QE2ZpDa/Btt5.50 txID=null sessionID=QE2ZpDa/Btt5 applicationName=JDBC principal=user@teiid-security vdbName=couchbase vdbVersion=1 sql=SELECT IntNum, 1/IntNum FROM BQT1.SmallA WHERE IntNum <> 0
> 10:37:30,393 DEBUG [org.teiid.COMMAND_LOG] (Worker15_QueryProcessorQueue132) QE2ZpDa/Btt5 START DATA SRC COMMAND: startTime=2017-08-24 10:37:30.393 requestID=QE2ZpDa/Btt5.50 sourceCommandID=2 executionID=29 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sql=SELECT Couchbase_small.SmallA.IntNum, (1 / Couchbase_small.SmallA.IntNum) FROM Couchbase_small.SmallA
> 10:37:30,393 DEBUG [org.teiid.COMMAND_LOG] (Worker15_QueryProcessorQueue132) QE2ZpDa/Btt5 SOURCE SRC COMMAND: endTime=2017-08-24 10:37:30.393 requestID=QE2ZpDa/Btt5.50 sourceCommandID=2 executionID=29 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sourceCommand=[SELECT `$cb_c1_IntNum`, (1 / `$cb_c1_IntNum`) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_IntNum` = `$cb_t1`.`IntNum` WHERE `$cb_t1`.`type` = 'SmallA']
> 10:37:30,609 DEBUG [org.teiid.COMMAND_LOG] (Worker14_QueryProcessorQueue133) QE2ZpDa/Btt5 END SRC COMMAND: endTime=2017-08-24 10:37:30.609 requestID=QE2ZpDa/Btt5.50 sourceCommandID=2 executionID=29 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security finalRowCount=50 cpuTime(ns)=3238883
> {code}
> There are other occurences:
> {code:sql|title=query2}
> SELECT IntNum, COS(Intnum) FROM BQT1.SmallA
> {code}
> {code:title=error for query2}
> Error: TEIID20001 The modeled datatype integer for column 1 doesn't match the runtime type "java.lang.Integer". Please ensure that the column's modeled datatype matches the expected data.
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-4335) No buffer when close is called
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4335?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4335.
-----------------------------------
Resolution: Done
> No buffer when close is called
> ------------------------------
>
> Key: TEIID-4335
> URL: https://issues.jboss.org/browse/TEIID-4335
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7.7.6_2
> Reporter: Johnathon Lee
> Assignee: Steven Hawkins
> Fix For: 8.12.x-6.4, 8.12.12.6_3, 9.0.2, 8.7.8.6_2, 9.1
>
>
> Subquery that has a plan which can provide a final buffer such that no buffer is there when close is called.
> Stracktrace similar to:
> {code:java}
> ERROR \[org.teiid.PROCESSOR\] (Worker2_QueryProcessorQueue14) TEIID30019 Unexpected exception for request PcSx3Ps9Yxeq.7: java.lang.NullPointerException
> at org.teiid.query.processor.relational.SubqueryAwareEvaluator$SubqueryState.close(SubqueryAwareEvaluator.java:200) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.SubqueryAwareEvaluator.reset(SubqueryAwareEvaluator.java:233) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.SubqueryAwareEvaluator.close(SubqueryAwareEvaluator.java:244) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.SubqueryAwareRelationalNode.closeDirect(SubqueryAwareRelationalNode.java:71) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.AccessNode.closeDirect(AccessNode.java:517) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.RelationalNode.close(RelationalNode.java:332) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.RelationalNode.close(RelationalNode.java:335) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:297) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:102) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:136) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:159) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:141) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:450) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:332) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:260) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.7.7.6_2-redhat-1.jar:8.7.7.6_2-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_65]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_65]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_65]
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5046) DuplicateRecordException when adding some tables with dots in columns
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5046?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5046:
----------------------------------
Fix Version/s: 10.0
> DuplicateRecordException when adding some tables with dots in columns
> ---------------------------------------------------------------------
>
> Key: TEIID-5046
> URL: https://issues.jboss.org/browse/TEIID-5046
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector, Query Engine
> Affects Versions: 9.3.1
> Environment: teiid-9.3.1 on WildFly Full 10.0.0.Final (WildFly Core 2.0.10.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Fix For: 10.0
>
>
> when adding such table:
> {code:sql}
> create table t1 (
> "a.b" int,
> "a_b" int
> );
> {code}
> we will get the following stacktrace:
> {noformat}
> 2017-08-31 15:21:34,121 WARN [org.teiid.RUNTIME] (Worker1_async-teiid-threads1) TEIID50036 VDB test.1 model "test_pg" metadata failed to load. Reason:TEIID60016 Duplicate Column te
> st_pg.t1.a_b: org.teiid.metadata.DuplicateRecordException: TEIID60016 Duplicate Column test_pg.t1.a_b
> at org.teiid.metadata.MetadataFactory.addColumn(MetadataFactory.java:198)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.addColumn(JDBCMetdataProcessor.java:449)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.processColumns(JDBCMetdataProcessor.java:410)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getColumns(JDBCMetdataProcessor.java:385)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getTables(JDBCMetdataProcessor.java:336)
> at org.teiid.translator.jdbc.JDBCMetdataProcessor.getConnectorMetadata(JDBCMetdataProcessor.java:166)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:306)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:69)
> at org.teiid.query.metadata.NativeMetadataRepository.getMetadata(NativeMetadataRepository.java:96)
> at org.teiid.query.metadata.NativeMetadataRepository.loadMetadata(NativeMetadataRepository.java:62)
> at org.teiid.query.metadata.ChainingMetadataRepository.loadMetadata(ChainingMetadataRepository.java:55)
> at org.teiid.jboss.VDBService$6.run(VDBService.java:341)
> at org.teiid.jboss.VDBService$7.run(VDBService.java:392)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:284)
> 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:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {noformat}
> I suppose the problem related to auto replacement of dots on underscores which was fixed in TEIID-4913 issue. Maybe it's worth to introduce some kind of indexes in column names if there is already a column with the same name instead of throwing out DuplicateRecordException. Or maybe there is an another solution.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months