[JBoss JIRA] (TEIID-5091) EdmPrimitiveTypeException in OData4 parse results
by Kylin Soong (JIRA)
Kylin Soong created TEIID-5091:
----------------------------------
Summary: EdmPrimitiveTypeException in OData4 parse results
Key: TEIID-5091
URL: https://issues.jboss.org/browse/TEIID-5091
Project: Teiid
Issue Type: Quality Risk
Components: OData
Affects Versions: 8.12.5
Environment: * JDV 6.3
Reporter: Kylin Soong
Assignee: Steven Hawkins
Decimal type has risk if use odata4 to query data, I would use below example to show how to reproduce the errot:
h3. set up sample data in mysql
{code}
create table test(U_ID Decimal Primary Key);
insert into test values(11);
desc test;
+-------+---------------+------+-----+---------+-------+
| Field | Type | Null | Key | Default | Extra |
+-------+---------------+------+-----+---------+-------+
| U_ID | decimal(10,0) | NO | PRI | NULL | |
+-------+---------------+------+-----+---------+-------+
{code}
h3. Deploy VDB
The VDB only contain one source model
{code}
<model name="TEST">
<property name="importer.useFullSchemaName" value="false"/>
<source name="mysql-connector" translator-name="translator-mysql5" connection-jndi-name="java:/TEST_DS"/>
</model>
{code}
h3. Reproduce
Once the vdb deployed finished, the http://localhost:8080/odata4/TEST_VDB/TEST/test will return below error in web browswer
{code}
<error xmlns="http://docs.oasis-open.org/odata/ns/metadata">
<code>null</code>
<message>
org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints.
</message>
</error>
{code}
The server log have a error like
{code}
15:47:05,306 ERROR [org.teiid.ODATA] (http-0.0.0.0:8180-3) TEIID16050 Unable to process odata request due to: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints. with cause The value '11' does not match the facets' constraints.: org.apache.olingo.server.api.ODataApplicationException: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints.
at org.teiid.olingo.service.TeiidServiceHandler.read(TeiidServiceHandler.java:174) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.apache.olingo.server.core.requests.DataRequest$EntityRequest.execute(DataRequest.java:332)
at org.apache.olingo.server.core.requests.DataRequest.execute(DataRequest.java:255)
at org.apache.olingo.server.core.ServiceDispatcher.internalExecute(ServiceDispatcher.java:160)
at org.apache.olingo.server.core.ServiceDispatcher.execute(ServiceDispatcher.java:98)
at org.apache.olingo.server.core.OData4HttpHandler.process(OData4HttpHandler.java:66)
at org.teiid.olingo.web.ODataServlet.service(ODataServlet.java:43) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at javax.servlet.http.HttpServlet.service(HttpServlet.java:847) [jboss-servlet-api_3.0_spec-1.0.2.Final-redhat-2.jar:1.0.2.Final-redhat-2]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:295) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.teiid.olingo.web.ODataFilter.internalDoFilter(ODataFilter.java:231) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.olingo.web.ODataFilter.doFilter(ODataFilter.java:100) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.9.Final-redhat-2.jar:7.5.9.Final-redhat-2]
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:654) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.17.Final-redhat-1.jar:7.5.17.Final-redhat-1]
at java.lang.Thread.run(Thread.java:748) [rt.jar:1.8.0_131]
Caused by: java.sql.SQLException: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints.
at org.teiid.olingo.service.EntityCollectionResponse.createEntity(EntityCollectionResponse.java:275) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.olingo.service.EntityCollectionResponse.isSameEntity(EntityCollectionResponse.java:151) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.olingo.service.LocalClient.executeSQL(LocalClient.java:280) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.olingo.service.TeiidServiceHandler.executeQuery(TeiidServiceHandler.java:349) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
at org.teiid.olingo.service.TeiidServiceHandler.read(TeiidServiceHandler.java:172) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 25 more
Caused by: org.apache.olingo.commons.api.edm.EdmPrimitiveTypeException: The value '11' does not match the facets' constraints.
at org.apache.olingo.commons.core.edm.primitivetype.EdmDecimal.internalValueToString(EdmDecimal.java:185)
at org.apache.olingo.commons.core.edm.primitivetype.AbstractPrimitiveType.valueToString(AbstractPrimitiveType.java:86)
at org.apache.olingo.server.core.responses.EntityResponse.buildLocation(EntityResponse.java:200)
at org.teiid.olingo.service.EntityCollectionResponse.createEntity(EntityCollectionResponse.java:247) [teiid-olingo-8.12.5.redhat-8.jar:8.12.5.redhat-8]
... 29 more
{code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 2 months
[JBoss JIRA] (TEIID-5090) Issues with matview scripts
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5090?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5090:
---------------------------------------
I was able to address this by adding support for aliasing of delete/update tables. The resolving logic already properly supported this, but the parser didn't allow it. However rewrite logic was added to ensure that the unaliased form is pushed down/planned for backwards compatibility.
I'll update the docs about aliasing.
> Issues with matview scripts
> ---------------------------
>
> Key: TEIID-5090
> URL: https://issues.jboss.org/browse/TEIID-5090
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.x-6.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.0, 9.3.4
>
>
> There are a couple of issues with the script logic. The first is the use of the replace function in the update criteria for updateMatView - this is not generally safe. There are also some checks for internal materialization that look for a null table in the system table, but it's actually the schema that will be null.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5090) Issues with matview scripts
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5090?page=com.atlassian.jira.plugin... ]
Work on TEIID-5090 started by Steven Hawkins.
---------------------------------------------
> Issues with matview scripts
> ---------------------------
>
> Key: TEIID-5090
> URL: https://issues.jboss.org/browse/TEIID-5090
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.x-6.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.0, 9.3.4
>
>
> There are a couple of issues with the script logic. The first is the use of the replace function in the update criteria for updateMatView - this is not generally safe. There are also some checks for internal materialization that look for a null table in the system table, but it's actually the schema that will be null.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5089) Using Teiid Conn. importer in Designer, the cache name is set to "default"
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5089?page=com.atlassian.jira.plugin... ]
Ramesh Reddy updated TEIID-5089:
--------------------------------
Fix Version/s: 10.0
8.12.x-6.4
> Using Teiid Conn. importer in Designer, the cache name is set to "default"
> --------------------------------------------------------------------------
>
> Key: TEIID-5089
> URL: https://issues.jboss.org/browse/TEIID-5089
> Project: Teiid
> Issue Type: Bug
> Components: Infinispan
> Affects Versions: 8.12.x-6.4
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
> Fix For: 10.0, 8.12.x-6.4
>
>
> When using the Teiid Connection importer in Designer to reversen engineer the source table from an existing JDG cache. The following is an example of the DDL returned by teiid:
> {code}
> SET NAMESPACE 'http://www.teiid.org/translator/infinispan/2017' AS teiid_ispn;
> CREATE FOREIGN TABLE Person (
> id integer OPTIONS (ANNOTATION '@Id', SEARCHABLE 'Searchable', NATIVE_TYPE 'int32', "teiid_ispn:TAG" '1'),
> name string OPTIONS (SEARCHABLE 'Searchable', NATIVE_TYPE 'string', "teiid_ispn:TAG" '2'),
> salary double OPTIONS (SEARCHABLE 'Searchable', NATIVE_TYPE 'double', "teiid_ispn:TAG" '3'),
> CONSTRAINT PK_ID PRIMARY KEY(id)
> ) OPTIONS (ANNOTATION '@Indexed', NAMEINSOURCE 'JDGPersonCache.Person', UPDATABLE TRUE, "teiid_ispn:CACHE" 'default');
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5089) Using Teiid Conn. importer in Designer, the cache name is set to "default"
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-5089?page=com.atlassian.jira.plugin... ]
Van Halbert reassigned TEIID-5089:
----------------------------------
Assignee: Ramesh Reddy (was: Van Halbert)
> Using Teiid Conn. importer in Designer, the cache name is set to "default"
> --------------------------------------------------------------------------
>
> Key: TEIID-5089
> URL: https://issues.jboss.org/browse/TEIID-5089
> Project: Teiid
> Issue Type: Bug
> Components: Infinispan
> Affects Versions: 8.12.x-6.4
> Reporter: Van Halbert
> Assignee: Ramesh Reddy
>
> When using the Teiid Connection importer in Designer to reversen engineer the source table from an existing JDG cache. The following is an example of the DDL returned by teiid:
> {code}
> SET NAMESPACE 'http://www.teiid.org/translator/infinispan/2017' AS teiid_ispn;
> CREATE FOREIGN TABLE Person (
> id integer OPTIONS (ANNOTATION '@Id', SEARCHABLE 'Searchable', NATIVE_TYPE 'int32', "teiid_ispn:TAG" '1'),
> name string OPTIONS (SEARCHABLE 'Searchable', NATIVE_TYPE 'string', "teiid_ispn:TAG" '2'),
> salary double OPTIONS (SEARCHABLE 'Searchable', NATIVE_TYPE 'double', "teiid_ispn:TAG" '3'),
> CONSTRAINT PK_ID PRIMARY KEY(id)
> ) OPTIONS (ANNOTATION '@Indexed', NAMEINSOURCE 'JDGPersonCache.Person', UPDATABLE TRUE, "teiid_ispn:CACHE" 'default');
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5087) Infinispan Hotrod error for date/time/timestamp literal in where criteria
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5087?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5087:
-------------------------------------
Here the comparison can be pushed to source as source not aware of the type.
> Infinispan Hotrod error for date/time/timestamp literal in where criteria
> -------------------------------------------------------------------------
>
> Key: TEIID-5087
> URL: https://issues.jboss.org/browse/TEIID-5087
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Ramesh Reddy
> Priority: Critical
>
> For a vdb with following source DDL metadata:
> {code:sql|title="Source"}
> CREATE FOREIGN TABLE SmallA (
> IntKey integer,
> IntNum integer,
> DoubleNum double,
> ObjectValue object,
> BigDecimalValue bigdecimal,
> BigIntegerValue biginteger,
> CharValue char,
> StringNum string,
> StringKey string PRIMARY KEY,
> FloatNum float,
> LongNum long,
> TimeValue time,
> ShortValue short,
> ByteNum byte,
> TimeStampValue timestamp,
> BooleanValue boolean,
> DateValue date
> ) OPTIONS(UPDATABLE true, "teiid_ispn:cache" '${jdg.cache.name}');
> {code}
> and a view:
> {code:sql|title="CRUD"}
> CREATE VIEW SmallA(
> IntKey integer,
> IntNum integer,
> DoubleNum double,
> ObjectValue object,
> BigDecimalValue bigdecimal,
> BigIntegerValue biginteger,
> CharValue char,
> StringNum string,
> StringKey string PRIMARY KEY,
> FloatNum float,
> LongNum long,
> TimeValue time,
> ShortValue short,
> ByteNum byte,
> TimestampValue timestamp,
> BooleanValue boolean,
> DateValue date
> ) OPTIONS (UPDATABLE true) AS
> SELECT
> source.IntKey AS IntKey,
> source.IntNum as IntNum,
> source.DoubleNum AS DoubleNum,
> source.ObjectValue AS ObjectValue,
> source.BigDecimalValue AS BigDecimalValue,
> source.BigIntegerValue AS BigIntegerValue,
> source.CharValue AS CharValue,
> source.StringNum AS StringNum,
> source.StringKey AS StringKey,
> source.FloatNum AS FloatNum,
> source.LongNum AS LongNum,
> source.TimeValue AS TimeValue,
> source.ShortValue AS ShortValue,
> source.ByteNum AS ByteNum,
> source.TimeStampValue AS TimestampValue,
> source.BooleanValue AS BooleanValue,
> source.DateValue AS DateValue
> FROM Source.SmallA as source;
> {code}
> Following query fails:
> {code:sql}
> SELECT TimeValue FROM CRUD.SmallA WHERE TimeValue = {t '02:52:21'}
> {code}
> and the same applies to date/timestamp alternatives.
> {code:title=error}
> 16:58:10,318 WARN [org.infinispan.client.hotrod.impl.protocol.Codec21] (Worker3_QueryProcessorQueue21) ISPN004005: Error received from the server: org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.TimeValue FROM Source.SmallA g_0 WHERE g_0.TimeValue = {t '02:52:21'} ; Parser error messages: [[statement, selectStatement, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, additiveExpression]: line 1:66 state 0 (decision=42) no viable alt; token=[@22,66:66='{',<74>,1:66], [statement]: line 1:67 mismatched token: [@23,67:67='t',<59>,1:67]; expecting type EOF].
> 16:58:10,319 ERROR [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue21) Connector worker process failed for atomic-request=7H/tbl4yNCGQ.7.0.36: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=97 returned server error (status=0x85): org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.TimeValue FROM Source.SmallA g_0 WHERE g_0.TimeValue = {t '02:52:21'} ; Parser error messages: [[statement, selectStatement, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, additiveExpression]: line 1:66 state 0 (decision=42) no viable alt; token=[@22,66:66='{',<74>,1:66], [statement]: line 1:67 mismatched token: [@23,67:67='t',<59>,1:67]; expecting type EOF].
> at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:363) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:152) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:138) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:68) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:30) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:57) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeQuery(RemoteQuery.java:68) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.query.RemoteQuery.list(RemoteQuery.java:53) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.teiid.translator.infinispan.hotrod.InfinispanResponse.fetchNextBatch(InfinispanResponse.java:76) [translator-infinispan-hotrod-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.translator.infinispan.hotrod.InfinispanResponse.getNextRow(InfinispanResponse.java:92) [translator-infinispan-hotrod-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.translator.infinispan.hotrod.InfinispanQueryExecution.next(InfinispanQueryExecution.java:138) [translator-infinispan-hotrod-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:433) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:236) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source) [:1.8.0_121]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at com.sun.proxy.$Proxy79.more(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_121]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
> 16:58:10,322 WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue22) TEIID30020 Processing exception for request 7H/tbl4yNCGQ.7 'TEIID30504 jdg7-source: org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.TimeValue FROM Source.SmallA g_0 WHERE g_0.TimeValue = {t '02:52:21'} ; Parser error messages: [[statement, selectStatement, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, additiveExpression]: line 1:66 state 0 (decision=42) no viable alt; token=[@22,66:66='{',<74>,1:66], [statement]: line 1:67 mismatched token: [@23,67:67='t',<59>,1:67]; expecting type EOF].'. Originally TeiidProcessingException Codec20.java:363. Enable more detailed logging to see the entire stacktrace.
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5087) Infinispan Hotrod error for date/time/timestamp literal in where criteria
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5087?page=com.atlassian.jira.plugin... ]
Ramesh Reddy resolved TEIID-5087.
---------------------------------
Resolution: Duplicate Issue
> Infinispan Hotrod error for date/time/timestamp literal in where criteria
> -------------------------------------------------------------------------
>
> Key: TEIID-5087
> URL: https://issues.jboss.org/browse/TEIID-5087
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Ramesh Reddy
> Priority: Critical
>
> For a vdb with following source DDL metadata:
> {code:sql|title="Source"}
> CREATE FOREIGN TABLE SmallA (
> IntKey integer,
> IntNum integer,
> DoubleNum double,
> ObjectValue object,
> BigDecimalValue bigdecimal,
> BigIntegerValue biginteger,
> CharValue char,
> StringNum string,
> StringKey string PRIMARY KEY,
> FloatNum float,
> LongNum long,
> TimeValue time,
> ShortValue short,
> ByteNum byte,
> TimeStampValue timestamp,
> BooleanValue boolean,
> DateValue date
> ) OPTIONS(UPDATABLE true, "teiid_ispn:cache" '${jdg.cache.name}');
> {code}
> and a view:
> {code:sql|title="CRUD"}
> CREATE VIEW SmallA(
> IntKey integer,
> IntNum integer,
> DoubleNum double,
> ObjectValue object,
> BigDecimalValue bigdecimal,
> BigIntegerValue biginteger,
> CharValue char,
> StringNum string,
> StringKey string PRIMARY KEY,
> FloatNum float,
> LongNum long,
> TimeValue time,
> ShortValue short,
> ByteNum byte,
> TimestampValue timestamp,
> BooleanValue boolean,
> DateValue date
> ) OPTIONS (UPDATABLE true) AS
> SELECT
> source.IntKey AS IntKey,
> source.IntNum as IntNum,
> source.DoubleNum AS DoubleNum,
> source.ObjectValue AS ObjectValue,
> source.BigDecimalValue AS BigDecimalValue,
> source.BigIntegerValue AS BigIntegerValue,
> source.CharValue AS CharValue,
> source.StringNum AS StringNum,
> source.StringKey AS StringKey,
> source.FloatNum AS FloatNum,
> source.LongNum AS LongNum,
> source.TimeValue AS TimeValue,
> source.ShortValue AS ShortValue,
> source.ByteNum AS ByteNum,
> source.TimeStampValue AS TimestampValue,
> source.BooleanValue AS BooleanValue,
> source.DateValue AS DateValue
> FROM Source.SmallA as source;
> {code}
> Following query fails:
> {code:sql}
> SELECT TimeValue FROM CRUD.SmallA WHERE TimeValue = {t '02:52:21'}
> {code}
> and the same applies to date/timestamp alternatives.
> {code:title=error}
> 16:58:10,318 WARN [org.infinispan.client.hotrod.impl.protocol.Codec21] (Worker3_QueryProcessorQueue21) ISPN004005: Error received from the server: org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.TimeValue FROM Source.SmallA g_0 WHERE g_0.TimeValue = {t '02:52:21'} ; Parser error messages: [[statement, selectStatement, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, additiveExpression]: line 1:66 state 0 (decision=42) no viable alt; token=[@22,66:66='{',<74>,1:66], [statement]: line 1:67 mismatched token: [@23,67:67='t',<59>,1:67]; expecting type EOF].
> 16:58:10,319 ERROR [org.teiid.CONNECTOR] (Worker3_QueryProcessorQueue21) Connector worker process failed for atomic-request=7H/tbl4yNCGQ.7.0.36: org.infinispan.client.hotrod.exceptions.HotRodClientException:Request for messageId=97 returned server error (status=0x85): org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.TimeValue FROM Source.SmallA g_0 WHERE g_0.TimeValue = {t '02:52:21'} ; Parser error messages: [[statement, selectStatement, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, additiveExpression]: line 1:66 state 0 (decision=42) no viable alt; token=[@22,66:66='{',<74>,1:66], [statement]: line 1:67 mismatched token: [@23,67:67='t',<59>,1:67]; expecting type EOF].
> at org.infinispan.client.hotrod.impl.protocol.Codec20.checkForErrorsInResponseStatus(Codec20.java:363) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readPartialHeader(Codec20.java:152) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.protocol.Codec20.readHeader(Codec20.java:138) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.operations.HotRodOperation.readHeaderAndValidate(HotRodOperation.java:60) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:68) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.operations.QueryOperation.executeOperation(QueryOperation.java:30) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.operations.RetryOnFailureOperation.execute(RetryOnFailureOperation.java:57) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.query.RemoteQuery.executeQuery(RemoteQuery.java:68) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.infinispan.client.hotrod.impl.query.RemoteQuery.list(RemoteQuery.java:53) [infinispan-client-hotrod.jar:8.4.1.ER1-redhat-1]
> at org.teiid.translator.infinispan.hotrod.InfinispanResponse.fetchNextBatch(InfinispanResponse.java:76) [translator-infinispan-hotrod-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.translator.infinispan.hotrod.InfinispanResponse.getNextRow(InfinispanResponse.java:92) [translator-infinispan-hotrod-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.translator.infinispan.hotrod.InfinispanQueryExecution.next(InfinispanQueryExecution.java:138) [translator-infinispan-hotrod-8.12.11.6_4.jar:8.12.11.6_4]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.handleBatch(ConnectorWorkItem.java:433) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.more(ConnectorWorkItem.java:236) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at sun.reflect.GeneratedMethodAccessor162.invoke(Unknown Source) [:1.8.0_121]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_121]
> at java.lang.reflect.Method.invoke(Method.java:498) [rt.jar:1.8.0_121]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at com.sun.proxy.$Proxy79.more(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:309) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_121]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:280) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.11.6_4-redhat-64-6.jar:8.12.11.6_4-redhat-64-6]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_121]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_121]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_121]
> 16:58:10,322 WARN [org.teiid.PROCESSOR] (Worker2_QueryProcessorQueue22) TEIID30020 Processing exception for request 7H/tbl4yNCGQ.7 'TEIID30504 jdg7-source: org.infinispan.objectfilter.ParsingException: ISPN028526: Invalid query: SELECT g_0.TimeValue FROM Source.SmallA g_0 WHERE g_0.TimeValue = {t '02:52:21'} ; Parser error messages: [[statement, selectStatement, querySpec, whereClause, logicalExpression, expression, logicalOrExpression, logicalAndExpression, negatedExpression, equalityExpression, relationalExpression, additiveExpression]: line 1:66 state 0 (decision=42) no viable alt; token=[@22,66:66='{',<74>,1:66], [statement]: line 1:67 mismatched token: [@23,67:67='t',<59>,1:67]; expecting type EOF].'. Originally TeiidProcessingException Codec20.java:363. Enable more detailed logging to see the entire stacktrace.
> {code}
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5088) Infinispan Hotrod bigdecimal/biginteger compared as strings
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5088?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-5088:
-------------------------------------
Since these are not native types supported by Infinispan and Protobuf, we need to limit the pushdown of the comparisons of columns only to native types. Any other types like BigDecimal or BigInteger, time, date, timestamp will be restricted to engine level evaluation.
> Infinispan Hotrod bigdecimal/biginteger compared as strings
> -----------------------------------------------------------
>
> Key: TEIID-5088
> URL: https://issues.jboss.org/browse/TEIID-5088
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Ramesh Reddy
> Fix For: 10.0, 8.12.x-6.4
>
>
> Biginteger and bigdecimal data types are being compared as strings, instead of numbers.
> For a vdb with following source DDL metadata:
> {code:sql|title="Source"}
> CREATE FOREIGN TABLE SmallA (
> IntKey integer,
> IntNum integer,
> DoubleNum double,
> ObjectValue object,
> BigDecimalValue bigdecimal,
> BigIntegerValue biginteger,
> CharValue char,
> StringNum string,
> StringKey string PRIMARY KEY,
> FloatNum float,
> LongNum long,
> TimeValue time,
> ShortValue short,
> ByteNum byte,
> TimeStampValue timestamp,
> BooleanValue boolean,
> DateValue date
> ) OPTIONS(UPDATABLE true, "teiid_ispn:cache" '${jdg.cache.name}');
> {code}
> and a view:
> {code:sql|title="CRUD"}
> CREATE VIEW SmallA(
> IntKey integer,
> IntNum integer,
> DoubleNum double,
> ObjectValue object,
> BigDecimalValue bigdecimal,
> BigIntegerValue biginteger,
> CharValue char,
> StringNum string,
> StringKey string PRIMARY KEY,
> FloatNum float,
> LongNum long,
> TimeValue time,
> ShortValue short,
> ByteNum byte,
> TimestampValue timestamp,
> BooleanValue boolean,
> DateValue date
> ) OPTIONS (UPDATABLE true) AS
> SELECT
> source.IntKey AS IntKey,
> source.IntNum as IntNum,
> source.DoubleNum AS DoubleNum,
> source.ObjectValue AS ObjectValue,
> source.BigDecimalValue AS BigDecimalValue,
> source.BigIntegerValue AS BigIntegerValue,
> source.CharValue AS CharValue,
> source.StringNum AS StringNum,
> source.StringKey AS StringKey,
> source.FloatNum AS FloatNum,
> source.LongNum AS LongNum,
> source.TimeValue AS TimeValue,
> source.ShortValue AS ShortValue,
> source.ByteNum AS ByteNum,
> source.TimeStampValue AS TimestampValue,
> source.BooleanValue AS BooleanValue,
> source.DateValue AS DateValue
> FROM Source.SmallA as source;
> {code}
> Following query:
> {code}
> SELECT BigIntegerValue FROM SmallA WHERE BigIntegerValue<4
> {code}
> returns
> || BigIntegerValue ||
> | 1,418,509 |
> | 2,993,990 |
> | 39,127 |
> | 132,878,502 |
> | 18,235,051 |
> | 27,147,783 |
> | 250,391,377 |
> | 278,593 |
> | 1,110,985,332 |
> | 262,593,097 |
> | 19 |
> | 26,203,918 |
> | 21,559,352 |
> | 18,812 |
> same issue applies to bigdecimal.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5088) Infinispan Hotrod bigdecimal/biginteger compared as strings
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-5088?page=com.atlassian.jira.plugin... ]
Ramesh Reddy updated TEIID-5088:
--------------------------------
Fix Version/s: 10.0
8.12.x-6.4
> Infinispan Hotrod bigdecimal/biginteger compared as strings
> -----------------------------------------------------------
>
> Key: TEIID-5088
> URL: https://issues.jboss.org/browse/TEIID-5088
> Project: Teiid
> Issue Type: Bug
> Components: JDG Connector, Misc. Connectors
> Affects Versions: 8.12.x-6.4
> Reporter: Jan Stastny
> Assignee: Ramesh Reddy
> Fix For: 10.0, 8.12.x-6.4
>
>
> Biginteger and bigdecimal data types are being compared as strings, instead of numbers.
> For a vdb with following source DDL metadata:
> {code:sql|title="Source"}
> CREATE FOREIGN TABLE SmallA (
> IntKey integer,
> IntNum integer,
> DoubleNum double,
> ObjectValue object,
> BigDecimalValue bigdecimal,
> BigIntegerValue biginteger,
> CharValue char,
> StringNum string,
> StringKey string PRIMARY KEY,
> FloatNum float,
> LongNum long,
> TimeValue time,
> ShortValue short,
> ByteNum byte,
> TimeStampValue timestamp,
> BooleanValue boolean,
> DateValue date
> ) OPTIONS(UPDATABLE true, "teiid_ispn:cache" '${jdg.cache.name}');
> {code}
> and a view:
> {code:sql|title="CRUD"}
> CREATE VIEW SmallA(
> IntKey integer,
> IntNum integer,
> DoubleNum double,
> ObjectValue object,
> BigDecimalValue bigdecimal,
> BigIntegerValue biginteger,
> CharValue char,
> StringNum string,
> StringKey string PRIMARY KEY,
> FloatNum float,
> LongNum long,
> TimeValue time,
> ShortValue short,
> ByteNum byte,
> TimestampValue timestamp,
> BooleanValue boolean,
> DateValue date
> ) OPTIONS (UPDATABLE true) AS
> SELECT
> source.IntKey AS IntKey,
> source.IntNum as IntNum,
> source.DoubleNum AS DoubleNum,
> source.ObjectValue AS ObjectValue,
> source.BigDecimalValue AS BigDecimalValue,
> source.BigIntegerValue AS BigIntegerValue,
> source.CharValue AS CharValue,
> source.StringNum AS StringNum,
> source.StringKey AS StringKey,
> source.FloatNum AS FloatNum,
> source.LongNum AS LongNum,
> source.TimeValue AS TimeValue,
> source.ShortValue AS ShortValue,
> source.ByteNum AS ByteNum,
> source.TimeStampValue AS TimestampValue,
> source.BooleanValue AS BooleanValue,
> source.DateValue AS DateValue
> FROM Source.SmallA as source;
> {code}
> Following query:
> {code}
> SELECT BigIntegerValue FROM SmallA WHERE BigIntegerValue<4
> {code}
> returns
> || BigIntegerValue ||
> | 1,418,509 |
> | 2,993,990 |
> | 39,127 |
> | 132,878,502 |
> | 18,235,051 |
> | 27,147,783 |
> | 250,391,377 |
> | 278,593 |
> | 1,110,985,332 |
> | 262,593,097 |
> | 19 |
> | 26,203,918 |
> | 21,559,352 |
> | 18,812 |
> same issue applies to bigdecimal.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months
[JBoss JIRA] (TEIID-5090) Issues with matview scripts
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-5090?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5090:
---------------------------------------
Unfortunately I'll have to take the fix of the replace function.
> Issues with matview scripts
> ---------------------------
>
> Key: TEIID-5090
> URL: https://issues.jboss.org/browse/TEIID-5090
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.12.x-6.4
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 10.0, 9.3.4
>
>
> There are a couple of issues with the script logic. The first is the use of the replace function in the update criteria for updateMatView - this is not generally safe. There are also some checks for internal materialization that look for a null table in the system table, but it's actually the schema that will be null.
--
This message was sent by Atlassian JIRA
(v7.2.3#72005)
7 years, 3 months