[JBoss JIRA] (TEIID-4526) Integrate with Debezium for CDC for maintaining materialized views
by Emmanuel Bernard (JIRA)
[ https://issues.jboss.org/browse/TEIID-4526?page=com.atlassian.jira.plugin... ]
Emmanuel Bernard commented on TEIID-4526:
-----------------------------------------
I know you're starting on a different direction but here is an idea [~rhauch] and I discussed on the subject.
This proposal is ignoring aggregation for the moment.
The idea is to get a list of id that changed from Debezium and execute the query on this subset of ids.
This avoids the need to deeply understand state changes and run or approximate them on the materialized view.
It also has some performance feedback loop.
Here is the proposal proper.
- Materialized views keep a reference to the primary keys (joined columns) of the original table rows composing it
- upon Debezium change events, capture the table and id (and joined column values) at bay
- place the rows involving the table and id (and joined column values) into an update queue
- take the queue and run the original materialized view query restricted to the relevant ids or joined column value
- upgrade the materialized view with the new information for the touched rows
- if the update queue has filled up since then, repeat and rince
I understand that we might only be able to run a subset of the materialized views this way but they should be identifiable and we could use the fallback approach mentioned above for the others.
The benefits of this method are:
- it has a natural back pressure mechanism to batch refreshes
- it does not try to be _too_ smart and change the materialized view just from the individuals change events but rather collect the dirty rows
- the query is "incremental" in the sense that only the impacted rows are recomputed.
> Integrate with Debezium for CDC for maintaining materialized views
> ------------------------------------------------------------------
>
> Key: TEIID-4526
> URL: https://issues.jboss.org/browse/TEIID-4526
> Project: Teiid
> Issue Type: Feature Request
> Components: Server
> Affects Versions: 9.2
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Priority: Critical
>
> Integrate with Debezium so that Teiid will be able to consume and react to the row-level change events and do something interesting with them, such as update the materialized view(s).
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4599) Infinispan DSL Translator metadata import: optional protobuf boolean fields are not nullable in imported tables
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4599?page=com.atlassian.jira.plugin... ]
Jan Stastny updated TEIID-4599:
-------------------------------
Summary: Infinispan DSL Translator metadata import: optional protobuf boolean fields are not nullable in imported tables (was: Infinispan DSL Translator metadata import: optional protobuf fields are not nullable in imported tables)
> 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)
8 years, 1 month
[JBoss JIRA] (TEIID-4599) Infinispan DSL Translator metadata import: optional protobuf fields are not nullable in imported tables
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4599?page=com.atlassian.jira.plugin... ]
Jan Stastny updated TEIID-4599:
-------------------------------
Description:
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}
was:
When using Infinispan DSL translator in use case with protobuf descriptor and custom marshaller then optional protobuf fields are not imported as nullable. This means all the columns have to be set when doing an 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}
In annotated pojos scenario it is the same.
{code:java|title=CustomerReport.java}
@Indexed
public class CustomerReport implements Serializable {
private static final long serialVersionUID = 1L;
private Integer customerId;
private Integer totalAmount;
@NumericField @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
@ProtoField(number=1,required = true)
public Integer getCustomerId() {
return customerId;
}
public void setCustomerId(Integer customerId) {
this.customerId = customerId;
}
@Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
@ProtoField(number = 2)
public Integer getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(Integer totalAmount) {
this.totalAmount = totalAmount;
}
}
{code}
The totalAmount field is not required, but resulting DDL metadata doesn't allow nullable.
{code:sql}
CREATE FOREIGN TABLE CustomerReport (
customerId integer NOT NULL OPTIONS (NAMEINSOURCE 'customerId', SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
totalAmount integer OPTIONS (NAMEINSOURCE 'totalAmount', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
CONSTRAINT PK_CUSTOMERID PRIMARY KEY(customerId)
) OPTIONS (UPDATABLE TRUE);
{code}
> Infinispan DSL Translator metadata import: optional protobuf 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)
8 years, 1 month
[JBoss JIRA] (TEIID-4601) Infinispan DSL Translator: cannot insert into byte array column
by Jan Stastny (JIRA)
Jan Stastny created TEIID-4601:
----------------------------------
Summary: Infinispan DSL Translator: cannot insert into byte array column
Key: TEIID-4601
URL: https://issues.jboss.org/browse/TEIID-4601
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.7.6_3
Reporter: Jan Stastny
Assignee: Van Halbert
When a POJO class field is of type byte[] , insert into a table, which is mapped to the POJO class fails with:
{code:plain}
Caused by: org.teiid.translator.TranslatorException: Conversion from String to byte is not supported
at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:624) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-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.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[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]
Caused by: java.lang.IllegalArgumentException: Conversion from String to byte is not supported
at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:797) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at org.teiid.core.util.StringUtil.valueOf(StringUtil.java:768) ~[teiid-jdbc-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at org.teiid.translator.object.ClassRegistry.executeSetMethod(ClassRegistry.java:139) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:608) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:579) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.writeColumnData(ObjectUpdateExecution.java:572) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.handleInsert(ObjectUpdateExecution.java:208) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.executeUpdate(ObjectUpdateExecution.java:143) ~[?:?]
at org.teiid.translator.object.ObjectUpdateExecution.execute(ObjectUpdateExecution.java:100) ~[?:?]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem$1.execute(ConnectorWorkItem.java:404) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:366) ~[teiid-engine-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.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at com.sun.proxy.$Proxy82.execute(Unknown Source) ~[?:?]
at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) ~[teiid-engine-8.12.7.6_3-redhat-1.jar:8.12.7.6_3-redhat-1]
at java.util.concurrent.FutureTask.run(FutureTask.java:266) ~[?:1.8.0_102]
at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) ~[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}
POJO class:
{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}
Java code used to insert:
{code:java}
PreparedStatement pSt = con.prepareStatement(
"INSERT INTO jdgSource1.SmallA(intKey,stringNum,stringKey,floatNum,bigIntegerValue,shortValue,doubleNum,objectValue,intNum,bigDecimalValue,longNum,booleanValue,timeStampValue,byteNum,timeValue,dateValue,charValue) VALUES"
+ "(1,'1','1',1.0,1,1,1,?,1,1.00,1,true,{ts '2016-01-01 12:00:00'},1,'12:00:00','2016-01-01','1')");
pSt.setBytes(1, "1".getBytes());
pSt.executeUpdate();
{code}
The cause is that internally the object translator uses StringUtil which can't handle byte type.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4595) Wrong pushdown of several spatial functions to Oracle
by RH Bugzilla Integration (JIRA)
[ https://issues.jboss.org/browse/TEIID-4595?page=com.atlassian.jira.plugin... ]
RH Bugzilla Integration updated TEIID-4595:
-------------------------------------------
Bugzilla References: https://bugzilla.redhat.com/show_bug.cgi?id=1397953
Bugzilla Update: Perform
> Wrong pushdown of several spatial functions to Oracle
> -----------------------------------------------------
>
> Key: TEIID-4595
> URL: https://issues.jboss.org/browse/TEIID-4595
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x
> Reporter: Andrej Šmigala
> Assignee: Steven Hawkins
>
> There are several geospatial functions that are wrongly pushed down to oracle
> # {{ST_DISTANCE}} is pushed as {{SDO_GEOM.DISTANCE}} which does not exist, should be {{SDO_GEOM.SDO_DISTANCE}}. This results in runtime error.
> # {{ST_CROSSES}} and {{ST_OVERLAPS}} are both pushed as {{SDO_RELATE}} with mask {{"overlapbydisjoint"}} which does not exists, should be {{"overlapbdydisjoint"}} (sic} for {{ST_CROSSES}} and {{"overlapbdyintersect"}} for {{ST_OVERLAPS}}. This results in {{false}} being returned for all calls to the two functions
> # Using {{ST_DISJOINT}} in the select clause (but not in criteria) results in the following error when evaluating to true:
> {noformat}
> org.teiid.jdbc.TeiidSQLException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 SpatialModel: 99999 Unexpected exception while translating results: Fail to convert to internal representation
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:135)
> at org.teiid.jdbc.TeiidSQLException.create(TeiidSQLException.java:71)
> at org.teiid.jdbc.StatementImpl.postReceiveResults(StatementImpl.java:706)
> at org.teiid.jdbc.StatementImpl.access$100(StatementImpl.java:64)
> at org.teiid.jdbc.StatementImpl$2.onCompletion(StatementImpl.java:545)
> at org.teiid.client.util.ResultsFuture.done(ResultsFuture.java:135)
> at org.teiid.client.util.ResultsFuture.access$200(ResultsFuture.java:40)
> at org.teiid.client.util.ResultsFuture$1.receiveResults(ResultsFuture.java:79)
> at org.teiid.net.socket.SocketServerInstanceImpl.receivedMessage(SocketServerInstanceImpl.java:268)
> at org.teiid.net.socket.SocketServerInstanceImpl.read(SocketServerInstanceImpl.java:306)
> at sun.reflect.GeneratedMethodAccessor5.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.teiid.net.socket.SocketServerConnectionFactory$ShutdownHandler.invoke(SocketServerConnectionFactory.java:98)
> at com.sun.proxy.$Proxy18.read(Unknown Source)
> at org.teiid.net.socket.SocketServerInstanceImpl$RemoteInvocationHandler$1.get(SocketServerInstanceImpl.java:405)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:554)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1060)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:323)
> at org.jboss.bqt.framework.AbstractQuery.execute(AbstractQuery.java:208)
> at org.jboss.bqt.client.testcase.ProcessResults.executeTest(ProcessResults.java:280)
> at org.jboss.bqt.client.testcase.ProcessResults.runTestCase(ProcessResults.java:166)
> at org.jboss.bqt.client.TestClient.runScenario(TestClient.java:209)
> at org.jboss.bqt.client.TestClient.runTest(TestClient.java:132)
> at org.jboss.bqt.client.TestClient.runTest(TestClient.java:113)
> at org.jboss.qe.bqt.BQTHelper.startTest(BQTHelper.java:59)
> at org.jboss.dv.test.bqt.Utils.runScenarioTest(Utils.java:185)
> at org.jboss.dv.test.bqt.TestPassRDBMS.testRdbms(TestPassRDBMS.java:210)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.testng.internal.MethodInvocationHelper.invokeMethod(MethodInvocationHelper.java:86)
> at org.testng.internal.MethodInvocationHelper$1.runTestMethod(MethodInvocationHelper.java:197)
> at org.jboss.qe.DVQETestListener.run(DVQETestListener.java:266)
> at org.testng.internal.MethodInvocationHelper.invokeHookable(MethodInvocationHelper.java:209)
> at org.testng.internal.Invoker.invokeMethod(Invoker.java:639)
> at org.testng.internal.Invoker.invokeTestMethod(Invoker.java:820)
> at org.testng.internal.Invoker.invokeTestMethods(Invoker.java:1128)
> at org.testng.internal.TestMethodWorker.invokeTestMethods(TestMethodWorker.java:129)
> at org.testng.internal.TestMethodWorker.run(TestMethodWorker.java:112)
> at org.testng.TestRunner.privateRun(TestRunner.java:782)
> at org.testng.TestRunner.run(TestRunner.java:632)
> at org.testng.SuiteRunner.runTest(SuiteRunner.java:366)
> at org.testng.SuiteRunner.runSequentially(SuiteRunner.java:361)
> at org.testng.SuiteRunner.privateRun(SuiteRunner.java:319)
> at org.testng.SuiteRunner.run(SuiteRunner.java:268)
> at org.testng.SuiteRunnerWorker.runSuite(SuiteRunnerWorker.java:52)
> at org.testng.SuiteRunnerWorker.run(SuiteRunnerWorker.java:86)
> at org.testng.TestNG.runSuitesSequentially(TestNG.java:1244)
> at org.testng.TestNG.runSuitesLocally(TestNG.java:1169)
> at org.testng.TestNG.run(TestNG.java:1064)
> at org.apache.maven.surefire.testng.TestNGExecutor.run(TestNGExecutor.java:70)
> at org.apache.maven.surefire.testng.TestNGDirectoryTestSuite.execute(TestNGDirectoryTestSuite.java:108)
> at org.apache.maven.surefire.testng.TestNGProvider.invoke(TestNGProvider.java:111)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.apache.maven.surefire.util.ReflectionUtils.invokeMethodWithArray(ReflectionUtils.java:164)
> at org.apache.maven.surefire.booter.ProviderFactory$ProviderProxy.invoke(ProviderFactory.java:110)
> at org.apache.maven.surefire.booter.SurefireStarter.invokeProvider(SurefireStarter.java:172)
> at org.apache.maven.surefire.booter.SurefireStarter.runSuitesInProcessWhenForked(SurefireStarter.java:104)
> at org.apache.maven.surefire.booter.ForkedBooter.main(ForkedBooter.java:70)
> Caused by: org.teiid.core.TeiidProcessingException: TEIID30504 Remote org.teiid.core.TeiidProcessingException: TEIID30504 SpatialModel: 99999 Unexpected exception while translating results: Fail to convert to internal representation
> at org.teiid.dqp.internal.process.DataTierTupleSource.exceptionOccurred(DataTierTupleSource.java:401)
> at org.teiid.dqp.internal.process.DataTierTupleSource.nextTuple(DataTierTupleSource.java:161)
> at org.teiid.query.processor.relational.AccessNode.nextBatchDirect(AccessNode.java:391)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:282)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:145)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:151)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:114)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:164)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:146)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:472)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:348)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:274)
> 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)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: org.teiid.core.TeiidException: 99999 Remote org.teiid.translator.TranslatorException: 99999 Unexpected exception while translating results: Fail to convert to internal representation
> at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:351)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:436)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:236)
> at sun.reflect.GeneratedMethodAccessor88.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:498)
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy47.more(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:266)
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> ... 6 more
> Caused by: java.sql.SQLException: Remote java.sql.SQLException: Fail to convert to internal representation
> at oracle.jdbc.driver.CharCommonAccessor.getBoolean(CharCommonAccessor.java:183)
> at oracle.jdbc.driver.GeneratedStatement.getBoolean(GeneratedStatement.java:129)
> at oracle.jdbc.driver.GeneratedScrollableResultSet.getBoolean(GeneratedScrollableResultSet.java:232)
> at org.jboss.jca.adapters.jdbc.WrappedResultSet.getBoolean(WrappedResultSet.java:594)
> at org.teiid.translator.jdbc.JDBCExecutionFactory.retrieveValue(JDBCExecutionFactory.java:1068)
> at org.teiid.translator.jdbc.JDBCQueryExecution.next(JDBCQueryExecution.java:344)
> ... 18 more
> {noformat}
> This is because it is pushed down as {{SDO_GEOM.RELATE}} with mask {{"disjoint"}}, which in oracle returns the string {{'DISJOINT'}} instead of the more expected {{'TRUE'}}.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4599) Infinispan DSL Translator metadata import: optional protobuf fields are not nullable in imported tables
by Jan Stastny (JIRA)
[ https://issues.jboss.org/browse/TEIID-4599?page=com.atlassian.jira.plugin... ]
Jan Stastny reassigned TEIID-4599:
----------------------------------
Assignee: Van Halbert (was: Steven Hawkins)
> Infinispan DSL Translator metadata import: optional protobuf 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 protobuf fields are not imported as nullable. This means all the columns have to be set when doing an 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}
> In annotated pojos scenario it is the same.
> {code:java|title=CustomerReport.java}
> @Indexed
> public class CustomerReport implements Serializable {
> private static final long serialVersionUID = 1L;
> private Integer customerId;
> private Integer totalAmount;
> @NumericField @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
> @ProtoField(number=1,required = true)
> public Integer getCustomerId() {
> return customerId;
> }
> public void setCustomerId(Integer customerId) {
> this.customerId = customerId;
> }
> @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
> @ProtoField(number = 2)
> public Integer getTotalAmount() {
> return totalAmount;
> }
> public void setTotalAmount(Integer totalAmount) {
> this.totalAmount = totalAmount;
> }
> }
> {code}
> The totalAmount field is not required, but resulting DDL metadata doesn't allow nullable.
> {code:sql}
> CREATE FOREIGN TABLE CustomerReport (
> customerId integer NOT NULL OPTIONS (NAMEINSOURCE 'customerId', SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> totalAmount integer OPTIONS (NAMEINSOURCE 'totalAmount', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
> CONSTRAINT PK_CUSTOMERID PRIMARY KEY(customerId)
> ) OPTIONS (UPDATABLE TRUE);
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4600) Infinispan DSL Translator metadata import: optional protobuf fields are not nullable in imported tables
by Jan Stastny (JIRA)
Jan Stastny created TEIID-4600:
----------------------------------
Summary: Infinispan DSL Translator metadata import: optional protobuf fields are not nullable in imported tables
Key: TEIID-4600
URL: https://issues.jboss.org/browse/TEIID-4600
Project: Teiid
Issue Type: Bug
Components: Misc. Connectors
Affects Versions: 8.12.7.6_3
Reporter: Jan Stastny
Assignee: Steven Hawkins
Priority: Critical
When using Infinispan DSL translator in use case with protobuf descriptor and custom marshaller then optional protobuf fields are not imported as nullable. This means all the columns have to be set when doing an 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}
In annotated pojos scenario it is the same.
{code:java|title=CustomerReport.java}
@Indexed
public class CustomerReport implements Serializable {
private static final long serialVersionUID = 1L;
private Integer customerId;
private Integer totalAmount;
@NumericField @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
@ProtoField(number=1,required = true)
public Integer getCustomerId() {
return customerId;
}
public void setCustomerId(Integer customerId) {
this.customerId = customerId;
}
@Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
@ProtoField(number = 2)
public Integer getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(Integer totalAmount) {
this.totalAmount = totalAmount;
}
}
{code}
The totalAmount field is not required, but resulting DDL metadata doesn't allow nullable.
{code:sql}
CREATE FOREIGN TABLE CustomerReport (
customerId integer NOT NULL OPTIONS (NAMEINSOURCE 'customerId', SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
totalAmount integer OPTIONS (NAMEINSOURCE 'totalAmount', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
CONSTRAINT PK_CUSTOMERID PRIMARY KEY(customerId)
) OPTIONS (UPDATABLE TRUE);
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-4599) Infinispan DSL Translator metadata import: optional protobuf fields are not nullable in imported tables
by Jan Stastny (JIRA)
Jan Stastny created TEIID-4599:
----------------------------------
Summary: Infinispan DSL Translator metadata import: optional protobuf 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: Steven Hawkins
Priority: Critical
When using Infinispan DSL translator in use case with protobuf descriptor and custom marshaller then optional protobuf fields are not imported as nullable. This means all the columns have to be set when doing an 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}
In annotated pojos scenario it is the same.
{code:java|title=CustomerReport.java}
@Indexed
public class CustomerReport implements Serializable {
private static final long serialVersionUID = 1L;
private Integer customerId;
private Integer totalAmount;
@NumericField @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
@ProtoField(number=1,required = true)
public Integer getCustomerId() {
return customerId;
}
public void setCustomerId(Integer customerId) {
this.customerId = customerId;
}
@Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
@ProtoField(number = 2)
public Integer getTotalAmount() {
return totalAmount;
}
public void setTotalAmount(Integer totalAmount) {
this.totalAmount = totalAmount;
}
}
{code}
The totalAmount field is not required, but resulting DDL metadata doesn't allow nullable.
{code:sql}
CREATE FOREIGN TABLE CustomerReport (
customerId integer NOT NULL OPTIONS (NAMEINSOURCE 'customerId', SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
totalAmount integer OPTIONS (NAMEINSOURCE 'totalAmount', SEARCHABLE 'Unsearchable', NATIVE_TYPE 'int'),
CONSTRAINT PK_CUSTOMERID PRIMARY KEY(customerId)
) OPTIONS (UPDATABLE TRUE);
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-3825) Add a wildfly-swarm-teiid Fraction for running teiid as an uberjar
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-3825?page=com.atlassian.jira.plugin... ]
Kylin Soong edited comment on TEIID-3825 at 11/23/16 10:14 PM:
---------------------------------------------------------------
h2. How to run swarm teiid examples
1. build swarm teiid(teiid/wildfly-swarm-teiid)
2. build swarm teiid example(teiid/wildfly-swarm-teiid-examples)
3. start uberjar like
{code}
java -jar vdb-datafederation/target/vdb-datafederation-swarm.jar
java -jar vdb-materialization/target/vdb-materialization-swarm.jar
java -jar rdbms-as-datasource/target/rdbms-as-datasource-swarm.jar
java -jar loopback-source/target/loopback-source-swarm.jar
{code}
Each module has a readme which contain more depictions and how to run.
I believe there will be some suggestions once you finished the test, for build swarm teiid, I am not configure the swarm related plugin in project, I use wildfly-swarm as parent instead
{code}
<parent>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm</artifactId>
<version>2016.8.1</version>
</parent>
<artifactId>teiid</artifactId>
<name>Teiid</name>
{code}
If take Bob's suggestions, put the swarm teiid together with others, I doubt there may have risk, because wildfly swarm is a sub-project of wildfly, the wildfly feature pack and config api swarm used are always base on latest wildfly version, for example:
* the least version of swarm base on wildfly 10.0.0 is 2016.8.1(swarm start from 2016.9 use wildfly 10.1)
* the teiid master still use wildfly 10.0.0
was (Author: kylin):
h2. How to Test
1. build swarm teiid(teiid/wildfly-swarm-teiid)
2. build swarm teiid example(teiid/wildfly-swarm-teiid-examples)
3. start uberjar like
{code}
java -jar vdb-datafederation/target/vdb-datafederation-swarm.jar
java -jar vdb-materialization/target/vdb-materialization-swarm.jar
java -jar rdbms-as-datasource/target/rdbms-as-datasource-swarm.jar
java -jar loopback-source/target/loopback-source-swarm.jar
{code}
Each module has a readme which contain more depictions and how to run.
I believe there will be some suggestions once you finished the test, for build swarm teiid, I am not configure the swarm related plugin in project, I use wildfly-swarm as parent instead
{code}
<parent>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm</artifactId>
<version>2016.8.1</version>
</parent>
<artifactId>teiid</artifactId>
<name>Teiid</name>
{code}
If take Bob's suggestions, put the swarm teiid together with others, I doubt there may have risk, because wildfly swarm is a sub-project of wildfly, the wildfly feature pack and config api swarm used are always base on latest wildfly version, for example:
* the least version of swarm base on wildfly 10.0.0 is 2016.8.1(swarm start from 2016.9 use wildfly 10.1)
* the teiid master still use wildfly 10.0.0
> Add a wildfly-swarm-teiid Fraction for running teiid as an uberjar
> ------------------------------------------------------------------
>
> Key: TEIID-3825
> URL: https://issues.jboss.org/browse/TEIID-3825
> Project: Teiid
> Issue Type: Feature Request
> Components: Embedded
> Affects Versions: 9.0
> Reporter: Kylin Soong
> Assignee: Kylin Soong
> Fix For: 9.2
>
>
> Fractions within WildFly Swarm are roughly equivalent to subsystems within WildFly, we have teiid subsystem in Server mode, so I think a Fraction is necessary to run teiid with Swarm.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month
[JBoss JIRA] (TEIID-3825) Add a wildfly-swarm-teiid Fraction for running teiid as an uberjar
by Kylin Soong (JIRA)
[ https://issues.jboss.org/browse/TEIID-3825?page=com.atlassian.jira.plugin... ]
Kylin Soong edited comment on TEIID-3825 at 11/23/16 10:13 PM:
---------------------------------------------------------------
h2. How to Test
1. build swarm teiid(teiid/wildfly-swarm-teiid)
2. build swarm teiid example(teiid/wildfly-swarm-teiid-examples)
3. start uberjar like
{code}
java -jar vdb-datafederation/target/vdb-datafederation-swarm.jar
java -jar vdb-materialization/target/vdb-materialization-swarm.jar
java -jar rdbms-as-datasource/target/rdbms-as-datasource-swarm.jar
java -jar loopback-source/target/loopback-source-swarm.jar
{code}
Each module has a readme which contain more depictions and how to run.
I believe there will be some suggestions once you finished the test, for build swarm teiid, I am not configure the swarm related plugin in project, I use wildfly-swarm as parent instead
{code}
<parent>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm</artifactId>
<version>2016.8.1</version>
</parent>
<artifactId>teiid</artifactId>
<name>Teiid</name>
{code}
If take Bob's suggestions, put the swarm teiid together with others, I doubt there may have risk, because wildfly swarm is a sub-project of wildfly, the wildfly feature pack and config api swarm used are always base on latest wildfly version, for example:
* the least version of swarm base on wildfly 10.0.0 is 2016.8.1(swarm start from 2016.9 use wildfly 10.1)
* the teiid master still use wildfly 10.0.0
was (Author: kylin):
h2. How to Test
1. build teiid master
2. build swarm teiid(teiid/wildfly-swarm-teiid)
3. build swarm teiid example(teiid/wildfly-swarm-teiid-examples)
4. start uberjar like
{code}
java -jar vdb-datafederation/target/vdb-datafederation-swarm.jar
java -jar vdb-materialization/target/vdb-materialization-swarm.jar
java -jar rdbms-as-datasource/target/rdbms-as-datasource-swarm.jar
java -jar loopback-source/target/loopback-source-swarm.jar
{code}
Each module has a readme which contain more depictions and how to run.
I believe there will be some suggestions once you finished the test, for build swarm teiid, I am not configure the swarm related plugin in project, I use wildfly-swarm as parent instead
{code}
<parent>
<groupId>org.wildfly.swarm</groupId>
<artifactId>wildfly-swarm</artifactId>
<version>2016.8.1</version>
</parent>
<artifactId>teiid</artifactId>
<name>Teiid</name>
{code}
If take Bob's suggestions, put the swarm teiid together with others, I doubt there may have risk, because wildfly swarm is a sub-project of wildfly, the wildfly feature pack and config api swarm used are always base on latest wildfly version, for example:
* the least version of swarm base on wildfly 10.0.0 is 2016.8.1(swarm start from 2016.9 use wildfly 10.1)
* the teiid master still use wildfly 10.0.0
> Add a wildfly-swarm-teiid Fraction for running teiid as an uberjar
> ------------------------------------------------------------------
>
> Key: TEIID-3825
> URL: https://issues.jboss.org/browse/TEIID-3825
> Project: Teiid
> Issue Type: Feature Request
> Components: Embedded
> Affects Versions: 9.0
> Reporter: Kylin Soong
> Assignee: Kylin Soong
> Fix For: 9.2
>
>
> Fractions within WildFly Swarm are roughly equivalent to subsystems within WildFly, we have teiid subsystem in Server mode, so I think a Fraction is necessary to run teiid with Swarm.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
8 years, 1 month