[JBoss JIRA] (TEIID-5041) Couchbase documentID column enforced also in a view
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5041?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration commented on TEIID-5041:
------------------------------------------------
Van Halbert <vhalbert(a)redhat.com> changed the Status of [bug 1486282|https://bugzilla.redhat.com/show_bug.cgi?id=1486282] from NEW to MODIFIED
> 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
> Fix For: 10.0, 8.12.x-6.4, 9.3.4
>
>
> {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)
8 years
[JBoss JIRA] (TEIID-5014) Unable to use parameterized query with node pg module and Teiid/JBoss VDB
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-5014?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-5014:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1495274
Bugzilla Update: Perform
> Unable to use parameterized query with node pg module and Teiid/JBoss VDB
> -------------------------------------------------------------------------
>
> Key: TEIID-5014
> URL: https://issues.jboss.org/browse/TEIID-5014
> Project: Teiid
> Issue Type: Bug
> Components: ODBC
> Affects Versions: 8.7.11.6_2
> Environment: Teiid runtime 8.7.11
> JBoss Data Virtualization 6.10
> NodeJS 6.9.4
> node pg 6.4.1
> Mac OSX 10.11.6
> Reporter: Brian M
> Assignee: Steven Hawkins
> Fix For: 10.0, 9.2.6, 9.3.3
>
>
> When using node pg 6.4.1 in a node application to connect to a JBoss VDB with Teiid, we are unable to successfully return data with a parameterized query.
> Example from node js application (failure):
> client.query("SELECT * FROM records WHERE recordType = $1", ['TYPE1'], function(err, result) { done(); })
> The above code will actually retrieve rows of data, but the connection will be terminated unexpectedly from the JBoss side, thus resulting in a failure. We can confirm though that the parameter is properly inserted into the variable, and rows of data can be retrieved without issue.
> Also, we have confirmed that when sending a static query, we are able to successfully return data without JBoss terminating the connection. We found this approach from the Teiid blog: http://teiid.blogspot.com/2013/02/access-teiid-from-nodejs.html
> Example from node js application (success):
> client.query("SELECT * FROM records WHERE recordType = 'TYPE1'", function(err, result) { done(); })
> Is there something different about a parameterized query vs. a static query that may cause this issue?
> Are you aware of other individuals who have successfully used parameterized queries with the node pg module and Teiid/JBoss VDB?
> Is it possible that how the ODBC settings for Teiid are configured may have an impact on parameterized queries vs. static queries?
> Link: https://teiid.gitbooks.io/documents/content/client-dev/ODBC_Support.html
> Thank you so much for all your help!
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-4080) Prevent expired client/server certificates from being accepted
by Johnathon Lee (JIRA)
[ https://issues.jboss.org/browse/TEIID-4080?page=com.atlassian.jira.plugin... ]
Johnathon Lee updated TEIID-4080:
---------------------------------
Fix Version/s: 8.7.13.6_2
> Prevent expired client/server certificates from being accepted
> --------------------------------------------------------------
>
> Key: TEIID-4080
> URL: https://issues.jboss.org/browse/TEIID-4080
> Project: Teiid
> Issue Type: Enhancement
> Components: Server
> Affects Versions: 8.12.5
> Reporter: Juraj Duráni
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.7.13.6_2
>
> Attachments: keystore_client.jks, keystore_server_root_expired.jks, truststore.jks, truststore_expired.jks
>
>
> If SSL is enabled (1-way or 2-way) server provides to the client certificate which must be signed by valid certificate of trusted CA.
> If server provides certificate which is signed by certificate of root CA which already expired client accepts this certificate. Client should not accept such certificate.
> This affects 1-way and 2-way authentication modes.
> On the client side, paths are set using teiid-specific properties:
> {code:java}
> System.setProperty("org.teiid.ssl.keyStore", clientKeystorePath);
> System.setProperty("org.teiid.ssl.keyStorePassword", "keystorepswd");
> System.setProperty("org.teiid.ssl.keyAlias", "client");
> System.setProperty("org.teiid.ssl.keyPassword", "keystorepswd");
> System.setProperty("org.teiid.ssl.trustStore", clientTruststorePath);
> System.setProperty("org.teiid.ssl.trustStorePassword", "truststorepswd");
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5074) Support a way provide SEQUENCE in TeiidDialect
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5074?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5074:
---------------------------------------
Did you check if getSelectSequenceNextValString is used? It needs to be a valid expression, which would be something like:
{code}
@Override
public String getSequenceNextValString(String sequenceName) {
return "select __x.return from " + getSelectSequenceNextValString( sequenceName ) +" as __x";
}
@Override
public String getSelectSequenceNextValString(String sequenceName) {
return "(call " + getSelectSequenceNextValString( sequenceName ) +"())";
}
{code}
However if it can be used in a multi-row situation, there will be an issue in that a non-correlated subquery will be evaluated as deteministic. To make that work correctly would require the usage of a function that is marked as non-deterministic.
> Support a way provide SEQUENCE in TeiidDialect
> ----------------------------------------------
>
> Key: TEIID-5074
> URL: https://issues.jboss.org/browse/TEIID-5074
> Project: Teiid
> Issue Type: Enhancement
> Components: JDBC Driver
> Reporter: Ramesh Reddy
> Assignee: Ramesh Reddy
> Fix For: 10.0
>
>
> Currently, the sequence based Table identity generation support is not available in current TeiidDialect. The support will not be direct, but with additional constructs in VDB, we can make this available. Teiid needs to provide a way to call in source specific of way to insert a layer in Teiid to accomplish this.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5047) teiid-jboss-admin throw exception in get vdb
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5047?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5047:
---------------------------------------
No unit tests work fine with that description. It seems to be an issue at the dmr level. The ModelNode.get should not be against a PropertyModelValue - as that is just a single property, not something with children like ObjectModelValue. Getting the properties is just the first logic to try to get at a child, so it's failing there.
Given that it is domain mode, it could be related to TEIID-4551 TEIID-4546 TEIID-4547 which cleaned up handling of domain mode.
Could you try this with logic based upon the 9.1.2 admin?
> teiid-jboss-admin throw exception in get vdb
> --------------------------------------------
>
> Key: TEIID-5047
> URL: https://issues.jboss.org/browse/TEIID-5047
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.12.12.6_3
> Environment: * 8.12.5.redhat-8
> Reporter: Kylin Soong
> Assignee: Steven Hawkins
>
> The return result have a type attribute
> {code}
> [standalone@localhost:9999 /] /subsystem=teiid:get-vdb(vdb-name=A1_DG_EPDM,vdb-version=1)
> {
> "outcome" => "success",
> "result" => {
> "type" => OBJECT,
> "vdb-name" => "A1_DG_EPDM",
> "connection-type" => "BY_VERSION",
> "status" => "LOADING",
> "vdb-version" => 1,
> "vdb-description" => "A1 EPDM 大港(10.76.32.26)",
> {code}
> but the VDBMetadataMapper don't consider this, which cause the following exception throw
> {code}
> Exception in thread "main" java.lang.IllegalArgumentException
> at org.jboss.dmr.ModelValue.getChild(ModelValue.java:112)
> at org.jboss.dmr.PropertyModelValue.getChild(PropertyModelValue.java:117)
> at org.jboss.dmr.ModelNode.get(ModelNode.java:856)
> at org.teiid.adminapi.jboss.VDBMetadataMapper.unwrap(VDBMetadataMapper.java:169)
> at org.teiid.adminapi.jboss.VDBMetadataMapper.unwrap(VDBMetadataMapper.java:61)
> at com.cnpc.datavirt.admin.impl.AdminImpl.getList(AdminImpl.java:172)
> at com.cnpc.datavirt.admin.impl.AdminImpl.getDomainAwareList(AdminImpl.java:157)
> at com.cnpc.datavirt.admin.impl.AdminImpl.getVDB(AdminImpl.java:112)
> at com.cnpc.datavirt.admin.sample.Sample.main(Sample.java:13)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5022) Turn off error messages from OData/SOAP responses
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5022?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5022.
-----------------------------------
Resolution: Won't Fix
Marking as won't fix unless more feedback is given on the circumstances this is needed for.
> Turn off error messages from OData/SOAP responses
> -------------------------------------------------
>
> Key: TEIID-5022
> URL: https://issues.jboss.org/browse/TEIID-5022
> Project: Teiid
> Issue Type: Feature Request
> Components: OData
> Reporter: Steve Tran
> Priority: Optional
>
> There was a request to include the ability to turn off the error messages returned to the client when a bad request was made. For example, if you had a typo in your table, in the request URL, you would get a message that says "Entity does not exist". Or, if you passed in a String instead of a number, you'd get a message about expecting a Decimal but got String.
> The client would like to hide these details so that a generic error message is returned.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5047) teiid-jboss-admin throw exception in get vdb
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5047?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5047:
-------------------------------------
Is it due to the international characters in the description?
> teiid-jboss-admin throw exception in get vdb
> --------------------------------------------
>
> Key: TEIID-5047
> URL: https://issues.jboss.org/browse/TEIID-5047
> Project: Teiid
> Issue Type: Bug
> Components: AdminApi
> Affects Versions: 8.12.12.6_3
> Environment: * 8.12.5.redhat-8
> Reporter: Kylin Soong
> Assignee: Steven Hawkins
>
> The return result have a type attribute
> {code}
> [standalone@localhost:9999 /] /subsystem=teiid:get-vdb(vdb-name=A1_DG_EPDM,vdb-version=1)
> {
> "outcome" => "success",
> "result" => {
> "type" => OBJECT,
> "vdb-name" => "A1_DG_EPDM",
> "connection-type" => "BY_VERSION",
> "status" => "LOADING",
> "vdb-version" => 1,
> "vdb-description" => "A1 EPDM 大港(10.76.32.26)",
> {code}
> but the VDBMetadataMapper don't consider this, which cause the following exception throw
> {code}
> Exception in thread "main" java.lang.IllegalArgumentException
> at org.jboss.dmr.ModelValue.getChild(ModelValue.java:112)
> at org.jboss.dmr.PropertyModelValue.getChild(PropertyModelValue.java:117)
> at org.jboss.dmr.ModelNode.get(ModelNode.java:856)
> at org.teiid.adminapi.jboss.VDBMetadataMapper.unwrap(VDBMetadataMapper.java:169)
> at org.teiid.adminapi.jboss.VDBMetadataMapper.unwrap(VDBMetadataMapper.java:61)
> at com.cnpc.datavirt.admin.impl.AdminImpl.getList(AdminImpl.java:172)
> at com.cnpc.datavirt.admin.impl.AdminImpl.getDomainAwareList(AdminImpl.java:157)
> at com.cnpc.datavirt.admin.impl.AdminImpl.getVDB(AdminImpl.java:112)
> at com.cnpc.datavirt.admin.sample.Sample.main(Sample.java:13)
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years
[JBoss JIRA] (TEIID-5041) Couchbase documentID column enforced also in a view
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5041?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-5041.
-----------------------------------
Fix Version/s: 10.0
8.12.x-6.4
9.3.4
Resolution: Done
On the initial reading this seemed to only relate to the primary key type change. However there existed a related issue (no exception thrown) even with non-primary key columns.
So there were several issues addressed with the commit:
1. we'll rewrite insert statements created from triggers to create as simple of insert expression as possible - that by itself mostly addresses the observed issue.
2. the couchbase logic was missing an assertion error if an insert value is something other than a literal/parameter. This is a limitation of the couchbase logic and the assertion is needed so that we don't allow an insert to proceed without the expected values.
3. changed the planning logic to detect when batched plans may push constructs not supported by the translator. This was not the direct issue seen here, but was possible given our initial planning treatment of reference/parameters as something that will eventually evaluate to a literal - which is not necessarily the case with batching.
> 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
> Fix For: 10.0, 8.12.x-6.4, 9.3.4
>
>
> {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)
8 years