[JBoss JIRA] (TEIID-5044) Using "SHOW PLAN" statement only shows initial plan
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5044:
-------------------------------------
Summary: Using "SHOW PLAN" statement only shows initial plan
Key: TEIID-5044
URL: https://issues.jboss.org/browse/TEIID-5044
Project: Teiid
Issue Type: Bug
Components: JDBC Driver
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 10.0, 9.3.3
There is no way to retrieve the incremental or last version of plan that includes updated node stats when using the "SHOW PLAN" statement.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5043) Add an option to output plan text as yaml
by Steven Hawkins (JIRA)
Steven Hawkins created TEIID-5043:
-------------------------------------
Summary: Add an option to output plan text as yaml
Key: TEIID-5043
URL: https://issues.jboss.org/browse/TEIID-5043
Project: Teiid
Issue Type: Sub-task
Components: Query Engine
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 10.0
The plan text is close to yaml format. We should take a pass at converting it to yaml and making it more compact so that the plans displayed in the logs are more human readable.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5042) Couchbase supported data types restriction issues
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5042?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5042:
----------------------------------
Priority: Major (was: Blocker)
> this is too restrictive, why not float? time/date/timestamp? And let the translator to handle conversion in both directions.
The source metadata should be reflective of the source, not Teiid as that can be added in a view layer. Pushing this handling into the translator layer is not required and can introduce errors in predicates and other situations where the conversion may need to be explicit.
> Couchbase leaves out silently the columns with unsupported data types in INSERTs.
Due to legacy design issues, the translators do not advertise their supported types for validation. The first step to address this is throw an exception and to document the supported types.
> documentID is (in code) considered String. This is too restrictive. In the code there might be String.valueOf() instead of (String) cast (N1QLUpdateVisitor.java:139). It would help users to use their primary keys (from existing datasets) as document ids in couchbase.
I'll have to investigate this and maybe get [~kylin]'s input.
> Couchbase supported data types restriction issues
> -------------------------------------------------
>
> Key: TEIID-5042
> URL: https://issues.jboss.org/browse/TEIID-5042
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
>
> # Couchbase translator supports only subset of supported datatypes in Teiid:
> ??All supported type in a Couchbase JSON item: null, String, Integer, Long, Double, BigInteger, BigDecimal, JsonObject, JsonArray??
> #* this is too restrictive, why not float? time/date/timestamp? And let the translator to handle conversion in both directions.
> # Couchbase leaves out silently the columns with unsupported data types in INSERTs.
> #* See the example in bottom of description.
> # documentID is (in code) considered String. This is too restrictive. In the code there might be String.valueOf() instead of (String) cast (N1QLUpdateVisitor.java:139). It would help users to use their primary keys (from existing datasets) as document ids in couchbase.
> Example:
> For a source model DDL:
> {code:sql|title=DDL}
> CREATE FOREIGN TABLE SmallA (
> documentID string PRIMARY KEY,
> type string OPTIONS (NAMEINSOURCE '`type`'),
> FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
> BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
> LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
> DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
> BigDecimalValue bigdecimal 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_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''nullSmallA''');
> {code}
> and query
> {code:sql|title=INSERT query}
> INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5);
> {code}
> there is incorrect source command being pushed to couchbase. The float column is not being pushed at all, no warning appears.
> {code:title=teiid-command.log}
> 14:49:37,061 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) ReyS5USI/FcT START USER COMMAND: startTime=2017-08-29 14:49:37.061 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT applicationName=JDBC principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5)
> 14:49:38,375 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT START DATA SRC COMMAND: startTime=2017-08-29 14:49:38.375 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum, DoubleNum, FloatNum, LongNum) VALUES ('4', '1', 1, '1', 5.0, 5.0, 5)
> 14:49:38,380 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT SOURCE SRC COMMAND: endTime=2017-08-29 14:49:38.38 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sourceCommand=[INSERT INTO `dvqe_crud` (KEY, VALUE) VALUES ('4', {"DoubleNum":5.0,"IntNum":1,"LongNum":5,"StringNum":"1","StringKey":"1"}) RETURNING META(`dvqe_crud`).id AS PK]
> 14:49:38,962 DEBUG [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue151) ReyS5USI/FcT END SRC COMMAND: endTime=2017-08-29 14:49:38.962 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security finalRowCount=1 cpuTime(ns)=12306369
> 14:49:38,966 INFO [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue152) ReyS5USI/FcT END USER COMMAND: endTime=2017-08-29 14:49:38.966 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5042) Couchbase supported data types restriction issues
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5042?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-5042:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1486332
Bugzilla Update: Perform
> Couchbase supported data types restriction issues
> -------------------------------------------------
>
> Key: TEIID-5042
> URL: https://issues.jboss.org/browse/TEIID-5042
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Steven Hawkins
> Priority: Blocker
>
> # Couchbase translator supports only subset of supported datatypes in Teiid:
> ??All supported type in a Couchbase JSON item: null, String, Integer, Long, Double, BigInteger, BigDecimal, JsonObject, JsonArray??
> #* this is too restrictive, why not float? time/date/timestamp? And let the translator to handle conversion in both directions.
> # Couchbase leaves out silently the columns with unsupported data types in INSERTs.
> #* See the example in bottom of description.
> # documentID is (in code) considered String. This is too restrictive. In the code there might be String.valueOf() instead of (String) cast (N1QLUpdateVisitor.java:139). It would help users to use their primary keys (from existing datasets) as document ids in couchbase.
> Example:
> For a source model DDL:
> {code:sql|title=DDL}
> CREATE FOREIGN TABLE SmallA (
> documentID string PRIMARY KEY,
> type string OPTIONS (NAMEINSOURCE '`type`'),
> FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
> BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
> StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
> CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
> LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
> DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
> ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
> ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
> BigDecimalValue bigdecimal 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_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''nullSmallA''');
> {code}
> and query
> {code:sql|title=INSERT query}
> INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5);
> {code}
> there is incorrect source command being pushed to couchbase. The float column is not being pushed at all, no warning appears.
> {code:title=teiid-command.log}
> 14:49:37,061 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) ReyS5USI/FcT START USER COMMAND: startTime=2017-08-29 14:49:37.061 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT applicationName=JDBC principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5)
> 14:49:38,375 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT START DATA SRC COMMAND: startTime=2017-08-29 14:49:38.375 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum, DoubleNum, FloatNum, LongNum) VALUES ('4', '1', 1, '1', 5.0, 5.0, 5)
> 14:49:38,380 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT SOURCE SRC COMMAND: endTime=2017-08-29 14:49:38.38 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sourceCommand=[INSERT INTO `dvqe_crud` (KEY, VALUE) VALUES ('4', {"DoubleNum":5.0,"IntNum":1,"LongNum":5,"StringNum":"1","StringKey":"1"}) RETURNING META(`dvqe_crud`).id AS PK]
> 14:49:38,962 DEBUG [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue151) ReyS5USI/FcT END SRC COMMAND: endTime=2017-08-29 14:49:38.962 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security finalRowCount=1 cpuTime(ns)=12306369
> 14:49:38,966 INFO [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue152) ReyS5USI/FcT END USER COMMAND: endTime=2017-08-29 14:49:38.966 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 finalRowCount=1
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5042) Couchbase supported data types restriction issues
by Jan Stastny (JIRA)
Jan Stastny created TEIID-5042:
----------------------------------
Summary: Couchbase supported data types restriction issues
Key: TEIID-5042
URL: https://issues.jboss.org/browse/TEIID-5042
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.x-6.4
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Blocker
# Couchbase translator supports only subset of supported datatypes in Teiid:
??All supported type in a Couchbase JSON item: null, String, Integer, Long, Double, BigInteger, BigDecimal, JsonObject, JsonArray??
#* this is too restrictive, why not float? time/date/timestamp? And let the translator to handle conversion in both directions.
# Couchbase leaves out silently the columns with unsupported data types in INSERTs.
#* See the example in bottom of description.
# documentID is (in code) considered String. This is too restrictive. In the code there might be String.valueOf() instead of (String) cast (N1QLUpdateVisitor.java:139). It would help users to use their primary keys (from existing datasets) as document ids in couchbase.
Example:
For a source model DDL:
{code:sql|title=DDL}
CREATE FOREIGN TABLE SmallA (
documentID string PRIMARY KEY,
type string OPTIONS (NAMEINSOURCE '`type`'),
FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
BigDecimalValue bigdecimal 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_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''nullSmallA''');
{code}
and query
{code:sql|title=INSERT query}
INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5);
{code}
there is incorrect source command being pushed to couchbase. The float column is not being pushed at all, no warning appears.
{code:title=teiid-command.log}
14:49:37,061 INFO [org.teiid.COMMAND_LOG] (New I/O worker #2) ReyS5USI/FcT START USER COMMAND: startTime=2017-08-29 14:49:37.061 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT applicationName=JDBC principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum,DoubleNum, FloatNum,LongNum) VALUES (4, '1', 1, '1',CAST(5.00 AS double),CAST(5.00 AS float), 5)
14:49:38,375 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT START DATA SRC COMMAND: startTime=2017-08-29 14:49:38.375 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sql=INSERT INTO Source.SmallA (documentID, StringKey, IntNum, StringNum, DoubleNum, FloatNum, LongNum) VALUES ('4', '1', 1, '1', 5.0, 5.0, 5)
14:49:38,380 DEBUG [org.teiid.COMMAND_LOG] (Worker32_QueryProcessorQueue150) ReyS5USI/FcT SOURCE SRC COMMAND: endTime=2017-08-29 14:49:38.38 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security sourceCommand=[INSERT INTO `dvqe_crud` (KEY, VALUE) VALUES ('4', {"DoubleNum":5.0,"IntNum":1,"LongNum":5,"StringNum":"1","StringKey":"1"}) RETURNING META(`dvqe_crud`).id AS PK]
14:49:38,962 DEBUG [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue151) ReyS5USI/FcT END SRC COMMAND: endTime=2017-08-29 14:49:38.962 requestID=ReyS5USI/FcT.9 sourceCommandID=0 executionID=27 txID=null modelName=Source translatorName=couchbase sessionID=ReyS5USI/FcT principal=user@teiid-security finalRowCount=1 cpuTime(ns)=12306369
14:49:38,966 INFO [org.teiid.COMMAND_LOG] (Worker31_QueryProcessorQueue152) ReyS5USI/FcT END USER COMMAND: endTime=2017-08-29 14:49:38.966 requestID=ReyS5USI/FcT.9 txID=null sessionID=ReyS5USI/FcT principal=user@teiid-security vdbName=couchbase_crud vdbVersion=1 finalRowCount=1
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months
[JBoss JIRA] (TEIID-5041) Couchbase documentID column enforced also in a view
by Jan Stastny (JIRA)
Jan Stastny created TEIID-5041:
----------------------------------
Summary: Couchbase documentID column enforced also in a view
Key: TEIID-5041
URL: https://issues.jboss.org/browse/TEIID-5041
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.x-6.4
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Blocker
{code:sql|query against view}
INSERT INTO SmallA_Direct (IntKey, StringKey, IntNum, StringNum) VALUES (4, '1', 1, '1');
{code}
results in
{code:|title=ERROR}
13:11:43,493 ERROR [org.teiid.CONNECTOR] (Worker30_QueryProcessorQueue146) Connector worker process failed for atomic-request=ReyS5USI/FcT.7.0.26: org.teiid.core.TeiidRuntimeException: TEIID29006 A documentID is necessary to insert/update/delete nested array, INSERT INTO `dvqe_crud` (documentID, `type`, `StringKey`, `IntNum`, `StringNum`) VALUES (convert(4, string), 'nullSmallA', '1', 1, '1')
at org.teiid.translator.couchbase.N1QLUpdateVisitor.visit(N1QLUpdateVisitor.java:149) [translator-couchbase-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
at org.teiid.language.Insert.acceptVisitor(Insert.java:57) [teiid-api-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
at org.teiid.language.visitor.AbstractLanguageVisitor.visitNode(AbstractLanguageVisitor.java:51) [teiid-api-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
at org.teiid.language.visitor.SQLStringVisitor.append(SQLStringVisitor.java:91) [teiid-api-8.12.11.6_4-redhat-64-5.jar:8.12.11.6_4-redhat-64-5]
at org.teiid.translator.couchbase.CouchbaseUpdateExecution.execute(CouchbaseUpdateExecution.java:52) [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$1.execute(ConnectorWorkItem.java:401)
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:363)
at sun.reflect.GeneratedMethodAccessor183.invoke(Unknown Source) [: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.$Proxy91.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]
13:11:43,501 WARN [org.teiid.PROCESSOR] (Worker29_QueryProcessorQueue147) TEIID30020 Processing exception for request ReyS5USI/FcT.7 'TEIID30504 Source: TEIID29006 A documentID is necessary to insert/update/delete nested array, INSERT INTO `dvqe_crud` (documentID, `type`, `StringKey`, `IntNum`, `StringNum`) VALUES (convert(4, string), 'nullSmallA', '1', 1, '1')'. Originally TeiidProcessingException N1QLUpdateVisitor.java:149. Enable more detailed logging to see the entire stacktrace.
{code}
My take from the implementing code:
The actual source cmd contains documentID and it has no NAMEINSOURCE option (after which the column is considered PK/documentID of couchbase document). But the name of the column is probably being compared on the level of view, not resulting source command.
{code:sql|title=source model ddl}
CREATE FOREIGN TABLE SmallA (
documentID string PRIMARY KEY,
type string OPTIONS (NAMEINSOURCE '`type`'),
FloatNum float OPTIONS (NAMEINSOURCE '`FloatNum`'),
BigIntegerValue biginteger OPTIONS (NAMEINSOURCE '`BigIntegerValue`'),
StringKey string OPTIONS (NAMEINSOURCE '`StringKey`'),
CharValue string OPTIONS (NAMEINSOURCE '`CharValue`'),
LongNum long OPTIONS (NAMEINSOURCE '`LongNum`'),
DoubleNum double OPTIONS (NAMEINSOURCE '`DoubleNum`'),
ObjectValue string OPTIONS (NAMEINSOURCE '`ObjectValue`'),
ShortValue integer OPTIONS (NAMEINSOURCE '`ShortValue`'),
BigDecimalValue bigdecimal 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_crud`', UPDATABLE TRUE, "teiid_couchbase:ISARRAYTABLE" 'false', "teiid_couchbase:NAMEDTYPEPAIR" '`type`:''nullSmallA''');
{code}
{code:sql|title=DDL of view}
CREATE VIEW SmallA_Direct (IntKey integer PRIMARY KEY,
StringKey string,
IntNum integer,
StringNum string)
OPTIONS (UPDATABLE 'TRUE')
AS
SELECT CONVERT(documentID,integer), StringKey, IntNum, StringNum FROM Source.SmallA;
CREATE TRIGGER ON SmallA_Direct INSTEAD OF INSERT AS FOR EACH ROW
BEGIN ATOMIC
INSERT INTO Source.SmallA(documentID, type, StringKey, IntNum, StringNum) VALUES
(NEW.IntKey, 'nullSmallA', NEW.StringKey, NEW.IntNum, NEW.StringNum);
END;
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 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 reopened TEIID-5030:
-----------------------------------
> 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)
6 years, 8 months
[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:
------------------------------------
Should I reopen this issue?
> 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)
6 years, 8 months
[JBoss JIRA] (TEIID-5040) Add translator override to change the Google spreadsheet
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5040?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5040:
----------------------------------
Component/s: Misc. Connectors
Fix Version/s: 10.x
This is possible, but it's also slightly involved - given the potential for sheet name conflicts, needing to store the spreadsheet name in the metadata, etc.
> Add translator override to change the Google spreadsheet
> --------------------------------------------------------
>
> Key: TEIID-5040
> URL: https://issues.jboss.org/browse/TEIID-5040
> Project: Teiid
> Issue Type: Enhancement
> Components: Misc. Connectors
> Reporter: Debbie Steigner
> Assignee: Steven Hawkins
> Fix For: 10.x
>
>
> We would like to add a "sheet name" override to the googlesheet resource adapter. So we can configure multiple google sheets without having to configure multiple resource adaptors (1 for each google sheet.)
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
6 years, 8 months