[JBoss JIRA] (TEIID-5030) Couchbase error in date/timestamp/time datatype pushdown
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-5030?page=com.atlassian.jira.plugin... ]
Jan Stastny commented on TEIID-5030:
------------------------------------
[~shawkins] Yes, there are the columns modelled as string in my source model, then only in the view they are converted to time/date/timestamp. And there is implicit convert from date/datetime/time to string, which is not being applied before pushdown obviously. I think this issue needs to be reopened.
{code:sql|title=Couchbase_small physical model DDL}
SET NAMESPACE 'http://www.teiid.org/translator/couchbase/2017' AS teiid_couchbase;
CREATE FOREIGN TABLE SmallA (
documentID string,
FloatNum integer OPTIONS (NAMEINSOURCE '`FloatNum`'),
IntKey integer PRIMARY KEY OPTIONS (NAMEINSOURCE '`IntKey`'),
BigIntegerValue integer OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
LongNum integer OPTIONS (NAMEINSOURCE '`LongNum`'),
type string OPTIONS (NAMEINSOURCE '`type`'),
DoubleNum integer OPTIONS (NAMEINSOURCE '`DoubleNum`'),
ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
BigDecimalValue integer OPTIONS (NAMEINSOURCE '`BigDecimalValue`'),
DateValue string OPTIONS (NAMEINSOURCE '`DateValue`'),
BooleanValue boolean OPTIONS (NAMEINSOURCE '`BooleanValue`'),
TimestampValue string OPTIONS (NAMEINSOURCE '`TimestampValue`'),
ByteNum integer OPTIONS (NAMEINSOURCE '`ByteNum`'),
StringNum string OPTIONS (NAMEINSOURCE '`StringNum`'),
TimeValue string OPTIONS (NAMEINSOURCE '`TimeValue`'),
IntNum integer OPTIONS (NAMEINSOURCE '`IntNum`')
) OPTIONS (NAMEINSOURCE '`dvqe_small`', UPDATABLE FALSE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
{code}
{code:sql|title=BQT1 virtual model DDL}
CREATE VIEW SmallA (
IntKey integer PRIMARY KEY,
StringKey string,
IntNum integer,
StringNum string,
FloatNum float,
LongNum long,
DoubleNum double,
ByteNum byte,
DateValue date,
TimeValue time,
TimestampValue timestamp,
BooleanValue boolean,
CharValue char(1),
ShortValue short,
BigIntegerValue biginteger,
BigDecimalValue bigdecimal,
ObjectValue object)
AS
SELECT
IntKey, StringKey, IntNum, StringNum, convert(FloatNum, float) AS FloatNum, convert(LongNum, long) AS LongNum,
convert(DoubleNum, double) AS DoubleNum, convert(ByteNum, byte) AS ByteNum, convert(DateValue, date) AS DateValue,
convert(TimeValue, time) AS TimeValue, convert(TimestampValue, timestamp) AS TimstampValue, BooleanValue,
convert(CharValue, char) AS CharValue, convert(ShortValue, short) AS ShortValue, convert(BigIntegerValue, biginteger) AS BigIntegerValue,
convert(BigDecimalValue, bigdecimal) AS BigDecimalValue, convert(ObjectValue, object) AS ObjectValue
FROM
Couchbase_small.SmallA;
{code}
> Couchbase error in date/timestamp/time datatype pushdown
> --------------------------------------------------------
>
> Key: TEIID-5030
> URL: https://issues.jboss.org/browse/TEIID-5030
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
>
> There is an issue with date, time and timestamp datatype pushdown. The following example is for date. For timestamp the behaviour is the same, only exception message complains about 'ts' or 't' instead of 'd'.
> {code:sql|title=query}
> SELECT BQT1.SmallA.DateValue FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue = '2000-02-02'
> {code}
> {code:title=teiid-command.log}
> 09:59:44,422 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) QE2ZpDa/Btt5 START USER COMMAND: startTime=2017-08-24 09:59:44.422 requestID=QE2ZpDa/Btt5.31 txID=null sessionID=QE2ZpDa/Btt5 applicationName=JDBC principal=user@teiid-security vdbName=couchbase vdbVersion=1 sql=SELECT BQT1.SmallA.DateValue FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue = '2000-02-02'
> 09:59:44,436 DEBUG [org.teiid.COMMAND_LOG] (Worker9_QueryProcessorQueue68) QE2ZpDa/Btt5 START DATA SRC COMMAND: startTime=2017-08-24 09:59:44.436 requestID=QE2ZpDa/Btt5.31 sourceCommandID=0 executionID=12 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sql=SELECT convert(Couchbase_small.SmallA.DateValue, date) FROM Couchbase_small.SmallA WHERE convert(Couchbase_small.SmallA.DateValue, date) = {d'2000-02-02'}
> 09:59:44,436 DEBUG [org.teiid.COMMAND_LOG] (Worker9_QueryProcessorQueue68) QE2ZpDa/Btt5 SOURCE SRC COMMAND: endTime=2017-08-24 09:59:44.436 requestID=QE2ZpDa/Btt5.31 sourceCommandID=0 executionID=12 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sourceCommand=[SELECT TOATOM(`$cb_c1_DateValue`) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_DateValue` = `$cb_t1`.`DateValue` WHERE TOATOM(`$cb_c1_DateValue`) = {d '2000-02-02'} AND `$cb_t1`.`type` = 'SmallA']
> 09:59:44,588 DEBUG [org.teiid.COMMAND_LOG] (Worker9_QueryProcessorQueue68) QE2ZpDa/Btt5 ERROR SRC COMMAND: endTime=2017-08-24 09:59:44.588 requestID=QE2ZpDa/Btt5.31 sourceCommandID=0 executionID=12 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security
> 09:59:44,596 DEBUG [org.teiid.COMMAND_LOG] (Worker8_QueryProcessorQueue69) QE2ZpDa/Btt5 END SRC COMMAND: endTime=2017-08-24 09:59:44.596 requestID=QE2ZpDa/Btt5.31 sourceCommandID=0 executionID=12 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security finalRowCount=0 cpuTime(ns)=8526015
> 09:59:44,596 INFO [org.teiid.COMMAND_LOG] (Worker8_QueryProcessorQueue69) QE2ZpDa/Btt5 ERROR USER COMMAND: endTime=2017-08-24 09:59:44.596 requestID=QE2ZpDa/Btt5.31 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=null
> 09:59:44,598 INFO [org.teiid.COMMAND_LOG] (Worker8_QueryProcessorQueue69) QE2ZpDa/Btt5 END USER COMMAND: endTime=2017-08-24 09:59:44.598 requestID=QE2ZpDa/Btt5.31 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=0
> {code}
> {code:title=server.log}
> 09:59:44,588 WARN [org.teiid.CONNECTOR] (Worker9_QueryProcessorQueue68) Connector worker process failed for atomic-request=QE2ZpDa/Btt5.31.0.12: org.teiid.translator.TranslatorException: Query did not complete successfully: [{"msg":"syntax error - at d","code":3000}], error code: fatal
> at org.teiid.translator.couchbase.CouchbaseQueryExecution.execute(CouchbaseQueryExecution.java:73) [translator-couchbase-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:363)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_121]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_121]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
> 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_121]
> 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: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: javax.resource.ResourceException: Query did not complete successfully: [{"msg":"syntax error - at d","code":3000}], error code: fatal
> at org.teiid.resource.adapter.couchbase.CouchbaseConnectionImpl.execute(CouchbaseConnectionImpl.java:64)
> at org.teiid.translator.couchbase.CouchbaseQueryExecution.execute(CouchbaseQueryExecution.java:71) [translator-couchbase-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> ... 18 more
> 09:59:44,596 WARN [org.teiid.PROCESSOR] (Worker8_QueryProcessorQueue69) TEIID30020 Processing exception for request QE2ZpDa/Btt5.31 'TEIID30504 couchbase_small: Query did not complete successfully: [{"msg":"syntax error - at d","code":3000}], error code: fatal'. Originally TeiidProcessingException CouchbaseConnectionImpl.java:64. Enable more detailed logging to see the entire stacktrace.
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (TEIID-5033) Couchbase substring function is 0-based
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5033?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-5033:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1484912
Bugzilla Update: Perform
> 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
>
> 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, 4 months
[JBoss JIRA] (TEIID-1640) QueryTimeout connection parameter does not cancel long-running queries
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-1640?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-1640.
-----------------------------------
Resolution: Done
Given the age of this issue it should not be reopened for 8.12. You will also need to provide a lot more information as this functionality does have unit and other tests.
> QueryTimeout connection parameter does not cancel long-running queries
> ----------------------------------------------------------------------
>
> Key: TEIID-1640
> URL: https://issues.jboss.org/browse/TEIID-1640
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Driver
> Affects Versions: 7.4
> Environment: Fedora 14 (server & client), Teiid 7.4 Final
> Reporter: Paul Nittel
> Assignee: Steven Hawkins
> Fix For: 7.5, 7.4.1
>
>
> Testing XML files as data sources involves running queries which can take a long time (minutes). I defined my connection URL (in SQuirreL) as jdbc:teiid:VDB@mm://localhost:31000;QueryTimeout=1
> The next query I executed processed for over 4 seconds, but there was no evidence of an attempt to cancel the query.
> I've got a series of XML files you can use to test this, if you want. They're too big to attach (even when zipped).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (TEIID-1640) QueryTimeout connection parameter does not cancel long-running queries
by Tom Johnston (JIRA)
[ https://issues.jboss.org/browse/TEIID-1640?page=com.atlassian.jira.plugin... ]
Tom Johnston reopened TEIID-1640:
---------------------------------
I am getting this same result with 8.12 (JDV 6.4)
I have ;QueryTimeout=1 on my JDBC URL and run a long query and no effect
> QueryTimeout connection parameter does not cancel long-running queries
> ----------------------------------------------------------------------
>
> Key: TEIID-1640
> URL: https://issues.jboss.org/browse/TEIID-1640
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Driver
> Affects Versions: 7.4
> Environment: Fedora 14 (server & client), Teiid 7.4 Final
> Reporter: Paul Nittel
> Assignee: Steven Hawkins
> Fix For: 7.4.1, 7.5
>
>
> Testing XML files as data sources involves running queries which can take a long time (minutes). I defined my connection URL (in SQuirreL) as jdbc:teiid:VDB@mm://localhost:31000;QueryTimeout=1
> The next query I executed processed for over 4 seconds, but there was no evidence of an attempt to cancel the query.
> I've got a series of XML files you can use to test this, if you want. They're too big to attach (even when zipped).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (TEIID-5030) Couchbase error in date/timestamp/time datatype pushdown
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5030?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5030.
-----------------------------------
Resolution: Rejected
There are no date/time types supported by default in the couchbase type model.
> Couchbase error in date/timestamp/time datatype pushdown
> --------------------------------------------------------
>
> Key: TEIID-5030
> URL: https://issues.jboss.org/browse/TEIID-5030
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
>
> There is an issue with date, time and timestamp datatype pushdown. The following example is for date. For timestamp the behaviour is the same, only exception message complains about 'ts' or 't' instead of 'd'.
> {code:sql|title=query}
> SELECT BQT1.SmallA.DateValue FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue = '2000-02-02'
> {code}
> {code:title=teiid-command.log}
> 09:59:44,422 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) QE2ZpDa/Btt5 START USER COMMAND: startTime=2017-08-24 09:59:44.422 requestID=QE2ZpDa/Btt5.31 txID=null sessionID=QE2ZpDa/Btt5 applicationName=JDBC principal=user@teiid-security vdbName=couchbase vdbVersion=1 sql=SELECT BQT1.SmallA.DateValue FROM BQT1.SmallA WHERE BQT1.SmallA.DateValue = '2000-02-02'
> 09:59:44,436 DEBUG [org.teiid.COMMAND_LOG] (Worker9_QueryProcessorQueue68) QE2ZpDa/Btt5 START DATA SRC COMMAND: startTime=2017-08-24 09:59:44.436 requestID=QE2ZpDa/Btt5.31 sourceCommandID=0 executionID=12 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sql=SELECT convert(Couchbase_small.SmallA.DateValue, date) FROM Couchbase_small.SmallA WHERE convert(Couchbase_small.SmallA.DateValue, date) = {d'2000-02-02'}
> 09:59:44,436 DEBUG [org.teiid.COMMAND_LOG] (Worker9_QueryProcessorQueue68) QE2ZpDa/Btt5 SOURCE SRC COMMAND: endTime=2017-08-24 09:59:44.436 requestID=QE2ZpDa/Btt5.31 sourceCommandID=0 executionID=12 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sourceCommand=[SELECT TOATOM(`$cb_c1_DateValue`) FROM `dvqe_small` `$cb_t1` LET `$cb_c1_DateValue` = `$cb_t1`.`DateValue` WHERE TOATOM(`$cb_c1_DateValue`) = {d '2000-02-02'} AND `$cb_t1`.`type` = 'SmallA']
> 09:59:44,588 DEBUG [org.teiid.COMMAND_LOG] (Worker9_QueryProcessorQueue68) QE2ZpDa/Btt5 ERROR SRC COMMAND: endTime=2017-08-24 09:59:44.588 requestID=QE2ZpDa/Btt5.31 sourceCommandID=0 executionID=12 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security
> 09:59:44,596 DEBUG [org.teiid.COMMAND_LOG] (Worker8_QueryProcessorQueue69) QE2ZpDa/Btt5 END SRC COMMAND: endTime=2017-08-24 09:59:44.596 requestID=QE2ZpDa/Btt5.31 sourceCommandID=0 executionID=12 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security finalRowCount=0 cpuTime(ns)=8526015
> 09:59:44,596 INFO [org.teiid.COMMAND_LOG] (Worker8_QueryProcessorQueue69) QE2ZpDa/Btt5 ERROR USER COMMAND: endTime=2017-08-24 09:59:44.596 requestID=QE2ZpDa/Btt5.31 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=null
> 09:59:44,598 INFO [org.teiid.COMMAND_LOG] (Worker8_QueryProcessorQueue69) QE2ZpDa/Btt5 END USER COMMAND: endTime=2017-08-24 09:59:44.598 requestID=QE2ZpDa/Btt5.31 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=0
> {code}
> {code:title=server.log}
> 09:59:44,588 WARN [org.teiid.CONNECTOR] (Worker9_QueryProcessorQueue68) Connector worker process failed for atomic-request=QE2ZpDa/Btt5.31.0.12: org.teiid.translator.TranslatorException: Query did not complete successfully: [{"msg":"syntax error - at d","code":3000}], error code: fatal
> at org.teiid.translator.couchbase.CouchbaseQueryExecution.execute(CouchbaseQueryExecution.java:73) [translator-couchbase-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:363)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_121]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_121]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
> 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_121]
> 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: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: javax.resource.ResourceException: Query did not complete successfully: [{"msg":"syntax error - at d","code":3000}], error code: fatal
> at org.teiid.resource.adapter.couchbase.CouchbaseConnectionImpl.execute(CouchbaseConnectionImpl.java:64)
> at org.teiid.translator.couchbase.CouchbaseQueryExecution.execute(CouchbaseQueryExecution.java:71) [translator-couchbase-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
> ... 18 more
> 09:59:44,596 WARN [org.teiid.PROCESSOR] (Worker8_QueryProcessorQueue69) TEIID30020 Processing exception for request QE2ZpDa/Btt5.31 'TEIID30504 couchbase_small: Query did not complete successfully: [{"msg":"syntax error - at d","code":3000}], error code: fatal'. Originally TeiidProcessingException CouchbaseConnectionImpl.java:64. Enable more detailed logging to see the entire stacktrace.
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (TEIID-5035) Couchbase INTERSECT doesn't return any values
by Jan Stastny (JIRA)
Jan Stastny created TEIID-5035:
----------------------------------
Summary: 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
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, 4 months
[JBoss JIRA] (TEIID-4974) Couchbase - TRANSLATE function is transalted as REPLACE
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4974?page=com.atlassian.jira.plugin... ]
Jan Stastny reopened TEIID-4974:
--------------------------------
The TRANSLATE function still doesn't work. It is pushed as translate now. But it causes error
{code:title=error}
Error: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 couchbase_small: Query did not complete successfully: [{"msg":"Invalid function translate. - at )","code":3000}], error code: fatal
{code}
I couldn't find any such function in Couchbase docs.
{code:sql|title=query}
SELECT INTKEY, TRANSLATE(INTKEY, '1', 'x') FROM BQT1.SmallA
{code}
{code:title=teiid-command.log}
16:30:58,783 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) QE2ZpDa/Btt5 START USER COMMAND: startTime=2017-08-24 16:30:58.783 requestID=QE2ZpDa/Btt5.125 txID=null sessionID=QE2ZpDa/Btt5 applicationName=JDBC principal=user@teiid-security vdbName=couchbase vdbVersion=1 sql=SELECT INTKEY, TRANSLATE(INTKEY, '1', 'x') FROM BQT1.SmallA
16:30:58,788 DEBUG [org.teiid.COMMAND_LOG] (Worker41_QueryProcessorQueue357) QE2ZpDa/Btt5 START DATA SRC COMMAND: startTime=2017-08-24 16:30:58.788 requestID=QE2ZpDa/Btt5.125 sourceCommandID=0 executionID=86 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sql=SELECT Couchbase_small.SmallA.IntKey, TRANSLATE(convert(Couchbase_small.SmallA.IntKey, string), '1', 'x') FROM Couchbase_small.SmallA
16:30:58,791 DEBUG [org.teiid.COMMAND_LOG] (Worker41_QueryProcessorQueue357) QE2ZpDa/Btt5 SOURCE SRC COMMAND: endTime=2017-08-24 16:30:58.791 requestID=QE2ZpDa/Btt5.125 sourceCommandID=0 executionID=86 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security sourceCommand=[SELECT `$cb_c1_IntKey`, translate(TOSTRING(`$cb_c1_IntKey`), '1', 'x') FROM `dvqe_small` `$cb_t1` LET `$cb_c1_IntKey` = `$cb_t1`.`IntKey` WHERE `$cb_t1`.`type` = 'SmallA']
16:30:59,193 DEBUG [org.teiid.COMMAND_LOG] (Worker41_QueryProcessorQueue357) QE2ZpDa/Btt5 ERROR SRC COMMAND: endTime=2017-08-24 16:30:59.193 requestID=QE2ZpDa/Btt5.125 sourceCommandID=0 executionID=86 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security
16:30:59,206 DEBUG [org.teiid.COMMAND_LOG] (Worker40_QueryProcessorQueue358) QE2ZpDa/Btt5 END SRC COMMAND: endTime=2017-08-24 16:30:59.206 requestID=QE2ZpDa/Btt5.125 sourceCommandID=0 executionID=86 txID=null modelName=Couchbase_small translatorName=couchbase sessionID=QE2ZpDa/Btt5 principal=user@teiid-security finalRowCount=0 cpuTime(ns)=7761659
16:30:59,206 INFO [org.teiid.COMMAND_LOG] (Worker40_QueryProcessorQueue358) QE2ZpDa/Btt5 ERROR USER COMMAND: endTime=2017-08-24 16:30:59.206 requestID=QE2ZpDa/Btt5.125 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=null
16:30:59,216 INFO [org.teiid.COMMAND_LOG] (Worker40_QueryProcessorQueue358) QE2ZpDa/Btt5 END USER COMMAND: endTime=2017-08-24 16:30:59.216 requestID=QE2ZpDa/Btt5.125 txID=null sessionID=QE2ZpDa/Btt5 principal=user@teiid-security vdbName=couchbase vdbVersion=1 finalRowCount=0
{code}
> Couchbase - TRANSLATE function is transalted as REPLACE
> -------------------------------------------------------
>
> Key: TEIID-4974
> URL: https://issues.jboss.org/browse/TEIID-4974
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 10.0, 8.12.x-6.4, 9.3.1
>
>
> Teiid's SQL function TRANSLATE is translated to N1QL REPLACE function, but those functions are not equivalent.
> See the difference:
> https://developer.couchbase.com/documentation/server/current/n1ql/n1ql-la...
> https://teiid.gitbooks.io/documents/content/reference/String_Functions.html
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 4 months
[JBoss JIRA] (TEIID-5031) Couchbase issues in functions where result is different datatype than the argument
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5031?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-5031:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1484740
Bugzilla Update: Perform
> 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
>
> {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, 4 months
[JBoss JIRA] (TEIID-5034) Couchbase SUBSTRING function returns null when reaches end of string
by Jan Stastny (JIRA)
Jan Stastny created TEIID-5034:
----------------------------------
Summary: 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, 4 months
[JBoss JIRA] (TEIID-5033) Couchbase substring function is 0-based
by Jan Stastny (JIRA)
Jan Stastny created TEIID-5033:
----------------------------------
Summary: 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
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, 4 months