[JBoss JIRA] (TEIID-4167) Infinispan translator specific clause in sql query causes NullPointerException
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4167?page=com.atlassian.jira.plugin... ]
Work on TEIID-4167 started by Van Halbert.
------------------------------------------
> Infinispan translator specific clause in sql query causes NullPointerException
> ------------------------------------------------------------------------------
>
> Key: TEIID-4167
> URL: https://issues.jboss.org/browse/TEIID-4167
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Optional
> Fix For: 8.12.5
>
>
> When using DSL enabled infinispan-cache translator, NullPointerException occurs when executing a query with LIMIT clause:
> {code:sql}
> SELECT * FROM CustomerReport LIMIT 100;
> {code}
> or with non-trivial WHERE clause (doesn't matter whether such row exists or not):
> {code:sql}
> SELECT * FROM CustomerReport WHERE customerId=1;
> {code}
> {code:plain}
> 09:50:18,253 DEBUG [org.teiid.PROCESSOR] (Worker1_QueryProcessorQueue1) Running task for parent thread Worker0_QueryProcessorQueue0
> 09:50:18,255 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) ZzVxT/W8iN+B.0.0.0 Processing NEW request: SELECT jdgSource.CustomerReport.totalAmount FROM jdgSource.CustomerReport LIMIT 100
> 09:50:18,500 INFO [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) === Using DefaultCacheManager (loaded by configuration) ===
> 09:50:18,505 INFO [org.infinispan.factories.GlobalComponentRegistry] (Worker1_QueryProcessorQueue1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.4.0.Final-redhat-4
> 09:50:18,833 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) Infinispan-Cache Connection has been created.
> 09:50:18,841 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) ZzVxT/W8iN+B.0.0.0 Obtained execution
> 09:50:18,889 ERROR [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) Connector worker process failed for atomic-request=ZzVxT/W8iN+B.0.0.0: java.lang.NullPointerException
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:623) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:93) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.createQuery(DelegatingQuery.java:38) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:176)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:130)
> at org.teiid.translator.object.ObjectExecution.execute(ObjectExecution.java:259) [translator-object-8.12.5.redhat-3.jar:8.12.5]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_51]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at com.sun.proxy.$Proxy124.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
> 09:50:18,895 DEBUG [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) Request Thread ZzVxT/W8iN+B.0 with state PROCESSING
> 09:50:18,896 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) TEIID30019 Unexpected exception for request ZzVxT/W8iN+B.0: java.lang.NullPointerException
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:623)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:93)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.createQuery(DelegatingQuery.java:38)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:176)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:130)
> at org.teiid.translator.object.ObjectExecution.execute(ObjectExecution.java:259)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_51]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at com.sun.proxy.$Proxy124.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
> 09:50:18,899 DEBUG [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) QueryProcessor: closing processor
> 09:50:18,899 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue2) ZzVxT/W8iN+B.0.0.0 Remove State
> 09:50:18,900 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue2) ZzVxT/W8iN+B.0.0.0 Processing Close : SELECT jdgSource.CustomerReport.totalAmount FROM jdgSource.CustomerReport LIMIT 100
> 09:50:18,900 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue2) ZzVxT/W8iN+B.0.0.0 Closed execution
> {code}
> The vdb looks like:
> {code:xml}
> <vdb name="jdg-local" version="1">
> <description>For testing of materialized views</description>
> <property name ="lib" value ="org.jboss.qe.jdg.pojos"></property>
> <model name="jdgSource">
> <source name="jdgSource" translator-name="jdg-override"
> connection-jndi-name="java:/jdg-mat-ds" />
> <metadata type="DDL"><![CDATA[]]>
> CREATE FOREIGN TABLE CustomerReport(
> customerId integer not null OPTIONS (SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> totalAmount integer,
> CONSTRAINT PK_ID PRIMARY KEY(customerId)
> ) OPTIONS (NAMEINSOURCE 'jdg-mat', UPDATABLE TRUE);
> </metadata>
> </model>
> <translator name="jdg-override" type="infinispan-cache">
> <property name="SupportsDSLSearching" value="true"/>
> <property name="SupportsDirectQueryProcedure" value="true" />
> </translator>
> </vdb>
> {code}
> And the annotated POJO:
> {code:java}
> @Indexed
> public class CustomerReport implements Serializable {
> private static final long serialVersionUID = 1L;
> @NumericField @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
> private Integer customerId;
> @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
> private Integer totalAmount;
> public Integer getCustomerId() {
> return customerId;
> }
> public void setCustomerId(Integer customerId) {
> this.customerId = customerId;
> }
> public Integer getTotalAmount() {
> return totalAmount;
> }
> public void setTotalAmount(Integer totalAmount) {
> this.totalAmount = totalAmount;
> }
> }
> {code}
> The cache is defined in infinispan-cfg.xml file:
> {code:sql}
> <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"
> xmlns="urn:infinispan:config:6.0">
> <global>
> <globalJmxStatistics enabled="false"
> allowDuplicateDomains="true" />
> </global>
> <namedCache name="jdg-mat-stage">
> <eviction strategy="LIRS" maxEntries="1000" />
> <persistence passivation="false">
> <singleFile shared="false" fetchPersistentState="false"
> ignoreModifications="false" purgeOnStartup="false" preload="false"
> location="./target/localcache/indexing/jdg-mat-stage">
> </singleFile>
> </persistence>
> </namedCache>
> </infinispan>
> {code}
> Resource adapter looks like:
> {code:xml}
> <resource-adapter id="jdg-mat">
> <module slot="6" id="org.jboss.teiid.resource-adapter.infinispan"/>
> <connection-definitions>
> <connection-definition class-name="org.teiid.resource.adapter.infinispan.InfinispanManagedConnectionFactory" jndi-name="java:/jdg-mat-ds" enabled="true" pool-name="jdg-mat">
> <config-property name="ConfigurationFileNameForLocalCache">
> ${jboss.home.dir}/standalone/configuration/infinispan-cfg.xml
> </config-property>
> <config-property name="CacheTypeMap">
> jdg-mat:org.jboss.qe.jdg.pojo.CustomerReport;customerId
> </config-property>
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4167) Infinispan translator specific clause in sql query causes NullPointerException
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4167?page=com.atlassian.jira.plugin... ]
Van Halbert resolved TEIID-4167.
--------------------------------
Fix Version/s: 8.12.5
Resolution: Done
> Infinispan translator specific clause in sql query causes NullPointerException
> ------------------------------------------------------------------------------
>
> Key: TEIID-4167
> URL: https://issues.jboss.org/browse/TEIID-4167
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Optional
> Fix For: 8.12.5
>
>
> When using DSL enabled infinispan-cache translator, NullPointerException occurs when executing a query with LIMIT clause:
> {code:sql}
> SELECT * FROM CustomerReport LIMIT 100;
> {code}
> or with non-trivial WHERE clause (doesn't matter whether such row exists or not):
> {code:sql}
> SELECT * FROM CustomerReport WHERE customerId=1;
> {code}
> {code:plain}
> 09:50:18,253 DEBUG [org.teiid.PROCESSOR] (Worker1_QueryProcessorQueue1) Running task for parent thread Worker0_QueryProcessorQueue0
> 09:50:18,255 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) ZzVxT/W8iN+B.0.0.0 Processing NEW request: SELECT jdgSource.CustomerReport.totalAmount FROM jdgSource.CustomerReport LIMIT 100
> 09:50:18,500 INFO [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) === Using DefaultCacheManager (loaded by configuration) ===
> 09:50:18,505 INFO [org.infinispan.factories.GlobalComponentRegistry] (Worker1_QueryProcessorQueue1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.4.0.Final-redhat-4
> 09:50:18,833 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) Infinispan-Cache Connection has been created.
> 09:50:18,841 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) ZzVxT/W8iN+B.0.0.0 Obtained execution
> 09:50:18,889 ERROR [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) Connector worker process failed for atomic-request=ZzVxT/W8iN+B.0.0.0: java.lang.NullPointerException
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:623) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:93) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.createQuery(DelegatingQuery.java:38) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:176)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:130)
> at org.teiid.translator.object.ObjectExecution.execute(ObjectExecution.java:259) [translator-object-8.12.5.redhat-3.jar:8.12.5]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_51]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at com.sun.proxy.$Proxy124.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
> 09:50:18,895 DEBUG [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) Request Thread ZzVxT/W8iN+B.0 with state PROCESSING
> 09:50:18,896 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) TEIID30019 Unexpected exception for request ZzVxT/W8iN+B.0: java.lang.NullPointerException
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:623)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:93)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.createQuery(DelegatingQuery.java:38)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:176)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:130)
> at org.teiid.translator.object.ObjectExecution.execute(ObjectExecution.java:259)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_51]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at com.sun.proxy.$Proxy124.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
> 09:50:18,899 DEBUG [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) QueryProcessor: closing processor
> 09:50:18,899 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue2) ZzVxT/W8iN+B.0.0.0 Remove State
> 09:50:18,900 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue2) ZzVxT/W8iN+B.0.0.0 Processing Close : SELECT jdgSource.CustomerReport.totalAmount FROM jdgSource.CustomerReport LIMIT 100
> 09:50:18,900 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue2) ZzVxT/W8iN+B.0.0.0 Closed execution
> {code}
> The vdb looks like:
> {code:xml}
> <vdb name="jdg-local" version="1">
> <description>For testing of materialized views</description>
> <property name ="lib" value ="org.jboss.qe.jdg.pojos"></property>
> <model name="jdgSource">
> <source name="jdgSource" translator-name="jdg-override"
> connection-jndi-name="java:/jdg-mat-ds" />
> <metadata type="DDL"><![CDATA[]]>
> CREATE FOREIGN TABLE CustomerReport(
> customerId integer not null OPTIONS (SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> totalAmount integer,
> CONSTRAINT PK_ID PRIMARY KEY(customerId)
> ) OPTIONS (NAMEINSOURCE 'jdg-mat', UPDATABLE TRUE);
> </metadata>
> </model>
> <translator name="jdg-override" type="infinispan-cache">
> <property name="SupportsDSLSearching" value="true"/>
> <property name="SupportsDirectQueryProcedure" value="true" />
> </translator>
> </vdb>
> {code}
> And the annotated POJO:
> {code:java}
> @Indexed
> public class CustomerReport implements Serializable {
> private static final long serialVersionUID = 1L;
> @NumericField @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
> private Integer customerId;
> @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
> private Integer totalAmount;
> public Integer getCustomerId() {
> return customerId;
> }
> public void setCustomerId(Integer customerId) {
> this.customerId = customerId;
> }
> public Integer getTotalAmount() {
> return totalAmount;
> }
> public void setTotalAmount(Integer totalAmount) {
> this.totalAmount = totalAmount;
> }
> }
> {code}
> The cache is defined in infinispan-cfg.xml file:
> {code:sql}
> <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"
> xmlns="urn:infinispan:config:6.0">
> <global>
> <globalJmxStatistics enabled="false"
> allowDuplicateDomains="true" />
> </global>
> <namedCache name="jdg-mat-stage">
> <eviction strategy="LIRS" maxEntries="1000" />
> <persistence passivation="false">
> <singleFile shared="false" fetchPersistentState="false"
> ignoreModifications="false" purgeOnStartup="false" preload="false"
> location="./target/localcache/indexing/jdg-mat-stage">
> </singleFile>
> </persistence>
> </namedCache>
> </infinispan>
> {code}
> Resource adapter looks like:
> {code:xml}
> <resource-adapter id="jdg-mat">
> <module slot="6" id="org.jboss.teiid.resource-adapter.infinispan"/>
> <connection-definitions>
> <connection-definition class-name="org.teiid.resource.adapter.infinispan.InfinispanManagedConnectionFactory" jndi-name="java:/jdg-mat-ds" enabled="true" pool-name="jdg-mat">
> <config-property name="ConfigurationFileNameForLocalCache">
> ${jboss.home.dir}/standalone/configuration/infinispan-cfg.xml
> </config-property>
> <config-property name="CacheTypeMap">
> jdg-mat:org.jboss.qe.jdg.pojo.CustomerReport;customerId
> </config-property>
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4167) Infinispan translator specific clause in sql query causes NullPointerException
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4167?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4167:
------------------------------------
The connector-infinispan.6 module.xml has been updated to add the dependency. As for the max size setting, this is being covered by TEIID-4166.
> Infinispan translator specific clause in sql query causes NullPointerException
> ------------------------------------------------------------------------------
>
> Key: TEIID-4167
> URL: https://issues.jboss.org/browse/TEIID-4167
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.12.5
> Reporter: Jan Stastny
> Assignee: Van Halbert
> Priority: Blocker
>
> When using DSL enabled infinispan-cache translator, NullPointerException occurs when executing a query with LIMIT clause:
> {code:sql}
> SELECT * FROM CustomerReport LIMIT 100;
> {code}
> or with non-trivial WHERE clause (doesn't matter whether such row exists or not):
> {code:sql}
> SELECT * FROM CustomerReport WHERE customerId=1;
> {code}
> {code:plain}
> 09:50:18,253 DEBUG [org.teiid.PROCESSOR] (Worker1_QueryProcessorQueue1) Running task for parent thread Worker0_QueryProcessorQueue0
> 09:50:18,255 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) ZzVxT/W8iN+B.0.0.0 Processing NEW request: SELECT jdgSource.CustomerReport.totalAmount FROM jdgSource.CustomerReport LIMIT 100
> 09:50:18,500 INFO [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) === Using DefaultCacheManager (loaded by configuration) ===
> 09:50:18,505 INFO [org.infinispan.factories.GlobalComponentRegistry] (Worker1_QueryProcessorQueue1) ISPN000128: Infinispan version: Infinispan 'Infinium' 6.4.0.Final-redhat-4
> 09:50:18,833 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) Infinispan-Cache Connection has been created.
> 09:50:18,841 DEBUG [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) ZzVxT/W8iN+B.0.0.0 Obtained execution
> 09:50:18,889 ERROR [org.teiid.CONNECTOR] (Worker1_QueryProcessorQueue1) Connector worker process failed for atomic-request=ZzVxT/W8iN+B.0.0.0: java.lang.NullPointerException
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:623) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:93) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.createQuery(DelegatingQuery.java:38) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45) [infinispan-query-6.4.0.Final-redhat-4.jar:6.4.0.Final-redhat-4]
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:176)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:130)
> at org.teiid.translator.object.ObjectExecution.execute(ObjectExecution.java:259) [translator-object-8.12.5.redhat-3.jar:8.12.5]
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_51]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at com.sun.proxy.$Proxy124.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
> 09:50:18,895 DEBUG [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) Request Thread ZzVxT/W8iN+B.0 with state PROCESSING
> 09:50:18,896 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) TEIID30019 Unexpected exception for request ZzVxT/W8iN+B.0: java.lang.NullPointerException
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.parse(QueryEngine.java:623)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildQuery(QueryEngine.java:93)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.createQuery(DelegatingQuery.java:38)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:176)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:130)
> at org.teiid.translator.object.ObjectExecution.execute(ObjectExecution.java:259)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) [rt.jar:1.8.0_51]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0_51]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0_51]
> at java.lang.reflect.Method.invoke(Method.java:497) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at com.sun.proxy.$Proxy124.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.FutureTask.run(FutureTask.java:266) [rt.jar:1.8.0_51]
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:210) [teiid-engine-8.12.5.redhat-3.jar:8.12.5.redhat-3]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) [rt.jar:1.8.0_51]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0_51]
> at java.lang.Thread.run(Thread.java:745) [rt.jar:1.8.0_51]
> 09:50:18,899 DEBUG [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue2) QueryProcessor: closing processor
> 09:50:18,899 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue2) ZzVxT/W8iN+B.0.0.0 Remove State
> 09:50:18,900 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue2) ZzVxT/W8iN+B.0.0.0 Processing Close : SELECT jdgSource.CustomerReport.totalAmount FROM jdgSource.CustomerReport LIMIT 100
> 09:50:18,900 DEBUG [org.teiid.CONNECTOR] (Worker0_QueryProcessorQueue2) ZzVxT/W8iN+B.0.0.0 Closed execution
> {code}
> The vdb looks like:
> {code:xml}
> <vdb name="jdg-local" version="1">
> <description>For testing of materialized views</description>
> <property name ="lib" value ="org.jboss.qe.jdg.pojos"></property>
> <model name="jdgSource">
> <source name="jdgSource" translator-name="jdg-override"
> connection-jndi-name="java:/jdg-mat-ds" />
> <metadata type="DDL"><![CDATA[]]>
> CREATE FOREIGN TABLE CustomerReport(
> customerId integer not null OPTIONS (SEARCHABLE 'Searchable', NATIVE_TYPE 'int'),
> totalAmount integer,
> CONSTRAINT PK_ID PRIMARY KEY(customerId)
> ) OPTIONS (NAMEINSOURCE 'jdg-mat', UPDATABLE TRUE);
> </metadata>
> </model>
> <translator name="jdg-override" type="infinispan-cache">
> <property name="SupportsDSLSearching" value="true"/>
> <property name="SupportsDirectQueryProcedure" value="true" />
> </translator>
> </vdb>
> {code}
> And the annotated POJO:
> {code:java}
> @Indexed
> public class CustomerReport implements Serializable {
> private static final long serialVersionUID = 1L;
> @NumericField @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
> private Integer customerId;
> @Field(index=Index.YES, store=Store.YES, analyze=Analyze.NO)
> private Integer totalAmount;
> public Integer getCustomerId() {
> return customerId;
> }
> public void setCustomerId(Integer customerId) {
> this.customerId = customerId;
> }
> public Integer getTotalAmount() {
> return totalAmount;
> }
> public void setTotalAmount(Integer totalAmount) {
> this.totalAmount = totalAmount;
> }
> }
> {code}
> The cache is defined in infinispan-cfg.xml file:
> {code:sql}
> <infinispan xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
> xsi:schemaLocation="urn:infinispan:config:6.0 http://www.infinispan.org/schemas/infinispan-config-6.0.xsd"
> xmlns="urn:infinispan:config:6.0">
> <global>
> <globalJmxStatistics enabled="false"
> allowDuplicateDomains="true" />
> </global>
> <namedCache name="jdg-mat-stage">
> <eviction strategy="LIRS" maxEntries="1000" />
> <persistence passivation="false">
> <singleFile shared="false" fetchPersistentState="false"
> ignoreModifications="false" purgeOnStartup="false" preload="false"
> location="./target/localcache/indexing/jdg-mat-stage">
> </singleFile>
> </persistence>
> </namedCache>
> </infinispan>
> {code}
> Resource adapter looks like:
> {code:xml}
> <resource-adapter id="jdg-mat">
> <module slot="6" id="org.jboss.teiid.resource-adapter.infinispan"/>
> <connection-definitions>
> <connection-definition class-name="org.teiid.resource.adapter.infinispan.InfinispanManagedConnectionFactory" jndi-name="java:/jdg-mat-ds" enabled="true" pool-name="jdg-mat">
> <config-property name="ConfigurationFileNameForLocalCache">
> ${jboss.home.dir}/standalone/configuration/infinispan-cfg.xml
> </config-property>
> <config-property name="CacheTypeMap">
> jdg-mat:org.jboss.qe.jdg.pojo.CustomerReport;customerId
> </config-property>
> </connection-definition>
> </connection-definitions>
> </resource-adapter>
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3967) Function class not found results in an uncaught exception
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3967?page=com.atlassian.jira.plugin... ]
Work on TEIID-3967 started by Steven Hawkins.
---------------------------------------------
> Function class not found results in an uncaught exception
> ---------------------------------------------------------
>
> Key: TEIID-3967
> URL: https://issues.jboss.org/browse/TEIID-3967
> Project: Teiid
> Issue Type: Quality Risk
> Components: Query Engine
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Fix For: 9.0
>
>
> We throw a runtime MetadataException when a UDF fails to validate when the composite vdb is being built. This exception is not caught and ends up with default handling including sys.err printout. It would be better to catch this or even better to have the function validation performed by the metadata validator - as having these exceptions happen during VDBRepository.finishDeployment is unexpected.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3583) Need documentation on possible property settings to use
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3583?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3583.
-----------------------------------
Resolution: Done
Updated and added more language to the memory guide. In most cases we'll want people to use the defaults.
> Need documentation on possible property settings to use
> -------------------------------------------------------
>
> Key: TEIID-3583
> URL: https://issues.jboss.org/browse/TEIID-3583
> Project: Teiid
> Issue Type: Enhancement
> Components: Documentation
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Fix For: 9.0
>
>
> In the Administration and Configuration Guide there is some indication on how to perform active heap throttling.
> "Memory Management Considerations " there is a reference to parameters like:
> max-processing-kb and the max-reserve-kb.
> Anyway there is no indication of the indicative values to associate to those parameters to obtain a certain result.
> It would be good to get some examples to understand the cause and effect of the changes ( max-reserve-kb and related settings ).
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-3878) java.lang.Integer cannot be cast to java.math.BigDecimal
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-3878?page=com.atlassian.jira.plugin... ]
Steven Hawkins resolved TEIID-3878.
-----------------------------------
Fix Version/s: (was: 9.0)
Resolution: Cannot Reproduce Bug
I'm marking this as not reproducible as I was never able to reproduce this in newer or older versions. Please reopen if this occurs on later versions and we'll hopefully capture more information that can track this down.
> java.lang.Integer cannot be cast to java.math.BigDecimal
> --------------------------------------------------------
>
> Key: TEIID-3878
> URL: https://issues.jboss.org/browse/TEIID-3878
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.11.3
> Reporter: Mark Tawk
> Assignee: Steven Hawkins
> Priority: Critical
> Attachments: TEIID-3878.sql
>
>
> I'm using Teiid 8.11.3 with oracle translator.
> I have an aggregated query using teiid materialized views with the following simplified criteria:
> (CASE WHEN ( "table1"."field1" = 1 ) THEN "table2"."yearfield" ELSE null END IN (2014) )
> The above criteria is reproducing a ClassCastException Integer cannot be cast to BigDecimal
> if I change the criteria to the following, it passes without a problem:
> ("table2"."yearfield" IN (2014) )
> Here is the error stack:
> java.lang.ClassCastException: java.lang.Integer cannot be cast to java.math.BigDecimal
> at java.math.BigDecimal.compareTo(BigDecimal.java:219)
> at org.teiid.query.sql.symbol.Constant$2.compare(Constant.java:99)
> at org.teiid.query.eval.Evaluator.compare(Evaluator.java:581)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:322)
> at org.teiid.query.eval.Evaluator.internalEvaluateTVL(Evaluator.java:236)
> at org.teiid.query.eval.Evaluator.evaluateTVL(Evaluator.java:225)
> at org.teiid.query.eval.Evaluator.evaluate(Evaluator.java:219)
> at org.teiid.query.processor.relational.JoinNode.matchesCriteria(JoinNode.java:353)
> at org.teiid.query.processor.relational.EnhancedSortMergeJoinStrategy.process(EnhancedSortMergeJoinStrategy.java:460)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:227)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.BatchCollector$BatchProducerTupleSource.nextTuple(BatchCollector.java:94)
> at org.teiid.query.processor.relational.GroupingNode.groupSortPhase(GroupingNode.java:490)
> at org.teiid.query.processor.relational.GroupingNode.nextBatchDirect(GroupingNode.java:366)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:148)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:278)
> 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:457)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:339)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:267)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:306)
> at org.teiid.dqp.internal.process.DQPCore.executeRequest(DQPCore.java:238)
> at sun.reflect.GeneratedMethodAccessor260.invoke(Unknown Source)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.teiid.transport.LocalServerConnection$1$1.call(LocalServerConnection.java:175)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:260)
> at org.teiid.transport.LocalServerConnection$1.invoke(LocalServerConnection.java:173)
> at com.sun.proxy.$Proxy31.executeRequest(Unknown Source)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:667)
> at org.teiid.jdbc.StatementImpl.executeSql(StatementImpl.java:533)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:1068)
> at org.teiid.jdbc.StatementImpl.execute(StatementImpl.java:320)
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4120) Teiid on Oracle Spatial generates incorrect SQL
by Tom Arnold (JIRA)
[ https://issues.jboss.org/browse/TEIID-4120?page=com.atlassian.jira.plugin... ]
Tom Arnold commented on TEIID-4120:
-----------------------------------
Not really; I need to find the time to get back into it... A web-based version of the designer would be appealing.
> Teiid on Oracle Spatial generates incorrect SQL
> -----------------------------------------------
>
> Key: TEIID-4120
> URL: https://issues.jboss.org/browse/TEIID-4120
> Project: Teiid
> Issue Type: Bug
> Components: JDBC Driver
> Affects Versions: 8.13.3
> Reporter: Mike Houwers
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.4
>
>
> Attempting to run a spatial query using SDO_RELATE in Teiid against an Oracle database seems to generate incorrect SQL. The query in "Steps to Reproduce" results in the following SQL being generated by Teiid:
> {code}
> SELECT c_0 FROM (SELECT g_0."ID" AS c_0 FROM "FOO" g_0 WHERE SDO_RELATE(g_0."FOOTPRINT", g_0."FOOTPRINT", 'mask=contains') = 1) WHERE ROWNUM <= 100
> {code}
> Note the test for the return from SDO_RELATE = 1. This should be a boolean function, so the test for =1 is incorrect, and should be ='TRUE'. The following warning is in the Teiid log:
> {code}
> 14:37:11,934 WARN [org.teiid.CONNECTOR] (Worker5_QueryProcessorQueue17) YRwvNQVeMEzW Connector worker process failed for atomic-request=YRwvNQVeMEzW.5.0.3: org.teiid.translator.jdbc.JDBCExecutionException: 1722 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: SELECT c_0 FROM (SELECT g_0."ID" AS c_0 FROM "FOO" g_0 WHERE SDO_RELATE(g_0."FOOTPRINT", g_0."FOOTPRINT", 'mask=contains') = 1) WHERE ROWNUM <= 100]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)
> at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
> at java.lang.reflect.Method.invoke(Method.java:606)
> at org.teiid.dqp.internal.datamgr.ConnectorManager$1.invoke(ConnectorManager.java:211)
> at com.sun.proxy.$Proxy56.execute(Unknown Source)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:306)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:112)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:108)
> at java.util.concurrent.FutureTask.run(FutureTask.java:262)
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:65)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:276)
> 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:1145)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
> at java.lang.Thread.run(Thread.java:745)
> Caused by: java.sql.SQLSyntaxErrorException: ORA-01722: invalid number
> at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:440)
> at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:396)
> at oracle.jdbc.driver.T4C8Oall.processError(T4C8Oall.java:837)
> at oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:445)
> at oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:191)
> at oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:523)
> at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:207)
> at oracle.jdbc.driver.T4CPreparedStatement.executeForDescribe(T4CPreparedStatement.java:863)
> at oracle.jdbc.driver.OracleStatement.executeMaybeDescribe(OracleStatement.java:1153)
> at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1275)
> at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:3576)
> at oracle.jdbc.driver.OraclePreparedStatement.executeQuery(OraclePreparedStatement.java:3620)
> at oracle.jdbc.driver.OraclePreparedStatementWrapper.executeQuery(OraclePreparedStatementWrapper.java:1491)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 18 more
> {code}
> Running the generated SQL in SQLDeveloper results in the error:
> {code}
> ORA-01722: invalid number
> 01722. 00000 - "invalid number"
> *Cause:
> *Action:
> {code}
> Altering the generated SQL in SQLDeveloper to be:
> {code}
> SELECT g_0."ID" AS c_0 FROM "FOO" g_0 WHERE SDO_RELATE(g_0."FOOTPRINT", g_0.footprint, 'mask=contains') = 'TRUE';
> {code}
> returns the expected results.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months