[JBoss JIRA] (TEIID-4517) Add support for deleting child objects
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4517?page=com.atlassian.jira.plugin... ]
Work on TEIID-4517 started by Van Halbert.
------------------------------------------
> Add support for deleting child objects
> --------------------------------------
>
> Key: TEIID-4517
> URL: https://issues.jboss.org/browse/TEIID-4517
> Project: Teiid
> Issue Type: Feature Request
> Components: Misc. Connectors
> Affects Versions: 9.2, 8.12.7.6_3
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
> Fix For: 9.2
>
>
> Infinispan cache dsl translator currently doesn't support deleting child objects when using complex POJO classes.
> Example of complex POJO:
> {code:plain}
> package org.jboss.qe.jdg.remote.protobuf.complex;
> /* @Indexed */
> message Person {
>
> /* @IndexedField(index=true, store=false) */
> required int32 id = 1;
>
> /* @IndexedField */
> required string name = 2;
>
> /* @IndexedField */
> optional string email = 3;
>
> /* @IndexedField(index=true, store=false) */
> repeated PhoneNumber phones = 4;
> /* @Indexed */
> message Address {
>
> /* @IndexedField */
> required string Address = 1;
>
> /* @IndexedField(index=true, store=false) */
> required string City = 2;
>
> /* @IndexedField(index=true, store=false) */
> required string State = 3;
> }
> /* @IndexedField(index=true, store=false) */
> optional Address address = 5;
> }
>
> /* @Indexed */
> message PhoneNumber {
>
> /* @IndexedField */
> required string number = 1;
> }
> {code}
> Mapped metadata:
> {code:sql}
> CREATE FOREIGN TABLE Address (
> Address string NOT NULL PRIMARY KEY OPTIONS (NAMEINSOURCE 'address.Address', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> City string NOT NULL OPTIONS (NAMEINSOURCE 'address.City', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> State string NOT NULL OPTIONS (NAMEINSOURCE 'address.State', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> id integer NOT NULL OPTIONS (NAMEINSOURCE 'id', SELECTABLE FALSE, SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> CONSTRAINT FK_PERSON FOREIGN KEY(id) REFERENCES Person (id) OPTIONS (NAMEINSOURCE 'address')
> ) OPTIONS (UPDATABLE TRUE);
>
> CREATE FOREIGN TABLE Person (
> id integer NOT NULL OPTIONS (NAMEINSOURCE 'id', SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> name string NOT NULL OPTIONS (NAMEINSOURCE 'name', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> email string OPTIONS (NAMEINSOURCE 'email', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> CONSTRAINT PK_ID PRIMARY KEY(id)
> ) OPTIONS (UPDATABLE TRUE);
>
> CREATE FOREIGN TABLE PhoneNumber (
> number string NOT NULL PRIMARY KEY OPTIONS (NAMEINSOURCE 'phones.number', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> id integer NOT NULL OPTIONS (NAMEINSOURCE 'id', SELECTABLE FALSE, SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> CONSTRAINT FK_PERSON FOREIGN KEY(id) REFERENCES Person (id) OPTIONS (NAMEINSOURCE 'phones')
> ) OPTIONS (UPDATABLE TRUE);
> {code}
> Expected usage:
> {code:sql}
> DELETE FROM PhoneNumber WHERE id=3
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years
[JBoss JIRA] (TEIID-4516) Add support for updating child objects
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4516?page=com.atlassian.jira.plugin... ]
Work on TEIID-4516 started by Van Halbert.
------------------------------------------
> Add support for updating child objects
> --------------------------------------
>
> Key: TEIID-4516
> URL: https://issues.jboss.org/browse/TEIID-4516
> Project: Teiid
> Issue Type: Feature Request
> Components: Misc. Connectors
> Affects Versions: 9.2, 8.12.7.6_3
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
> Fix For: 9.2
>
>
> When using complex pojo with JDG 6.6, updating child tables doesn't do anything. It doesn't update the rows, but neither throws exception.
> The problem appears for both usages of JDG cache (annotated POJOs, protobuf+marshaller). I have following pojo structure:
> {code:plain}
> package org.jboss.qe.jdg.remote.protobuf.complex;
> /* @Indexed */
> message Person {
>
> /* @IndexedField(index=true, store=false) */
> required int32 id = 1;
>
> /* @IndexedField */
> required string name = 2;
>
> /* @IndexedField */
> optional string email = 3;
>
> /* @IndexedField(index=true, store=false) */
> repeated PhoneNumber phones = 4;
> /* @Indexed */
> message Address {
>
> /* @IndexedField */
> required string Address = 1;
>
> /* @IndexedField(index=true, store=false) */
> required string City = 2;
>
> /* @IndexedField(index=true, store=false) */
> required string State = 3;
> }
> /* @IndexedField(index=true, store=false) */
> optional Address address = 5;
> }
>
> /* @Indexed */
> message PhoneNumber {
>
> /* @IndexedField */
> required string number = 1;
> }
> {code}
> That is, one top-level POJO class Person, and two child POJO classes: Address(1-to-1) and PhoneNumber(1-to-N). Neither Address nor PhoneNumber tables could be updated. The DDL is following:
> {code:sql}
> CREATE FOREIGN TABLE Address (
> Address string NOT NULL PRIMARY KEY OPTIONS (NAMEINSOURCE 'address.Address', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> City string NOT NULL OPTIONS (NAMEINSOURCE 'address.City', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> State string NOT NULL OPTIONS (NAMEINSOURCE 'address.State', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> id integer NOT NULL OPTIONS (NAMEINSOURCE 'id', SELECTABLE FALSE, SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> CONSTRAINT FK_PERSON FOREIGN KEY(id) REFERENCES Person (id) OPTIONS (NAMEINSOURCE 'address')
> ) OPTIONS (UPDATABLE TRUE);
>
> CREATE FOREIGN TABLE Person (
> id integer NOT NULL OPTIONS (NAMEINSOURCE 'id', SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> name string NOT NULL OPTIONS (NAMEINSOURCE 'name', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> email string OPTIONS (NAMEINSOURCE 'email', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> CONSTRAINT PK_ID PRIMARY KEY(id)
> ) OPTIONS (UPDATABLE TRUE);
>
> CREATE FOREIGN TABLE PhoneNumber (
> number string NOT NULL PRIMARY KEY OPTIONS (NAMEINSOURCE 'phones.number', SEARCHABLE 'Searchable', NATIVE_TYPE 'java.lang.String'),
> id integer NOT NULL OPTIONS (NAMEINSOURCE 'id', SELECTABLE FALSE, SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> CONSTRAINT FK_PERSON FOREIGN KEY(id) REFERENCES Person (id) OPTIONS (NAMEINSOURCE 'phones')
> ) OPTIONS (UPDATABLE TRUE);
> {code}
> INSERT queries to prepare data:
> {code:sql}
> INSERT INTO Person(id,name,email) VALUES (1,'name1','email1')
> INSERT INTO Address(id,Address,City,State) VALUES (1,'address1','city1','state1')
> INSERT INTO PhoneNumber(id, number) VALUES (1, '001234567')
> INSERT INTO PhoneNumber(id, number) VALUES (1, '001234568')
> {code}
> UPDATE queries and queries for checking results:
> * 1-to-1
> {code:sql}UPDATE Address SET city='newCity' WHERE id=1{code}
> {code:sql}SELECT * FROM Person,Address{code}
> * 1-to-n
> {code:sql}UPDATE PhoneNumber SET number='newNumber' WHERE id=1{code}
> {code:sql}SELECT * FROM Person,PhoneNumber{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years
[JBoss JIRA] (TEIID-4599) Infinispan DSL Translator metadata import: optional protobuf boolean fields are not nullable in imported tables
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4599?page=com.atlassian.jira.plugin... ]
Van Halbert closed TEIID-4599.
------------------------------
Resolution: Duplicate Issue
See TEIID-3534
> Infinispan DSL Translator metadata import: optional protobuf boolean fields are not nullable in imported tables
> ---------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-4599
> URL: https://issues.jboss.org/browse/TEIID-4599
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.7.6_3
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
>
> When using Infinispan DSL translator in use case with protobuf descriptor and custom marshaller then optional boolean protobuf fields are not imported as nullable (see NOT NULL near BooleanValue column in the DDL pasted below). This means that these columns have to be set when doing any insert.
> Protobuf descriptor:
> {code:java|title=SmallA.proto}
> package org.jboss.qe.jdg.remote.protobuf;
> message SmallA {
> required int32 intKey = 1;
> optional string stringNum = 2;
> required string stringKey = 3;
> optional float floatNum = 4;
> optional string bigIntegerValue = 5;
> optional int32 shortValue = 6;
> optional double doubleNum = 7;
> optional bytes objectValue = 8;
> optional int32 intNum = 9;
> optional string bigDecimalValue = 10;
> optional int64 longNum = 11;
> optional bool booleanValue = 12;
> optional int64 timeStampValue = 13;
> optional int32 byteNum = 14;
> optional int64 timeValue = 15;
> optional int64 dateValue = 16;
> optional int32 charValue = 17;
> }
> {code}
> VDB:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <vdb name="teiid4590" version="1">
> <model name="jdgSource1" type="PHYSICAL">
> <source name="jdgSource1" connection-jndi-name="java:/infinispanRemoteDSL"
> translator-name="infinispan-cache-dsl" />
> </model>
> </vdb>
> {code}
> SQL query used:
> {code:sql}
> INSERT INTO jdgSource1.SmallA(intKey,stringKey) VALUES(1,'1')
> {code}
> Error on execute:
> {code}
> 09:47:16,828 INFO [MultiPlatformProcessRunner] 09:47:16,827 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue0) TEIID30020 Processing exception for request WwSb1MLjGZXu.0 'TEIID30492 Element jdgSource1.SmallA.booleanValue of jdgSource1.SmallA is neither nullable nor has a default value. A value must be specified in the insert.'. Originally QueryValidatorException Request.java:334. Enable more detailed logging to see the entire stacktrace.
> 09:47:16,875 INFO [TeiidConnectionUtils] Closing connection org.teiid.jdbc.ConnectionImpl@55dfebeb
> 09:47:16,878 ERROR [LoggingTestListener] Error in test.
> org.teiid.jdbc.TeiidSQLException: TEIID30492 Element jdgSource1.SmallA.booleanValue of jdgSource1.SmallA is neither nullable nor has a default value. A value must be specified in the insert.
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:721) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:560) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:268) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:306) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy31.read(Unknown Source) ~[?:?]
> at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:405) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:569) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1063) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:338) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.jboss.qe.dvqe.reproducers.Teiid4590Test.testStagingTableMetadataLoad(Teiid4590Test.java:86) ~[test-classes/:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) ~[testng-6.8.21.jar:?]
> at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:200) ~[testng-6.8.21.jar:?]
> at org.jboss.qe.tests.listeners.DBAllocatorAwareTestListener.run(DBAllocatorAwareTestListener.java:808) ~[db-annotations-0.1-SNAPSHOT.jar:?]
> at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:212) ~[testng-6.8.21.jar:?]
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:689) [testng-6.8.21.jar:?]
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882) [testng-6.8.21.jar:?]
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189) [testng-6.8.21.jar:?]
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) [testng-6.8.21.jar:?]
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) [testng-6.8.21.jar:?]
> at org.testng.TestRunner.privateRun(TestRunner.java:767) [testng-6.8.21.jar:?]
> at org.testng.TestRunner.run(TestRunner.java:617) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:348) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunner.run(SuiteRunner.java:254) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) [testng-6.8.21.jar:?]
> at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224) [testng-6.8.21.jar:?]
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1149) [testng-6.8.21.jar:?]
> at org.testng.TestNG.run(TestNG.java:1057) [testng-6.8.21.jar:?]
> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:132) [surefire-testng-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112) [surefire-testng-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99) [surefire-testng-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:147) [surefire-testng-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) [surefire-booter-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) [surefire-booter-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) [surefire-booter-2.19.1.jar:2.19.1]
> Caused by: org.teiid.api.exception.query.QueryValidatorException: TEIID30492 Element jdgSource1.SmallA.booleanValue of jdgSource1.SmallA is neither nullable nor has a default value. A value must be specified in the insert.
> at org.teiid.dqp.internal.process.Request.validateWithVisitor(Request.java:334) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.Request.validateQuery(Request.java:290) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:418) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:470) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:642) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> {code}
> Resulting DDL metadata:
> {code:sql}
> CREATE FOREIGN TABLE SmallA (
> intKey integer NOT NULL OPTIONS (NAMEINSOURCE 'intKey', SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> stringNum string OPTIONS (NAMEINSOURCE 'stringNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'java.lang.String'),
> stringKey string NOT NULL OPTIONS (NAMEINSOURCE 'stringKey', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'java.lang.String'),
> floatNum float OPTIONS (NAMEINSOURCE 'floatNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'float'),
> bigIntegerValue biginteger OPTIONS (NAMEINSOURCE 'bigIntegerValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'java.lang.String'),
> shortValue short OPTIONS (NAMEINSOURCE 'shortValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
> doubleNum double OPTIONS (NAMEINSOURCE 'doubleNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'double'),
> objectValue varbinary OPTIONS (NAMEINSOURCE 'objectValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'byte[]'),
> intNum integer OPTIONS (NAMEINSOURCE 'intNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
> bigDecimalValue bigdecimal OPTIONS (NAMEINSOURCE 'bigDecimalValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'java.lang.String'),
> longNum long OPTIONS (NAMEINSOURCE 'longNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'long'),
> booleanValue boolean NOT NULL OPTIONS (NAMEINSOURCE 'booleanValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'boolean'),
> timeStampValue timestamp OPTIONS (NAMEINSOURCE 'timeStampValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'long'),
> byteNum byte OPTIONS (NAMEINSOURCE 'byteNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
> timeValue time OPTIONS (NAMEINSOURCE 'timeValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'long'),
> dateValue date OPTIONS (NAMEINSOURCE 'dateValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'long'),
> charValue char OPTIONS (NAMEINSOURCE 'charValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
> CONSTRAINT PK_INTKEY PRIMARY KEY(intKey)
> ) OPTIONS (UPDATABLE TRUE);
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years
[JBoss JIRA] (TEIID-4599) Infinispan DSL Translator metadata import: optional protobuf boolean fields are not nullable in imported tables
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4599?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4599:
------------------------------------
This is an issue with JDG and hence (TEIID-3534) the reason to make boolean columns required.
> Infinispan DSL Translator metadata import: optional protobuf boolean fields are not nullable in imported tables
> ---------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-4599
> URL: https://issues.jboss.org/browse/TEIID-4599
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.7.6_3
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Critical
>
> When using Infinispan DSL translator in use case with protobuf descriptor and custom marshaller then optional boolean protobuf fields are not imported as nullable (see NOT NULL near BooleanValue column in the DDL pasted below). This means that these columns have to be set when doing any insert.
> Protobuf descriptor:
> {code:java|title=SmallA.proto}
> package org.jboss.qe.jdg.remote.protobuf;
> message SmallA {
> required int32 intKey = 1;
> optional string stringNum = 2;
> required string stringKey = 3;
> optional float floatNum = 4;
> optional string bigIntegerValue = 5;
> optional int32 shortValue = 6;
> optional double doubleNum = 7;
> optional bytes objectValue = 8;
> optional int32 intNum = 9;
> optional string bigDecimalValue = 10;
> optional int64 longNum = 11;
> optional bool booleanValue = 12;
> optional int64 timeStampValue = 13;
> optional int32 byteNum = 14;
> optional int64 timeValue = 15;
> optional int64 dateValue = 16;
> optional int32 charValue = 17;
> }
> {code}
> VDB:
> {code:xml}
> <?xml version="1.0" encoding="UTF-8" standalone="yes"?>
> <vdb name="teiid4590" version="1">
> <model name="jdgSource1" type="PHYSICAL">
> <source name="jdgSource1" connection-jndi-name="java:/infinispanRemoteDSL"
> translator-name="infinispan-cache-dsl" />
> </model>
> </vdb>
> {code}
> SQL query used:
> {code:sql}
> INSERT INTO jdgSource1.SmallA(intKey,stringKey) VALUES(1,'1')
> {code}
> Error on execute:
> {code}
> 09:47:16,828 INFO [MultiPlatformProcessRunner] 09:47:16,827 WARN [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue0) TEIID30020 Processing exception for request WwSb1MLjGZXu.0 'TEIID30492 Element jdgSource1.SmallA.booleanValue of jdgSource1.SmallA is neither nullable nor has a default value. A value must be specified in the insert.'. Originally QueryValidatorException Request.java:334. Enable more detailed logging to see the entire stacktrace.
> 09:47:16,875 INFO [TeiidConnectionUtils] Closing connection org.teiid.jdbc.ConnectionImpl@55dfebeb
> 09:47:16,878 ERROR [LoggingTestListener] Error in test.
> org.teiid.jdbc.TeiidSQLException: TEIID30492 Element jdgSource1.SmallA.booleanValue of jdgSource1.SmallA is neither nullable nor has a default value. A value must be specified in the insert.
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:721) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:560) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:268) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:306) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at com.sun.proxy.$Proxy31.read(Unknown Source) ~[?:?]
> at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:405) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:569) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1063) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:338) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.jboss.qe.dvqe.reproducers.Teiid4590Test.testStagingTableMetadataLoad(Teiid4590Test.java:86) ~[test-classes/:?]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_102]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_102]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_102]
> at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_102]
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:85) ~[testng-6.8.21.jar:?]
> at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:200) ~[testng-6.8.21.jar:?]
> at org.jboss.qe.tests.listeners.DBAllocatorAwareTestListener.run(DBAllocatorAwareTestListener.java:808) ~[db-annotations-0.1-SNAPSHOT.jar:?]
> at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:212) ~[testng-6.8.21.jar:?]
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:689) [testng-6.8.21.jar:?]
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:882) [testng-6.8.21.jar:?]
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1189) [testng-6.8.21.jar:?]
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:124) [testng-6.8.21.jar:?]
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:108) [testng-6.8.21.jar:?]
> at org.testng.TestRunner.privateRun(TestRunner.java:767) [testng-6.8.21.jar:?]
> at org.testng.TestRunner.run(TestRunner.java:617) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:348) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:343) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:305) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunner.run(SuiteRunner.java:254) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52) [testng-6.8.21.jar:?]
> at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86) [testng-6.8.21.jar:?]
> at org.testng.TestNG.runSuitesSequentially(TestNG.java:1224) [testng-6.8.21.jar:?]
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1149) [testng-6.8.21.jar:?]
> at org.testng.TestNG.run(TestNG.java:1057) [testng-6.8.21.jar:?]
> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:132) [surefire-testng-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.executeSingleClass(TestNGDirectoryTestSuite.java:112) [surefire-testng-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:99) [surefire-testng-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:147) [surefire-testng-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.booter.ForkedBooter.invokeProviderInSameClassLoader(ForkedBooter.java:290) [surefire-booter-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.booter.ForkedBooter.runSuitesInProcess(ForkedBooter.java:242) [surefire-booter-2.19.1.jar:2.19.1]
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:121) [surefire-booter-2.19.1.jar:2.19.1]
> Caused by: org.teiid.api.exception.query.QueryValidatorException: TEIID30492 Element jdgSource1.SmallA.booleanValue of jdgSource1.SmallA is neither nullable nor has a default value. A value must be specified in the insert.
> at org.teiid.dqp.internal.process.Request.validateWithVisitor(Request.java:334) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.Request.validateQuery(Request.java:290) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.Request.generatePlan(Request.java:418) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.Request.processRequest(Request.java:470) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.processNew(RequestWorkItem.java:642) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:337) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) ~[?:1.8.0_102]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) ~[?:1.8.0_102]
> at java.lang.Thread.run(Thread.java:745) ~[?:1.8.0_102]
> {code}
> Resulting DDL metadata:
> {code:sql}
> CREATE FOREIGN TABLE SmallA (
> intKey integer NOT NULL OPTIONS (NAMEINSOURCE 'intKey', SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> stringNum string OPTIONS (NAMEINSOURCE 'stringNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'java.lang.String'),
> stringKey string NOT NULL OPTIONS (NAMEINSOURCE 'stringKey', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'java.lang.String'),
> floatNum float OPTIONS (NAMEINSOURCE 'floatNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'float'),
> bigIntegerValue biginteger OPTIONS (NAMEINSOURCE 'bigIntegerValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'java.lang.String'),
> shortValue short OPTIONS (NAMEINSOURCE 'shortValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
> doubleNum double OPTIONS (NAMEINSOURCE 'doubleNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'double'),
> objectValue varbinary OPTIONS (NAMEINSOURCE 'objectValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'byte[]'),
> intNum integer OPTIONS (NAMEINSOURCE 'intNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
> bigDecimalValue bigdecimal OPTIONS (NAMEINSOURCE 'bigDecimalValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'java.lang.String'),
> longNum long OPTIONS (NAMEINSOURCE 'longNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'long'),
> booleanValue boolean NOT NULL OPTIONS (NAMEINSOURCE 'booleanValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'boolean'),
> timeStampValue timestamp OPTIONS (NAMEINSOURCE 'timeStampValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'long'),
> byteNum byte OPTIONS (NAMEINSOURCE 'byteNum', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
> timeValue time OPTIONS (NAMEINSOURCE 'timeValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'long'),
> dateValue date OPTIONS (NAMEINSOURCE 'dateValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'long'),
> charValue char OPTIONS (NAMEINSOURCE 'charValue', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
> CONSTRAINT PK_INTKEY PRIMARY KEY(intKey)
> ) OPTIONS (UPDATABLE TRUE);
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years
[JBoss JIRA] (TEIID-4471) Assertion error with temp table delete
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4471?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-4471.
-----------------------------------
Resolution: Done
You can look into adapting the unit test to reproduce. The TestTempTables.testDeleteRemovingPage https://github.com/teiid/teiid/blob/1b1963b5c7bac258a2b8b749d71b72413f695... performs the same deletion scenario (helpTestDelete) three times with various settings
1. Test defaults (BufferManagerFactory), 256 batch size, max object storage size of 1 MB, and memory buffer space of 2 MB.
2. Small memory (max reserve/processing of ~1000KB) and batch size (10 rows)
3. Mixed memory (max reserve/processing of ~1000KB) and batch size (250 rows)
> Assertion error with temp table delete
> --------------------------------------
>
> Key: TEIID-4471
> URL: https://issues.jboss.org/browse/TEIID-4471
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 9.1, 8.13.7, 9.0.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 8.12.8.6_3, 9.0.5, 8.13.7, 9.1
>
>
> Related to TEIID-4405 there are circumstances where a temp table deletion results in an assertion error of "delete failed". A possible scenario (that is dependent upon a number of factors, including batch sizes and garbage collection) requires the values stored by the tuple browser to get out of sync with what is stored by the page such that a delete is attempted twice.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years
[JBoss JIRA] (TEIID-4603) Insert issue when cache contains multiple pojo's with the same key value
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4603?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4603:
------------------------------------
Changing the logic so that when an insert of the root object is to be done, the get(key) method is called, instead of using the DSL searching. This will ensure an object is returned and an exception is thrown due to a duplicate object with this key already exist.
> Insert issue when cache contains multiple pojo's with the same key value
> ------------------------------------------------------------------------
>
> Key: TEIID-4603
> URL: https://issues.jboss.org/browse/TEIID-4603
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 9.2
> Reporter: Van Halbert
> Assignee: Van Halbert
> Priority: Blocker
> Fix For: 9.2, 8.12.8.6_3
>
>
> There is an INSERT issue when there are multiple pojo's stored in the same cache and the keys' overlap (meaning the different types of pojo's have the same key).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
9 years