[JBoss JIRA] (TEIID-5687) Oracle comparison with binding of nchar with non-ascii chars is not correct
by Steven Hawkins (Jira)
Steven Hawkins created TEIID-5687:
-------------------------------------
Summary: Oracle comparison with binding of nchar with non-ascii chars is not correct
Key: TEIID-5687
URL: https://issues.jboss.org/browse/TEIID-5687
Project: Teiid
Issue Type: Bug
Components: JDBC Connector
Reporter: Steven Hawkins
Assignee: Steven Hawkins
Fix For: 12.2
An nchar column binding in the where clause will use the FIXED_CHAR (999) oracle type - however that converts the value to ascii, which may result in invalid results:
nchar_col = ?
where ? is bound to Ā would search instead for A.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 3 months
[JBoss JIRA] (TEIID-5686) NPE in MergeJoinStrategy when using joins with a particular limit value
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5686?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5686:
----------------------------------
Fix Version/s: 12.2
> NPE in MergeJoinStrategy when using joins with a particular limit value
> -----------------------------------------------------------------------
>
> Key: TEIID-5686
> URL: https://issues.jboss.org/browse/TEIID-5686
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 12.0
> Environment: teiid-12.0.0 on WildFly Full 14.0.1.Final (WildFly Core 6.0.2.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 12.2
>
>
> When running the following query (IMPORTANT: you shouldn't use row limit):
> {code:sql}
> begin
> declare integer i=0;
> while (i < 2)
> begin
> select *
> from "test_tables_pg.test_a" t0
> JOIN "test_tables_pg.test_e" t1
> ON true
> JOIN "test_tables_pg.test_e" t2
> ON true
> JOIN views.v t3
> on true
> JOIN views.v t4
> on true
> limit 257 ;
> i=i+1;
> end
> end ;;
> {code}
> teiid throws out the following NPE:
> {code:noformat}
> 2019-03-13 13:50:28,582 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue233) InwGU8fhfbja TEIID30019 Unexpected exception for request InwGU8fhfbja.22: java.lang.NullPointerEx
> ception
> at org.teiid.query.processor.relational.MergeJoinStrategy.compareToPrevious(MergeJoinStrategy.java:284)
> at org.teiid.query.processor.relational.MergeJoinStrategy.process(MergeJoinStrategy.java:238)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:260)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:195)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:98)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
> at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
> at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
> at org.teiid.common.buffer.AbstractTupleSource.nextTuple(AbstractTupleSource.java:44)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:303)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:492)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:362)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:43)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:281)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:113)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:199)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 3 months
[JBoss JIRA] (TEIID-5686) NPE in MergeJoinStrategy when using joins with a particular limit value
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5686?page=com.atlassian.jira.plugin... ]
Work on TEIID-5686 started by Steven Hawkins.
---------------------------------------------
> NPE in MergeJoinStrategy when using joins with a particular limit value
> -----------------------------------------------------------------------
>
> Key: TEIID-5686
> URL: https://issues.jboss.org/browse/TEIID-5686
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 12.0
> Environment: teiid-12.0.0 on WildFly Full 14.0.1.Final (WildFly Core 6.0.2.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Priority: Blocker
> Fix For: 12.2
>
>
> When running the following query (IMPORTANT: you shouldn't use row limit):
> {code:sql}
> begin
> declare integer i=0;
> while (i < 2)
> begin
> select *
> from "test_tables_pg.test_a" t0
> JOIN "test_tables_pg.test_e" t1
> ON true
> JOIN "test_tables_pg.test_e" t2
> ON true
> JOIN views.v t3
> on true
> JOIN views.v t4
> on true
> limit 257 ;
> i=i+1;
> end
> end ;;
> {code}
> teiid throws out the following NPE:
> {code:noformat}
> 2019-03-13 13:50:28,582 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue233) InwGU8fhfbja TEIID30019 Unexpected exception for request InwGU8fhfbja.22: java.lang.NullPointerEx
> ception
> at org.teiid.query.processor.relational.MergeJoinStrategy.compareToPrevious(MergeJoinStrategy.java:284)
> at org.teiid.query.processor.relational.MergeJoinStrategy.process(MergeJoinStrategy.java:238)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:260)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:195)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:98)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
> at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
> at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
> at org.teiid.common.buffer.AbstractTupleSource.nextTuple(AbstractTupleSource.java:44)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:303)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:492)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:362)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:43)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:281)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:113)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:199)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 3 months
[JBoss JIRA] (TEIID-5685) Allow for binding non-ascii strings as varchar
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5685?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-5685:
---------------------------------------
The actual exception is:
ORA-01461: can bind a LONG value only for insert into a LONG column
This can occur when a varchar or nvarchar binding exceeds 4000 bytes. For nvarchar that can happen for any string of 1333 characters or more depending on the particulars of the encoding (there are a lot of older oracle issues about this).
For char and nchar it can happen at 2000 bytes, with a similar limitation around the character conversion for nchar.
> Allow for binding non-ascii strings as varchar
> ----------------------------------------------
>
> Key: TEIID-5685
> URL: https://issues.jboss.org/browse/TEIID-5685
> Project: Teiid
> Issue Type: Quality Risk
> Components: JDBC Connector
> Reporter: Steven Hawkins
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2
>
>
> Related to TEIID-5587, even newer oracle drivers that do support NVARCHAR will throw an exception when the number of bytes in an NVARCHAR string exceeds 4000.
> In situations, such as insert, where the underlying native type can be detected, we can simply bind as VARCHAR if it's not a multi-byte type - and log that the string will have replacement characters.
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 3 months
[JBoss JIRA] (TEIID-5684) Show Latest Deployed Date of VDB in metadata tables
by Steven Hawkins (Jira)
[ https://issues.jboss.org/browse/TEIID-5684?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-5684:
----------------------------------
Fix Version/s: 12.2
> Show Latest Deployed Date of VDB in metadata tables
> ---------------------------------------------------
>
> Key: TEIID-5684
> URL: https://issues.jboss.org/browse/TEIID-5684
> Project: Teiid
> Issue Type: Enhancement
> Reporter: Chandra Akkinepalli
> Assignee: Steven Hawkins
> Priority: Major
> Fix For: 12.2
>
>
> There is no easy way to tell when a VDB is last deployed on the server without scanning through server.log. This is very useful metadata to have handy.
> Is it possible to show when a VDB is last deployed on the server via metadata tables.
> May be show this info along with VDB name and version in SYS.VirtualDatabase table?
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 3 months
[JBoss JIRA] (TEIID-5686) NPE in MergeJoinStrategy when using joins with a particular limit value
by dalex dalex (Jira)
[ https://issues.jboss.org/browse/TEIID-5686?page=com.atlassian.jira.plugin... ]
dalex dalex updated TEIID-5686:
-------------------------------
Steps to Reproduce:
1. In postgresql create the test_a and test_e tables using the following scripts:
{code:sql}
CREATE TABLE public.test_a
(
a integer,
b integer
);
INSERT INTO public.test_a(a, b) VALUES (1, 1);
INSERT INTO public.test_a(a, b) VALUES (1, 2);
INSERT INTO public.test_a(a, b) VALUES (2, 1);
INSERT INTO public.test_a(a, b) VALUES (2, 2);
INSERT INTO public.test_a(a, b) VALUES (3, 2);
INSERT INTO public.test_a(a, b) VALUES (3, 10);
CREATE TABLE public.test_e
(
e character varying(254),
f integer
);
INSERT INTO public.test_e(e, f) VALUES ('test', 1234);
INSERT INTO public.test_e(e, f) VALUES ('abcde', 1111);
INSERT INTO public.test_e(e, f) VALUES ('abtest', 2222);
INSERT INTO public.test_e(e, f) VALUES ('testab', 3333);
INSERT INTO public.test_e(e, f) VALUES ('abtestab', 4444);
{code}
2. Add postgresql database configuration in standalone-teiid.xml:
{code:xml}
<datasource jndi-name="java:/test_tables_pg" pool-name="test_tables_pg" enabled="true" use-java-context="true">
<connection-url>jdbc:postgresql://localhost:5432/test?charSet=utf8</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<driver>org.postgresql</driver>
<pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>70</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>XXXXX</user-name>
<password>XXXXX</password>
</security>
<validation>
<check-valid-connection-sql>select 0</check-valid-connection-sql>
</validation>
<timeout>
<blocking-timeout-millis>120000</blocking-timeout-millis>
<idle-timeout-minutes>5</idle-timeout-minutes>
</timeout>
</datasource>
{code}
3. Add in test-vdb.xml java:/test_tables_pg configured in previous step as datasource:
{code:xml}
<model name="test_tables_pg">
<property name="importer.useFullSchemaName" value="false"/>
<property name="importer.tableTypes" value="TABLE,VIEW"/>
<property name="importer.importKeys" value="false"/>
<source name="test_tables_pg" translator-name="myPg" connection-jndi-name="java:/test_tables_pg"/>
</model>
{code}
4. Configure in the test-vdb.xml the following virtual view:
{code:xml}
<model visible = "true" type = "VIRTUAL" name = "views">
<metadata type = "DDL"><![CDATA[
create view v as
select *
from(
select e
from "test_tables_pg.test_e" tb1, TEXTTABLE(tb1.e COLUMNS col1 string) x
) t
join "test_tables_pg.test_a" tb2
on true
]]>
</metadata>
</model>
{code}
5. Run the following query:
{code:sql}
begin
declare integer i=0;
while (i < 2)
begin
select *
from "test_tables_pg.test_a" t0
JOIN "test_tables_pg.test_e" t1
ON true
JOIN "test_tables_pg.test_e" t2
ON true
JOIN views.v t3
on true
JOIN views.v t4
on true
limit 257 ;
i=i+1;
end
end ;;
{code}
IMPORTANT: you shouldn't use row limit. I used SQuirrel and the bug was reproduced only when I removed row limit and provided limit clause with 257 value and above. If you provide limit clause with 256 value and below the query above will work correctly.
was:
1. In postgresql create the test_a and test_e tables using the following scripts:
CREATE TABLE public.test_a
(
a integer,
b integer
);
INSERT INTO public.test_a(a, b) VALUES (1, 1);
INSERT INTO public.test_a(a, b) VALUES (1, 2);
INSERT INTO public.test_a(a, b) VALUES (2, 1);
INSERT INTO public.test_a(a, b) VALUES (2, 2);
INSERT INTO public.test_a(a, b) VALUES (3, 2);
INSERT INTO public.test_a(a, b) VALUES (3, 10);
CREATE TABLE public.test_e
(
e character varying(254),
f integer
);
INSERT INTO public.test_e(e, f) VALUES ('test', 1234);
INSERT INTO public.test_e(e, f) VALUES ('abcde', 1111);
INSERT INTO public.test_e(e, f) VALUES ('abtest', 2222);
INSERT INTO public.test_e(e, f) VALUES ('testab', 3333);
INSERT INTO public.test_e(e, f) VALUES ('abtestab', 4444);
2. Add postgresql database configuration in standalone-teiid.xml:
{code:xml}
<datasource jndi-name="java:/test_tables_pg" pool-name="test_tables_pg" enabled="true" use-java-context="true">
<connection-url>jdbc:postgresql://localhost:5432/test?charSet=utf8</connection-url>
<driver-class>org.postgresql.Driver</driver-class>
<driver>org.postgresql</driver>
<pool>
<min-pool-size>2</min-pool-size>
<max-pool-size>70</max-pool-size>
<prefill>false</prefill>
<use-strict-min>false</use-strict-min>
<flush-strategy>FailingConnectionOnly</flush-strategy>
</pool>
<security>
<user-name>XXXXX</user-name>
<password>XXXXX</password>
</security>
<validation>
<check-valid-connection-sql>select 0</check-valid-connection-sql>
</validation>
<timeout>
<blocking-timeout-millis>120000</blocking-timeout-millis>
<idle-timeout-minutes>5</idle-timeout-minutes>
</timeout>
</datasource>
{code}
3. Add in test-vdb.xml java:/test_tables_pg configured in previous step as datasource:
{code:xml}
<model name="test_tables_pg">
<property name="importer.useFullSchemaName" value="false"/>
<property name="importer.tableTypes" value="TABLE,VIEW"/>
<property name="importer.importKeys" value="false"/>
<source name="test_tables_pg" translator-name="myPg" connection-jndi-name="java:/test_tables_pg"/>
</model>
{code}
4. Configure in the test-vdb.xml the following virtual view:
{code:xml}
<model visible = "true" type = "VIRTUAL" name = "views">
<metadata type = "DDL"><![CDATA[
create view v as
select *
from(
select e
from "test_tables_pg.test_e" tb1, TEXTTABLE(tb1.e COLUMNS col1 string) x
) t
join "test_tables_pg.test_a" tb2
on true
]]>
</metadata>
</model>
{code}
5. Run the following query:
{code:sql}
begin
declare integer i=0;
while (i < 2)
begin
select *
from "test_tables_pg.test_a" t0
JOIN "test_tables_pg.test_e" t1
ON true
JOIN "test_tables_pg.test_e" t2
ON true
JOIN views.v t3
on true
JOIN views.v t4
on true
limit 257 ;
i=i+1;
end
end ;;
{code}
IMPORTANT: you shouldn't use row limit. I used SQuirrel and the bug was reproduced only when I removed row limit and provided limit clause with 257 value and above. If you provide limit clause with 256 value and below the query above will work correctly.
> NPE in MergeJoinStrategy when using joins with a particular limit value
> -----------------------------------------------------------------------
>
> Key: TEIID-5686
> URL: https://issues.jboss.org/browse/TEIID-5686
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 12.0
> Environment: teiid-12.0.0 on WildFly Full 14.0.1.Final (WildFly Core 6.0.2.Final)
> Reporter: dalex dalex
> Assignee: Steven Hawkins
> Priority: Blocker
>
> When running the following query (IMPORTANT: you shouldn't use row limit):
> {code:sql}
> begin
> declare integer i=0;
> while (i < 2)
> begin
> select *
> from "test_tables_pg.test_a" t0
> JOIN "test_tables_pg.test_e" t1
> ON true
> JOIN "test_tables_pg.test_e" t2
> ON true
> JOIN views.v t3
> on true
> JOIN views.v t4
> on true
> limit 257 ;
> i=i+1;
> end
> end ;;
> {code}
> teiid throws out the following NPE:
> {code:noformat}
> 2019-03-13 13:50:28,582 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue233) InwGU8fhfbja TEIID30019 Unexpected exception for request InwGU8fhfbja.22: java.lang.NullPointerEx
> ception
> at org.teiid.query.processor.relational.MergeJoinStrategy.compareToPrevious(MergeJoinStrategy.java:284)
> at org.teiid.query.processor.relational.MergeJoinStrategy.process(MergeJoinStrategy.java:238)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:260)
> at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:195)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:98)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
> at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
> at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
> at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
> at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
> at org.teiid.common.buffer.AbstractTupleSource.nextTuple(AbstractTupleSource.java:44)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:303)
> at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
> at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
> at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:492)
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:362)
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:43)
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:281)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:113)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:199)
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
> at java.lang.Thread.run(Thread.java:745)
> {code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 3 months
[JBoss JIRA] (TEIID-5686) NPE in MergeJoinStrategy when using joins with a particular limit value
by dalex dalex (Jira)
dalex dalex created TEIID-5686:
----------------------------------
Summary: NPE in MergeJoinStrategy when using joins with a particular limit value
Key: TEIID-5686
URL: https://issues.jboss.org/browse/TEIID-5686
Project: Teiid
Issue Type: Bug
Components: Query Engine
Affects Versions: 12.0
Environment: teiid-12.0.0 on WildFly Full 14.0.1.Final (WildFly Core 6.0.2.Final)
Reporter: dalex dalex
Assignee: Steven Hawkins
When running the following query (IMPORTANT: you shouldn't use row limit):
{code:sql}
begin
declare integer i=0;
while (i < 2)
begin
select *
from "test_tables_pg.test_a" t0
JOIN "test_tables_pg.test_e" t1
ON true
JOIN "test_tables_pg.test_e" t2
ON true
JOIN views.v t3
on true
JOIN views.v t4
on true
limit 257 ;
i=i+1;
end
end ;;
{code}
teiid throws out the following NPE:
{code:noformat}
2019-03-13 13:50:28,582 ERROR [org.teiid.PROCESSOR] (Worker4_QueryProcessorQueue233) InwGU8fhfbja TEIID30019 Unexpected exception for request InwGU8fhfbja.22: java.lang.NullPointerEx
ception
at org.teiid.query.processor.relational.MergeJoinStrategy.compareToPrevious(MergeJoinStrategy.java:284)
at org.teiid.query.processor.relational.MergeJoinStrategy.process(MergeJoinStrategy.java:238)
at org.teiid.query.processor.relational.JoinNode.nextBatchDirectInternal(JoinNode.java:260)
at org.teiid.query.processor.relational.JoinNode.nextBatchDirect(JoinNode.java:195)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
at org.teiid.query.processor.relational.LimitNode.nextBatchDirect(LimitNode.java:98)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
at org.teiid.query.processor.relational.ProjectNode.nextBatchDirect(ProjectNode.java:146)
at org.teiid.query.processor.relational.RelationalNode.nextBatch(RelationalNode.java:277)
at org.teiid.query.processor.relational.RelationalPlan.nextBatch(RelationalPlan.java:141)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
at org.teiid.query.processor.BatchIterator.finalRow(BatchIterator.java:65)
at org.teiid.common.buffer.AbstractTupleSource.getCurrentTuple(AbstractTupleSource.java:66)
at org.teiid.query.processor.BatchIterator.getCurrentTuple(BatchIterator.java:80)
at org.teiid.common.buffer.AbstractTupleSource.nextTuple(AbstractTupleSource.java:44)
at org.teiid.query.processor.proc.ProcedurePlan.nextBatchDirect(ProcedurePlan.java:303)
at org.teiid.query.processor.proc.ProcedurePlan.nextBatch(ProcedurePlan.java:269)
at org.teiid.query.processor.QueryProcessor.nextBatchDirect(QueryProcessor.java:148)
at org.teiid.query.processor.QueryProcessor.nextBatch(QueryProcessor.java:111)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:160)
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:142)
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:492)
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:362)
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:43)
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:285)
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:281)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:113)
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:199)
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
{code}
--
This message was sent by Atlassian Jira
(v7.12.1#712002)
5 years, 3 months