[JBoss JIRA] (TEIID-4232) Wrong detection of recursive plans when same aliases are used in nested CTEs
by Salvatore R (JIRA)
Salvatore R created TEIID-4232:
----------------------------------
Summary: Wrong detection of recursive plans when same aliases are used in nested CTEs
Key: TEIID-4232
URL: https://issues.jboss.org/browse/TEIID-4232
Project: Teiid
Issue Type: Bug
Components: Query Engine
Reporter: Salvatore R
Assignee: Steven Hawkins
I defined the following view:
{code:sql}
create view v1 as
WITH mycte as (SELECT 1 as col1) SELECT col1 FROM mycte;
{code}
If I run this query:
{code:sql}
WITH mycte as (SELECT * FROM views.v1) SELECT * from mycte ;
{code}
it fails on generate the query plan with this exception:
{code}
TEIID31124 Recursive plan detected. Command type Query was already issued against mycte. Planning cycle: [Query mycte, Query views.v1]
{code}
Using /*+ no_inline */ hint to prevent the inlining doesn't fail and returns the correct result.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4211) Wrong rewriting of CTEs when pushed down to PostgreSQL
by Salvatore R (JIRA)
[ https://issues.jboss.org/browse/TEIID-4211?page=com.atlassian.jira.plugin... ]
Salvatore R edited comment on TEIID-4211 at 5/27/16 11:23 AM:
--------------------------------------------------------------
Ok, thanks for the quick reply. I logged a new issue for this problem in TEIID-4232
was (Author: fox123):
Ok, thanks for the quick reply. I will log a new issue for this problem.
> Wrong rewriting of CTEs when pushed down to PostgreSQL
> ------------------------------------------------------
>
> Key: TEIID-4211
> URL: https://issues.jboss.org/browse/TEIID-4211
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.13.4
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.5
>
>
> Running the following query:
> {code:sql}
> WITH
> cte1 as (SELECT * from pg.test_a),
> cte2 as (select * from cte1),
> cte3 as (select * from cte1)
> SELECT * FROM cte2 join cte3 on cte2.a=cte3.a
> {code}
> where pg.test_a is a table defined in PostgreSQL, this exception is thrown:
> {code:sql}
> 19:42:22,287 WARN [org.teiid.CONNECTOR] (Worker20_QueryProcessorQueue228) ezaCNEtY3C+P Connector worker process failed for atomic-request=ezaCNEtY3C+P.121.3.48: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: WITH cte1 (a, b) AS (SELECT g_0."a", g_0."b" FROM "public"."test_a" AS g_0), cte1 (a, b) AS (SELECT g_0."a", g_0."b" FROM "public"."test_a" AS g_0), cte2 (a,b) AS (SELECT g_0.a, g_0.b FROM cte1 AS g_0), cte3 (a, b) AS (SELECT g_0.a, g_0.b FROM cte1 AS g_0) SELECT g_1.a, g_1.b, g_0.a, g_0.b FROM cte2 AS g_0, cte3 AS g_1 WHERE g_0.a = g_1.a]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)
> at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
> 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: org.postgresql.util.PSQLException: ERROR: WITH query name "cte1" specified more than once
> Position: 78
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 17 more
> {code}
> I am not sure if the problem below might be also related, but an exception is thrown by running the following query with nested CTEs:
> {code:sql}
> WITH
> cte1 as (SELECT 1 as a)
> ,cte3 as (with cte3_1 as (select cte1.a from cte1 join pg.test_a t1 on cte1.a=t1.a) select * from cte3_1)
> SELECT * FROM cte3;;
> {code}
> The exception is:
> {code:sql}
> 20:00:37,731 WARN [org.teiid.PROCESSOR] (Worker21_QueryProcessorQueue239) ezaCNEtY3C+P TEIID30020 Processing exception for request ezaCNEtY3C+P.125 'TEIID30226 Temporary table "cte1" does not exist.'. Originally QueryProcessingException TempTableStore.java:564. Enable more detailed logging to see the entire stacktrace.
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4211) Wrong rewriting of CTEs when pushed down to PostgreSQL
by Salvatore R (JIRA)
[ https://issues.jboss.org/browse/TEIID-4211?page=com.atlassian.jira.plugin... ]
Salvatore R commented on TEIID-4211:
------------------------------------
Ok, thanks for the quick reply. I will log a new issue for this problem.
> Wrong rewriting of CTEs when pushed down to PostgreSQL
> ------------------------------------------------------
>
> Key: TEIID-4211
> URL: https://issues.jboss.org/browse/TEIID-4211
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.13.4
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.5
>
>
> Running the following query:
> {code:sql}
> WITH
> cte1 as (SELECT * from pg.test_a),
> cte2 as (select * from cte1),
> cte3 as (select * from cte1)
> SELECT * FROM cte2 join cte3 on cte2.a=cte3.a
> {code}
> where pg.test_a is a table defined in PostgreSQL, this exception is thrown:
> {code:sql}
> 19:42:22,287 WARN [org.teiid.CONNECTOR] (Worker20_QueryProcessorQueue228) ezaCNEtY3C+P Connector worker process failed for atomic-request=ezaCNEtY3C+P.121.3.48: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: WITH cte1 (a, b) AS (SELECT g_0."a", g_0."b" FROM "public"."test_a" AS g_0), cte1 (a, b) AS (SELECT g_0."a", g_0."b" FROM "public"."test_a" AS g_0), cte2 (a,b) AS (SELECT g_0.a, g_0.b FROM cte1 AS g_0), cte3 (a, b) AS (SELECT g_0.a, g_0.b FROM cte1 AS g_0) SELECT g_1.a, g_1.b, g_0.a, g_0.b FROM cte2 AS g_0, cte3 AS g_1 WHERE g_0.a = g_1.a]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)
> at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
> 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: org.postgresql.util.PSQLException: ERROR: WITH query name "cte1" specified more than once
> Position: 78
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 17 more
> {code}
> I am not sure if the problem below might be also related, but an exception is thrown by running the following query with nested CTEs:
> {code:sql}
> WITH
> cte1 as (SELECT 1 as a)
> ,cte3 as (with cte3_1 as (select cte1.a from cte1 join pg.test_a t1 on cte1.a=t1.a) select * from cte3_1)
> SELECT * FROM cte3;;
> {code}
> The exception is:
> {code:sql}
> 20:00:37,731 WARN [org.teiid.PROCESSOR] (Worker21_QueryProcessorQueue239) ezaCNEtY3C+P TEIID30020 Processing exception for request ezaCNEtY3C+P.125 'TEIID30226 Temporary table "cte1" does not exist.'. Originally QueryProcessingException TempTableStore.java:564. Enable more detailed logging to see the entire stacktrace.
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4166) JDG remote cache translator (DSL) - In predicate does not support more than 1024 values
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4166?page=com.atlassian.jira.plugin... ]
Work on TEIID-4166 stopped by Van Halbert.
------------------------------------------
> JDG remote cache translator (DSL) - In predicate does not support more than 1024 values
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-4166
> URL: https://issues.jboss.org/browse/TEIID-4166
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x
> Reporter: Juraj Duráni
> Assignee: Van Halbert
>
> JDG cache translator (local JDG) does not support more than 1024 values in IN predicate.
> The exception is thrown because 'maxClauseCount' is set to 1024.
> *Exception:*
> {code:plain}
> 12:27:43,579 ERROR [org.teiid.PROCESSOR] (Worker1_QueryProcessorQueue73) TEIID30019 Unexpected exception for request Q4A3h+Gv1LIh.13: org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024
> at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:136)
> at org.hibernate.search.query.dsl.impl.BooleanQueryBuilder.createQuery(BooleanQueryBuilder.java:115)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneDisjunctionPredicate.getQuery(LuceneDisjunctionPredicate.java:51)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneInPredicate.getQuery(LuceneInPredicate.java:60)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneInPredicate.getQuery(LuceneInPredicate.java:35)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneRootPredicate.getQuery(LuceneRootPredicate.java:42)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneRootPredicate.getQuery(LuceneRootPredicate.java:32)
> at org.hibernate.hql.ast.spi.SingleEntityQueryBuilder.build(SingleEntityQueryBuilder.java:174)
> at org.hibernate.hql.lucene.internal.LuceneQueryRendererDelegate.getResult(LuceneQueryRendererDelegate.java:98)
> at org.hibernate.hql.lucene.LuceneProcessingChain.getResult(LuceneProcessingChain.java:157)
> at org.hibernate.hql.lucene.LuceneProcessingChain.getResult(LuceneProcessingChain.java:49)
> at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:89)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.transformJpaToLucene(QueryEngine.java:708)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildLuceneQuery(QueryEngine.java:676)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.createCacheQuery(EmbeddedLuceneQuery.java:59)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.listInternal(EmbeddedLuceneQuery.java:74)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.list(EmbeddedLuceneQuery.java:68)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:169)
> 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-internal]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> 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.$Proxy81.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-internal]
> 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-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4166) JDG remote cache translator (DSL) - In predicate does not support more than 1024 values
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4166?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4166:
------------------------------------
Logged an RFE with JDG/infinispan to provide an override so that the default maxClauseCount can be override from the default size of 1024.
> JDG remote cache translator (DSL) - In predicate does not support more than 1024 values
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-4166
> URL: https://issues.jboss.org/browse/TEIID-4166
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x
> Reporter: Juraj Duráni
> Assignee: Van Halbert
>
> JDG cache translator (local JDG) does not support more than 1024 values in IN predicate.
> The exception is thrown because 'maxClauseCount' is set to 1024.
> *Exception:*
> {code:plain}
> 12:27:43,579 ERROR [org.teiid.PROCESSOR] (Worker1_QueryProcessorQueue73) TEIID30019 Unexpected exception for request Q4A3h+Gv1LIh.13: org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024
> at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:136)
> at org.hibernate.search.query.dsl.impl.BooleanQueryBuilder.createQuery(BooleanQueryBuilder.java:115)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneDisjunctionPredicate.getQuery(LuceneDisjunctionPredicate.java:51)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneInPredicate.getQuery(LuceneInPredicate.java:60)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneInPredicate.getQuery(LuceneInPredicate.java:35)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneRootPredicate.getQuery(LuceneRootPredicate.java:42)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneRootPredicate.getQuery(LuceneRootPredicate.java:32)
> at org.hibernate.hql.ast.spi.SingleEntityQueryBuilder.build(SingleEntityQueryBuilder.java:174)
> at org.hibernate.hql.lucene.internal.LuceneQueryRendererDelegate.getResult(LuceneQueryRendererDelegate.java:98)
> at org.hibernate.hql.lucene.LuceneProcessingChain.getResult(LuceneProcessingChain.java:157)
> at org.hibernate.hql.lucene.LuceneProcessingChain.getResult(LuceneProcessingChain.java:49)
> at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:89)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.transformJpaToLucene(QueryEngine.java:708)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildLuceneQuery(QueryEngine.java:676)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.createCacheQuery(EmbeddedLuceneQuery.java:59)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.listInternal(EmbeddedLuceneQuery.java:74)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.list(EmbeddedLuceneQuery.java:68)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:169)
> 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-internal]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> 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.$Proxy81.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-internal]
> 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-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4211) Wrong rewriting of CTEs when pushed down to PostgreSQL
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4211?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4211:
---------------------------------------
Yes, that should be captured as a new issue.
> Wrong rewriting of CTEs when pushed down to PostgreSQL
> ------------------------------------------------------
>
> Key: TEIID-4211
> URL: https://issues.jboss.org/browse/TEIID-4211
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.13.4
> Reporter: Salvatore R
> Assignee: Steven Hawkins
> Fix For: 9.0, 8.12.5, 8.13.5
>
>
> Running the following query:
> {code:sql}
> WITH
> cte1 as (SELECT * from pg.test_a),
> cte2 as (select * from cte1),
> cte3 as (select * from cte1)
> SELECT * FROM cte2 join cte3 on cte2.a=cte3.a
> {code}
> where pg.test_a is a table defined in PostgreSQL, this exception is thrown:
> {code:sql}
> 19:42:22,287 WARN [org.teiid.CONNECTOR] (Worker20_QueryProcessorQueue228) ezaCNEtY3C+P Connector worker process failed for atomic-request=ezaCNEtY3C+P.121.3.48: org.teiid.translator.jdbc.JDBCExecutionException: 0 TEIID11008:TEIID11004 Error executing statement(s): [Prepared Values: [] SQL: WITH cte1 (a, b) AS (SELECT g_0."a", g_0."b" FROM "public"."test_a" AS g_0), cte1 (a, b) AS (SELECT g_0."a", g_0."b" FROM "public"."test_a" AS g_0), cte2 (a,b) AS (SELECT g_0.a, g_0.b FROM cte1 AS g_0), cte3 (a, b) AS (SELECT g_0.a, g_0.b FROM cte1 AS g_0) SELECT g_1.a, g_1.b, g_0.a, g_0.b FROM cte2 AS g_0, cte3 AS g_1 WHERE g_0.a = g_1.a]
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:131)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:359)
> at sun.reflect.GeneratedMethodAccessor92.invoke(Unknown Source)
> 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: org.postgresql.util.PSQLException: ERROR: WITH query name "cte1" specified more than once
> Position: 78
> at org.postgresql.core.v3.QueryExecutorImpl.receiveErrorResponse(QueryExecutorImpl.java:2157)
> at org.postgresql.core.v3.QueryExecutorImpl.processResults(QueryExecutorImpl.java:1886)
> at org.postgresql.core.v3.QueryExecutorImpl.execute(QueryExecutorImpl.java:255)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.execute(AbstractJdbc2Statement.java:555)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeWithFlags(AbstractJdbc2Statement.java:417)
> at org.postgresql.jdbc2.AbstractJdbc2Statement.executeQuery(AbstractJdbc2Statement.java:302)
> at org.jboss.jca.adapters.jdbc.WrappedPreparedStatement.executeQuery(WrappedPreparedStatement.java:504)
> at org.teiid.translator.jdbc.JDBCQueryExecution.execute(JDBCQueryExecution.java:123)
> ... 17 more
> {code}
> I am not sure if the problem below might be also related, but an exception is thrown by running the following query with nested CTEs:
> {code:sql}
> WITH
> cte1 as (SELECT 1 as a)
> ,cte3 as (with cte3_1 as (select cte1.a from cte1 join pg.test_a t1 on cte1.a=t1.a) select * from cte3_1)
> SELECT * FROM cte3;;
> {code}
> The exception is:
> {code:sql}
> 20:00:37,731 WARN [org.teiid.PROCESSOR] (Worker21_QueryProcessorQueue239) ezaCNEtY3C+P TEIID30020 Processing exception for request ezaCNEtY3C+P.125 'TEIID30226 Temporary table "cte1" does not exist.'. Originally QueryProcessingException TempTableStore.java:564. Enable more detailed logging to see the entire stacktrace.
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4220) Unsupported encoding when POSTing to odata on Windows
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4220?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4220:
---------------------------------------
As best as I can tell this is a client issue, and that the windows client is introducing the IBM1252 encoding into the xml declaration.
If you change your test client logic to explicitly set the charset to Cp1252 on the OutputStreamWriter, does it seem to work? Otherwise I don't see where the encoding is getting introduced.
> Unsupported encoding when POSTing to odata on Windows
> -----------------------------------------------------
>
> Key: TEIID-4220
> URL: https://issues.jboss.org/browse/TEIID-4220
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.12.x
> Reporter: Andrej Šmigala
> Assignee: Steven Hawkins
> Priority: Critical
>
> When posting to a windows server from a windows client, the default encoding is cp1252. When an xml request such as this is posted:
> {code:xml}
> <?xml version='1.0' encoding='cp1252'?><entry xmlns="http://www.w3.org/2005/Atom" xmlns:xml="http://www.w3.org/XML/1998/namespace" xmlns:m="http://docs.oasis-open.org/odata/ns/metadata" xmlns:d="http://docs.oasis-open.org/odata/ns/data" xmlns:gml="http://www.opengis.net/gml" xmlns:georss="http://www.georss.org/georss"><category scheme="http://docs.oasis-open.org/odata/ns/scheme"/>
> <content type="application/xml">
> <m:properties>
> <d:intkey m:type="Int32">4</d:intkey>
> <d:intnum m:type="Int32">4</d:intnum>
> <d:stringkey>4</d:stringkey>
> <d:stringval>value_4</d:stringval>
> <d:booleanval m:type="Boolean">false</d:booleanval>
> <d:decimalval m:type="Double">-20.4</d:decimalval>
> <d:timeval m:type="TimeOfDay">00:00:04</d:timeval>
> <d:dateval m:type="Date">2004-04-04</d:dateval>
> <d:timestampval m:type="DateTimeOffset">2004-01-01T00:00:04Z</d:timestampval>
> </m:properties>
> </content>
> </entry>
> {code}
> the following error is logged in the server:
> {noformat}
> 09:54:38,069 WARN [org.teiid.ODATA] (http-/0.0.0.0:8080-1) TEIID16050 Unable to process odata request due to: An I/O exception occurred. with cause Unsupported encoding: IBM1252: Unsupported encoding: IBM1252
> at org.apache.olingo.server.core.deserializer.xml.ODataXmlDeserializer.entity(ODataXmlDeserializer.java:592)
> at org.apache.olingo.server.core.requests.DataRequest$EntityRequest.getEntityFromClient(DataRequest.java:367)
> at org.apache.olingo.server.core.requests.DataRequest$EntityRequest.execute(DataRequest.java:359)
> 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-4.jar:8.12.5.redhat-4]
> 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.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.teiid.olingo.web.ODataFilter.internalDoFilter(ODataFilter.java:226) [teiid-olingo-8.12.5.redhat-4.jar:8.12.5.redhat-4]
> at org.teiid.olingo.web.ODataFilter.doFilter(ODataFilter.java:100) [teiid-olingo-8.12.5.redhat-4.jar:8.12.5.redhat-4]
> at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:246) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:214) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:231) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:149) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:512) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.jboss.as.web.security.SecurityContextAssociationValve.invoke(SecurityContextAssociationValve.java:169) [jboss-as-web-7.5.4.Final-redhat-4.jar:7.5.4.Final-redhat-4]
> at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:150) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:97) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:102) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:344) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:854) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:653) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:926) [jbossweb-7.5.11.Final-redhat-1.jar:7.5.11.Final-redhat-1]
> at java.lang.Thread.run(Unknown Source) [rt.jar:1.7.0_79]
> Caused by: com.ctc.wstx.exc.WstxIOException: Unsupported encoding: IBM1252
> at com.ctc.wstx.io.StreamBootstrapper.bootstrapInput(StreamBootstrapper.java:247)
> at com.ctc.wstx.stax.WstxInputFactory.doCreateSR(WstxInputFactory.java:546)
> at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:600)
> at com.ctc.wstx.stax.WstxInputFactory.createSR(WstxInputFactory.java:615)
> at com.ctc.wstx.stax.WstxInputFactory.createXMLEventReader(WstxInputFactory.java:269)
> at __redirected.__XMLInputFactory.createXMLEventReader(__XMLInputFactory.java:170) [jboss-modules.jar:1.3.7.Final-redhat-1]
> at org.apache.olingo.server.core.deserializer.xml.ODataXmlDeserializer.getReader(ODataXmlDeserializer.java:97)
> at org.apache.olingo.server.core.deserializer.xml.ODataXmlDeserializer.entity(ODataXmlDeserializer.java:583)
> ... 26 more
> {noformat}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4090) Issue with entitysets/properties ending in auth or token
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-4090?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-4090:
---------------------------------------
Just to double check is there still a possible issue here with a conflict of vdbs named static or keycloak? Or would we just advise the workaround of using the version in the uri to understand it's a reference to the vdb?
> Issue with entitysets/properties ending in auth or token
> --------------------------------------------------------
>
> Key: TEIID-4090
> URL: https://issues.jboss.org/browse/TEIID-4090
> Project: Teiid
> Issue Type: Bug
> Components: OData
> Affects Versions: 8.12
> Reporter: Steven Hawkins
> Assignee: Ramesh Reddy
> Fix For: 9.0, 8.12.5
>
>
> To handle oauth, we are check for uri.endsWith("auth") || uri.endsWith("token") - however valid uris can end with those characters as well. An ioexception will be thrown instead of seeing the expected results - we also need to not simply throw an ioexception in ODataServlet as there is no server log of the exception and the client sees a 500 error.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months
[JBoss JIRA] (TEIID-4166) JDG remote cache translator (DSL) - In predicate does not support more than 1024 values
by Van Halbert (JIRA)
[ https://issues.jboss.org/browse/TEIID-4166?page=com.atlassian.jira.plugin... ]
Van Halbert commented on TEIID-4166:
------------------------------------
Duplicated the issue when using remote-cache when using non-annotated pojo (defining the protobuf def file and marshallers).
> JDG remote cache translator (DSL) - In predicate does not support more than 1024 values
> ---------------------------------------------------------------------------------------
>
> Key: TEIID-4166
> URL: https://issues.jboss.org/browse/TEIID-4166
> Project: Teiid
> Issue Type: Bug
> Affects Versions: 8.12.x
> Reporter: Juraj Duráni
> Assignee: Van Halbert
>
> JDG cache translator (local JDG) does not support more than 1024 values in IN predicate.
> The exception is thrown because 'maxClauseCount' is set to 1024.
> *Exception:*
> {code:plain}
> 12:27:43,579 ERROR [org.teiid.PROCESSOR] (Worker1_QueryProcessorQueue73) TEIID30019 Unexpected exception for request Q4A3h+Gv1LIh.13: org.apache.lucene.search.BooleanQuery$TooManyClauses: maxClauseCount is set to 1024
> at org.apache.lucene.search.BooleanQuery.add(BooleanQuery.java:136)
> at org.hibernate.search.query.dsl.impl.BooleanQueryBuilder.createQuery(BooleanQueryBuilder.java:115)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneDisjunctionPredicate.getQuery(LuceneDisjunctionPredicate.java:51)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneInPredicate.getQuery(LuceneInPredicate.java:60)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneInPredicate.getQuery(LuceneInPredicate.java:35)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneRootPredicate.getQuery(LuceneRootPredicate.java:42)
> at org.hibernate.hql.lucene.internal.builder.predicate.LuceneRootPredicate.getQuery(LuceneRootPredicate.java:32)
> at org.hibernate.hql.ast.spi.SingleEntityQueryBuilder.build(SingleEntityQueryBuilder.java:174)
> at org.hibernate.hql.lucene.internal.LuceneQueryRendererDelegate.getResult(LuceneQueryRendererDelegate.java:98)
> at org.hibernate.hql.lucene.LuceneProcessingChain.getResult(LuceneProcessingChain.java:157)
> at org.hibernate.hql.lucene.LuceneProcessingChain.getResult(LuceneProcessingChain.java:49)
> at org.hibernate.hql.QueryParser.parseQuery(QueryParser.java:89)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.transformJpaToLucene(QueryEngine.java:708)
> at org.infinispan.query.dsl.embedded.impl.QueryEngine.buildLuceneQuery(QueryEngine.java:676)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.createCacheQuery(EmbeddedLuceneQuery.java:59)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.listInternal(EmbeddedLuceneQuery.java:74)
> at org.infinispan.query.dsl.embedded.impl.EmbeddedLuceneQuery.list(EmbeddedLuceneQuery.java:68)
> at org.infinispan.query.dsl.embedded.impl.DelegatingQuery.list(DelegatingQuery.java:45)
> at org.teiid.resource.adapter.infinispan.DSLSearch.performSearch(DSLSearch.java:169)
> 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-internal]
> at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) [rt.jar:1.8.0-internal]
> at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) [rt.jar:1.8.0-internal]
> at java.lang.reflect.Method.invoke(Method.java:483) [rt.jar:1.8.0-internal]
> 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.$Proxy81.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-internal]
> 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-internal]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) [rt.jar:1.8.0-internal]
> at java.lang.Thread.run(Thread.java:744) [rt.jar:1.8.0-internal]
> {code}
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
8 years, 7 months