[JBoss JIRA] (TEIID-5036) Couchbase EXCEPT returns more values than expected
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5036?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-5036:
------------------------------------------------
Debi Rieden <drieden(a)redhat.com> changed the Status of [bug 1485251|https://bugzilla.redhat.com/show_bug.cgi?id=1485251] from VERIFIED to CLOSED
> 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.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5038) Couchbase importer.sampleKeyspaces not resctricting document types imported
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5038?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-5038:
------------------------------------------------
Debi Rieden <drieden(a)redhat.com> changed the Status of [bug 1485901|https://bugzilla.redhat.com/show_bug.cgi?id=1485901] from VERIFIED to CLOSED
> Couchbase importer.sampleKeyspaces not resctricting document types imported
> ---------------------------------------------------------------------------
>
> Key: TEIID-5038
> URL: https://issues.jboss.org/browse/TEIID-5038
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Critical
>
> A vdb with importer.sampleKeyspaces property doesn't restrict the keyspaces imported. From the docs:
> ??A comma-separate list of the keyspace names, used to fine-grained control which keyspaces should be mapped, by default map all keyspaces.??
> I have two keyspaces:
> * dvqe_small
> * dvqe_other
> The dvqe_small one contains ONLY types:
> * SmallA
> * SmallB
> But this vdb:
> {code:xml|title=vdb with sampleKeyspaces}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <vdb name="couchbase_crud" version="1">
> <model name="Source" type="PHYSICAL" visible="true">
> <property name="importer.typeNameList" value="`dvqe_small`:`type`,`dvqe_other`:`type`"/>
> <property name="importer.sampleKeyspaces" value="`dvqe_small`"/>
> <source name="Source" connection-jndi-name="java:/couchbase_crud" translator-name="couchbase"/>
> </model>
> </vdb>
> {code}
> is imported the same as this one:
> {code:xml|title=vdb without sampleKeyspaces}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <vdb name="couchbase_crud" version="1">
> <model name="Source" type="PHYSICAL" visible="true">
> <property name="importer.typeNameList" value="`dvqe_small`:`type`,`dvqe_other`:`type`"/>
> <source name="Source" connection-jndi-name="java:/couchbase_crud" translator-name="couchbase"/>
> </model>
> </vdb>
> {code}
> With resulting DDL containing OTHER types than those defined in dvqe_small keyspace:
> {code:sql|title=import result}
> SET NAMESPACE 'http://www.teiid.org/translator/couchbase/2017' AS teiid_couchbase;
> CREATE FOREIGN TABLE dvqe_crud (
> documentID string,
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false');
> CREATE FOREIGN TABLE LargeA (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_other`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_other`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_other`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''LargeA''');
> CREATE FOREIGN TABLE LargeB (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_other`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_other`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_other`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''LargeB''');
> CREATE FOREIGN TABLE MediumA (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_other`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_other`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_other`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''MediumA''');
> CREATE FOREIGN TABLE MediumB (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_other`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_other`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_other`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_other`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_other`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_other`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''MediumB''');
> CREATE FOREIGN TABLE SmallA (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_small`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_small`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_small`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_small`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_small`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallA''');
> CREATE FOREIGN TABLE SmallB (
> documentID string,
> BigDecimalValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`BigDecimalValue`'),
> BigIntegerValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`BigIntegerValue`'),
> BooleanValue boolean OPTIONS (NAMEINSOURCE '`dvqe_small`.`BooleanValue`'),
> ByteNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`ByteNum`'),
> CharValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`CharValue`'),
> DateValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`DateValue`'),
> DoubleNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`DoubleNum`'),
> FloatNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`FloatNum`'),
> IntKey integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`IntKey`'),
> LongNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`LongNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`ShortValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`dvqe_small`.`StringKey`'),
> StringNum string OPTIONS (NAMEINSOURCE '`dvqe_small`.`StringNum`'),
> TimeValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`TimeValue`'),
> TimestampValue string OPTIONS (NAMEINSOURCE '`dvqe_small`.`TimestampValue`'),
> type string OPTIONS (NAMEINSOURCE '`dvqe_small`.`type`'),
> IntNum integer OPTIONS (NAMEINSOURCE '`dvqe_small`.`IntNum`'),
> CONSTRAINT PK0 PRIMARY KEY(documentID)
> ) OPTIONS (NAMEINSOURCE '`dvqe_small`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''SmallB''');
> CREATE FOREIGN PROCEDURE getDocument(IN id string NOT NULL OPTIONS (ANNOTATION 'The document id of what documents to return'), IN keyspace string NOT NULL OPTIONS (ANNOTATION 'The keyspace name used to retrieve the document')) RETURNS TABLE (result blob)
> OPTIONS (ANNOTATION 'Return a json document that match the given document id as BLOB')
> CREATE FOREIGN PROCEDURE getDocuments(IN id string NOT NULL OPTIONS (ANNOTATION 'The document id or SQL like pattern of what documents to return, for example, the ''%'' sign is used to define wildcards (missing letters) both before and after the pattern'), IN keyspace string NOT NULL OPTIONS (ANNOTATION 'The keyspace name used to retrieve the documents')) RETURNS TABLE (result blob)
> OPTIONS (ANNOTATION 'Returns json documents that match the given document id or id pattern as BLOBs')
> {code}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5092) Joining tables from S3 occasionaly fails with NumberFormatException
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5092?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-5092:
------------------------------------------------
Debi Rieden <drieden(a)redhat.com> changed the Status of [bug 1499846|https://bugzilla.redhat.com/show_bug.cgi?id=1499846] from VERIFIED to CLOSED
> Joining tables from S3 occasionaly fails with NumberFormatException
> -------------------------------------------------------------------
>
> Key: TEIID-5092
> URL: https://issues.jboss.org/browse/TEIID-5092
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Steven Hawkins
> Priority: Critical
> Fix For: 10.0, 8.12.x-6.4
>
>
> Running any query that reads multiple tables from an Amazon S3 datasource sometimes fails with the following exception:
> {noformat}
> [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue3373) Connector worker process failed for atomic-request=ZwjBqkPjJdw2.386.4.689: java.lang.NumberFormatException: For input string: ""
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65) [rt.jar:1.8.0_131]
> at java.lang.Long.parseLong(Long.java:601) [rt.jar:1.8.0_131]
> at java.lang.Long.parseLong(Long.java:631) [rt.jar:1.8.0_131]
> at java.text.DigitList.getLong(DigitList.java:195) [rt.jar:1.8.0_131]
> at java.text.DecimalFormat.parse(DecimalFormat.java:2051) [rt.jar:1.8.0_131]
> at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1869) [rt.jar:1.8.0_131]
> at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1514) [rt.jar:1.8.0_131]
> at java.text.DateFormat.parse(DateFormat.java:364) [rt.jar:1.8.0_131]
> at org.teiid.translator.amazon.s3.S3ProcedureExecution.next(S3ProcedureExecution.java:488) [translator-amazon-s3-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:433)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:236)
> at sun.reflect.GeneratedMethodAccessor211.invoke(Unknown Source) [:1.8.0_131]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_131]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_131]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy79.more(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309)
> 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_131]
> 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_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]
> {noformat}.
> The actual input string reffered to in the stack trace occasionaly contains garbage data.
> This is caused by unsynchronized access to a static SimpleDateFormat field here: https://github.com/teiid/teiid/blob/64-8.12.x/connectors/translator-amazo...
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5124) Osisoft translator - Syntax error on datasource for queries with LOCATE
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5124?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-5124:
------------------------------------------------
Debi Rieden <drieden(a)redhat.com> changed the Status of [bug 1506285|https://bugzilla.redhat.com/show_bug.cgi?id=1506285] from VERIFIED to CLOSED
> Osisoft translator - Syntax error on datasource for queries with LOCATE
> -----------------------------------------------------------------------
>
> Key: TEIID-5124
> URL: https://issues.jboss.org/browse/TEIID-5124
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Driver
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Fix For: 8.12.x-6.4, 10.1
>
>
> Running a query with LOCATE function causes a syntax error on the PI server:
> {code:sql}
> SELECT INTKEY FROM BQT1.SmallA WHERE LOCATE(2, INTKEY, 1) = 1
> {code}
> is pushed as
> {code:sql}
> SELECT g_0.IntKey AS c_0 FROM dvqe..SmallA AS g_0 WHERE cast(g_0.IntKey AS String)'2'1 = 1
> {code}
> and fails with
> {noformat}
> org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [SQL: SELECT TOP 100 g_0.IntKey AS c_0 FROM dvqe..SmallA AS g_0 WHERE cast(g_0.IntKey AS String)'2'1 = 1]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:363)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_141]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_141]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy79.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_141]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_141]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_141]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_141]
> Caused by: java.sql.SQLException: [PIOLEDBENT] [SQL Parser] [Line 1:90] Syntax error near '2'
> at com.osisoft.jdbc.StatementImpl.executeQuery(StatementImpl.java:360)
> at org.jboss.jca.adapters.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:344)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:119) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> ... 18 more
> Caused by: com.osisoft.rdsa.RdsaException: [PIOLEDBENT] [SQL Parser] [Line 1:90] Syntax error near '2'
> at com.osisoft.rdsa.Command.ExecuteReader(Native Method)
> at com.osisoft.rdsa.Command.executeReader(Command.java:79)
> at com.osisoft.jdbc.StatementImpl.executeQuery(StatementImpl.java:356)
> ... 20 more
> {noformat}
> Furthermore, query such as
> {code:sql}
> SELECT INTKEY, LOCATE(1, STRINGNUM) FROM BQT1.SmallA
> {code}
> fails on teiid (before push down) with
> {noformat}
> java.lang.IndexOutOfBoundsException: Index: 2, Size: 2
> at java.util.ArrayList.rangeCheck(ArrayList.java:653) [rt.jar:1.8.0_141]
> at java.util.ArrayList.get(ArrayList.java:429) [rt.jar:1.8.0_141]
> at org.teiid.translator.jdbc.pi.PIExecutionFactory$1.translate(PIExecutionFactory.java:89) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.JDBCExecutionFactory.translate(JDBCExecutionFactory.java:539) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.pi.PIExecutionFactory.translate(PIExecutionFactory.java:260) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.SQLConversionVisitor.append(SQLConversionVisitor.java:111) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.visit(SQLStringVisitor.java:834) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.SQLConversionVisitor.visit(SQLConversionVisitor.java:306) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.DerivedColumn.acceptVisitor(DerivedColumn.java:47) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:91) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.SQLConversionVisitor.append(SQLConversionVisitor.java:130) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:106) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.visit(SQLStringVisitor.java:767) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.Select.acceptVisitor(Select.java:110) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:91) [teiid-api-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.SQLConversionVisitor.append(SQLConversionVisitor.java:130) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.TranslatedCommand.translateCommand(TranslatedCommand.java:76) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.JDBCBaseExecution.translateCommand(JDBCBaseExecution.java:120) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:114) [translator-jdbc-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:363)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_141]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_141]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_141]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_141]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy79.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_141]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149) [rt.jar:1.8.0_141]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:624) [rt.jar:1.8.0_141]
> at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_141]
> {noformat}
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-5196) Osisoft Translator - Wrong data returned for some JOIN queries when integer and float columns are compared
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5196?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-5196:
------------------------------------------------
Debi Rieden <drieden(a)redhat.com> changed the Status of [bug 1530529|https://bugzilla.redhat.com/show_bug.cgi?id=1530529] from VERIFIED to CLOSED
> Osisoft Translator - Wrong data returned for some JOIN queries when integer and float columns are compared
> ----------------------------------------------------------------------------------------------------------
>
> Key: TEIID-5196
> URL: https://issues.jboss.org/browse/TEIID-5196
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Connector
> Affects Versions: 8.12.x-6.4
> Reporter: Andrej Šmigala
> Assignee: Ramesh Reddy
> Fix For: 8.12.x-6.4, 10.1
>
>
> When using equality comparison between an integer and float columns in a WHERE or ON clause, Teiid pushes it to Osisoft PI with both columns cast as double.
> There seems to be a bug in Osisoft PI which causes the non-positive float values in the result for such a query to be returned as NULL (or not at all).
> E.g.
> {code:sql|title=Teiid query}
> SELECT BQT1.MediumA.IntNum, BQT1.MediumB.FloatNum
> FROM BQT1.MediumA
> FULL JOIN BQT1.MediumB
> ON BQT1.MediumA.IntNum = BQT1.MediumB.FloatNum
> WHERE
> BQT1.MediumA.IntNum >= -10
> AND BQT1.MediumA.IntNum < 5
> AND (BQT1.MediumB.FloatNum >= -10
> AND BQT1.MediumB.FloatNum < 5)
> {code}
> is translated to
> {code:sql|title=Pushed Osisoft PI query}
> SELECT g_0.IntNum, g_1.FloatNum
> FROM dvqe..MediumA AS g_0, dvqe..MediumB AS g_1
> WHERE
> cast(g_0.IntNum AS Double) = cast(g_1.FloatNum AS Double)
> AND g_0.IntNum < 5
> AND g_1.FloatNum >= -10.0
> AND g_1.FloatNum < 5.0
> AND g_0.IntNum >= -10
> {code}
> which seems to be correct, but returns the wrong result:
> ||IntNum||FloatNum||
> |1|1|
> |2|2|
> |3|3|
> |4|4|
> Note that the only the positive values are returned, even though the criteria match also negative values (which are present in the source table).
> If the cast to double in the source query is removed (or replaced with cast to single), the query returns the expected results.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months
[JBoss JIRA] (TEIID-4976) criteria duplicated when criteria includes the same columns as dependent join criteria
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4976?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-4976:
------------------------------------------------
Debi Rieden <drieden(a)redhat.com> changed the Status of [bug 1492802|https://bugzilla.redhat.com/show_bug.cgi?id=1492802] from VERIFIED to CLOSED
> criteria duplicated when criteria includes the same columns as dependent join criteria
> --------------------------------------------------------------------------------------
>
> Key: TEIID-4976
> URL: https://issues.jboss.org/browse/TEIID-4976
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7.11.6_2
> Reporter: Marc Shirley
> Assignee: Steven Hawkins
> Fix For: 10.0, 8.12.x-6.4, 8.12.12.6_3, 8.7.13.6_2
>
>
> Submitting a query that uses the same column for the join condition and criteria results in the criteria being duplicated on the dependent side of the join.
> For example:
> SELECT * FROM A, B
> WHERE B.id = A.id AND A.id IN ('1','2','3') OPTION MAKEDEP B;
> Results in the dependent side query looking like:
> SELECT ... FROM B WHERE B.id IN ('1','2','3') AND B.id IN ('1','2','3');
> This looks to have already been resolved in later versions, but I was not able to find the original JIRA that would have addressed this issue.
--
This message was sent by Atlassian JIRA
(v7.5.0#75005)
6 years, 7 months