[teiid-issues] [JBoss JIRA] (TEIID-2900) ASSERTION FAILED with UNION
Tom Arnold (JIRA)
issues at jboss.org
Tue Mar 18 14:10:11 EDT 2014
[ https://issues.jboss.org/browse/TEIID-2900?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12953958#comment-12953958 ]
Tom Arnold commented on TEIID-2900:
-----------------------------------
Here is query plan. I'll try to find a better way to reproduce this.
{{code}}
14:04:37,543 DEBUG [org.teiid.COMMAND_LOG] (New I/O worker #6) qy+D1Orv7o1H START USER COMMAND: startTime=2014-03-18 14:04:37.543 requestID=qy+D1Orv7o1H.0 txID=null sessionID=qy+D1Orv7o1H applicationName=JDBCprincipal=user at teiid-security vdbName=Foo vdbVersion=1 sql=select * from (
(select identifier from foo.items)
union all
(select identifier from bar.items)
) x
order by identifier desc
limit 1000
14:04:37,552 INFO [org.teiid.PLANNER] (Worker21_QueryProcessorQueue387) qy+D1Orv7o1H
============================================================================
USER COMMAND:
SELECT x.identifier FROM (SELECT foo.items.identifier FROM foo.items UNION ALL SELECT bar.items.identifier FROM bar.items) AS x ORDER BY x.identifier DESC LIMIT 1000
----------------------------------------------------------------------------
OPTIMIZE:
SELECT x.identifier FROM (SELECT foo.items.identifier FROM foo.items UNION ALL SELECT bar.items.identifier FROM bar.items) AS x ORDER BY x.identifier DESC LIMIT 1000
----------------------------------------------------------------------------
GENERATE CANONICAL:
SELECT x.identifier FROM (SELECT foo.items.identifier FROM foo.items UNION ALL SELECT bar.items.identifier FROM bar.items) AS x ORDER BY x.identifier DESC LIMIT 1000
CANONICAL PLAN:
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000})
Sort(groups=[x], props={SORT_ORDER=ORDER BY x.identifier DESC})
Project(groups=[x], props={PROJECT_COLS=[x.identifier]})
Source(groups=[x], props={NESTED_COMMAND=SELECT foo.items.identifier FROM foo.items UNION ALL SELECT bar.items.identifier FROM bar.items, SYMBOL_MAP={x.identifier=foo.items.identifier}})
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier]})
Source(groups=[foo.items])
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier]})
Source(groups=[bar.items])
============================================================================
EXECUTING PlaceAccess
AFTER:
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000})
Sort(groups=[x], props={SORT_ORDER=ORDER BY x.identifier DESC})
Project(groups=[x], props={PROJECT_COLS=[x.identifier]})
Source(groups=[x], props={NESTED_COMMAND=SELECT foo.items.identifier FROM foo.items UNION ALL SELECT bar.items.identifier FROM bar.items, SYMBOL_MAP={x.identifier=foo.items.identifier}})
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier]})
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000})
Source(groups=[foo.items])
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier]})
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000})
Source(groups=[bar.items])
============================================================================
EXECUTING AssignOutputElements
AFTER:
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=[x.identifier]})
Sort(groups=[x], props={SORT_ORDER=ORDER BY x.identifier DESC, OUTPUT_COLS=[x.identifier]})
Project(groups=[x], props={PROJECT_COLS=[x.identifier], OUTPUT_COLS=[x.identifier]})
Source(groups=[x], props={NESTED_COMMAND=SELECT foo.items.identifier FROM foo.items UNION ALL SELECT bar.items.identifier FROM bar.items, SYMBOL_MAP={x.identifier=foo.items.identifier}, OUTPUT_COLS=[x.identifier]})
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true, OUTPUT_COLS=[foo.items.identifier]})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier], OUTPUT_COLS=[foo.items.identifier]})
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000, OUTPUT_COLS=[foo.items.identifier]})
Source(groups=[foo.items], props={OUTPUT_COLS=[foo.items.identifier]})
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier], OUTPUT_COLS=[bar.items.identifier]})
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000, OUTPUT_COLS=[bar.items.identifier]})
Source(groups=[bar.items], props={OUTPUT_COLS=[bar.items.identifier]})
============================================================================
EXECUTING MergeVirtual
AFTER:
TupleLimit(groups=[])
Sort(groups=[foo.items], props={SORT_ORDER=ORDER BY foo.items.identifier DESC, OUTPUT_COLS=[x.identifier]})
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true, OUTPUT_COLS=[foo.items.identifier]})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier], OUTPUT_COLS=[foo.items.identifier]})
Access(groups=[foo.items])
Source(groups=[foo.items])
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier], OUTPUT_COLS=[bar.items.identifier]})
Access(groups=[bar.items])
Source(groups=[bar.items])
============================================================================
EXECUTING CleanCriteria
AFTER:
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=null})
Sort(groups=[foo.items], props={SORT_ORDER=ORDER BY foo.items.identifier DESC, OUTPUT_COLS=null})
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true, OUTPUT_COLS=null})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier], OUTPUT_COLS=null})
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000, OUTPUT_COLS=null})
Source(groups=[foo.items], props={OUTPUT_COLS=null})
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier], OUTPUT_COLS=null})
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000, OUTPUT_COLS=null})
Source(groups=[bar.items], props={OUTPUT_COLS=null})
============================================================================
EXECUTING PlanUnions
AFTER:
TupleLimit(groups=[])
Sort(groups=[foo.items])
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true, OUTPUT_COLS=null})
Project(groups=[foo.items])
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000, OUTPUT_COLS=null})
Source(groups=[foo.items])
Project(groups=[bar.items])
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000, OUTPUT_COLS=null})
Source(groups=[bar.items])
============================================================================
EXECUTING RaiseAccess
AFTER:
TupleLimit(groups=[])
Sort(groups=[foo.items])
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true, OUTPUT_COLS=null})
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000, OUTPUT_COLS=null})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier], OUTPUT_COLS=null})
Source(groups=[foo.items], props={OUTPUT_COLS=null})
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000, OUTPUT_COLS=null})
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier], OUTPUT_COLS=null})
Source(groups=[bar.items], props={OUTPUT_COLS=null})
============================================================================
EXECUTING PushLimit
AFTER:
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=null})
Sort(groups=[foo.items], props={SORT_ORDER=ORDER BY foo.items.identifier DESC, OUTPUT_COLS=null})
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true, OUTPUT_COLS=null})
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000})
Sort(groups=[], props={SORT_ORDER=ORDER BY foo.items.identifier DESC})
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000, OUTPUT_COLS=null})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier], OUTPUT_COLS=null})
Source(groups=[foo.items])
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000})
Sort(groups=[], props={SORT_ORDER=ORDER BY bar.items.identifier DESC})
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000, OUTPUT_COLS=null})
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier], OUTPUT_COLS=null})
Source(groups=[bar.items])
============================================================================
EXECUTING AssignOutputElements
AFTER:
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=[foo.items.identifier]})
Sort(groups=[foo.items], props={SORT_ORDER=ORDER BY foo.items.identifier DESC, OUTPUT_COLS=[foo.items.identifier]})
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true, OUTPUT_COLS=[foo.items.identifier]})
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=[foo.items.identifier]})
Sort(groups=[], props={SORT_ORDER=ORDER BY foo.items.identifier DESC, OUTPUT_COLS=[foo.items.identifier]})
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000, OUTPUT_COLS=[foo.items.identifier]})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier], OUTPUT_COLS=[foo.items.identifier]})
Source(groups=[foo.items], props={OUTPUT_COLS=[foo.items.identifier]})
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=[bar.items.identifier]})
Sort(groups=[], props={SORT_ORDER=ORDER BY bar.items.identifier DESC, OUTPUT_COLS=[bar.items.identifier]})
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000, OUTPUT_COLS=[bar.items.identifier]})
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier], OUTPUT_COLS=[bar.items.identifier]})
Source(groups=[bar.items], props={OUTPUT_COLS=[bar.items.identifier]})
============================================================================
EXECUTING CalculateCost
AFTER:
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=1000.0, EST_COL_STATS={foo.items.identifier=[750.0, 1.0]}})
Sort(groups=[foo.items], props={SORT_ORDER=ORDER BY foo.items.identifier DESC, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=2000.0, EST_COL_STATS={foo.items.identifier=[1500.0, 1.0]}})
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=2000.0, EST_COL_STATS={foo.items.identifier=[1500.0, 0.0]}})
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=1000.0, EST_COL_STATS={foo.items.identifier=[1000.0, 0.0]}})
Sort(groups=[], props={SORT_ORDER=ORDER BY foo.items.identifier DESC, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=-1.0})
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=-1.0})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier], OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=-1.0})
Source(groups=[foo.items], props={OUTPUT_COLS=[foo.items.identifier], EST_COL_STATS={foo.items.identifier=[-1.0, -1.0]}, EST_CARDINALITY=-1.0})
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=[bar.items.identifier], EST_CARDINALITY=1000.0, EST_COL_STATS={bar.items.identifier=[1000.0, 0.0]}})
Sort(groups=[], props={SORT_ORDER=ORDER BY bar.items.identifier DESC, OUTPUT_COLS=[bar.items.identifier], EST_CARDINALITY=-1.0})
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000, OUTPUT_COLS=[bar.items.identifier], EST_CARDINALITY=-1.0})
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier], OUTPUT_COLS=[bar.items.identifier], EST_CARDINALITY=-1.0})
Source(groups=[bar.items], props={OUTPUT_COLS=[bar.items.identifier], EST_COL_STATS={bar.items.identifier=[-1.0, -1.0]}, EST_CARDINALITY=-1.0})
============================================================================
EXECUTING PlanSorts
AFTER:
TupleLimit(groups=[])
Sort(groups=[foo.items], props={SORT_ORDER=ORDER BY foo.items.identifier DESC, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=2000.0, EST_COL_STATS={foo.items.identifier=[1500.0, 1.0]}})
SetOperation(groups=[], props={SET_OPERATION=UNION, USE_ALL=true, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=2000.0, EST_COL_STATS={foo.items.identifier=[1500.0, 0.0]}})
Project(groups=[foo.items], props={PROJECT_COLS=[foo.items.identifier], OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=-1.0})
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000, OUTPUT_COLS=[foo.items.identifier]})
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=1000.0, EST_COL_STATS={foo.items.identifier=[1000.0, 0.0]}})
Sort(groups=[], props={SORT_ORDER=ORDER BY foo.items.identifier DESC, OUTPUT_COLS=[foo.items.identifier], EST_CARDINALITY=-1.0})
Source(groups=[foo.items], props={OUTPUT_COLS=[foo.items.identifier], EST_COL_STATS={foo.items.identifier=[-1.0, -1.0]}, EST_CARDINALITY=-1.0})
Project(groups=[bar.items], props={PROJECT_COLS=[bar.items.identifier], OUTPUT_COLS=[bar.items.identifier], EST_CARDINALITY=-1.0})
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000, OUTPUT_COLS=[bar.items.identifier]})
TupleLimit(groups=[], props={MAX_TUPLE_LIMIT=1000, OUTPUT_COLS=[bar.items.identifier], EST_CARDINALITY=1000.0, EST_COL_STATS={bar.items.identifier=[1000.0, 0.0]}})
Sort(groups=[], props={SORT_ORDER=ORDER BY bar.items.identifier DESC, OUTPUT_COLS=[bar.items.identifier], EST_CARDINALITY=-1.0})
Source(groups=[bar.items], props={OUTPUT_COLS=[bar.items.identifier], EST_COL_STATS={bar.items.identifier=[-1.0, -1.0]}, EST_CARDINALITY=-1.0})
============================================================================
EXECUTING CollapseSource
AFTER:
TupleLimit(groups=[])
Sort(groups=[foo.items])
SetOperation(groups=[])
Project(groups=[foo.items])
Access(groups=[foo.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=foo, nameInSource=null, uuid=tid:409578bc964d-391228ac-00000000, OUTPUT_COLS=[foo.items.identifier], ATOMIC_REQUEST=SELECT foo.items.identifier FROM foo.items ORDER BY foo.items.identifier DESC LIMIT 1000})
Project(groups=[bar.items])
Access(groups=[bar.items], props={SOURCE_HINT=null, MODEL_ID=Schema name=bar, nameInSource=null, uuid=tid:d2199ed63385-e932ed06-00000000, OUTPUT_COLS=[bar.items.identifier], ATOMIC_REQUEST=SELECT bar.items.identifier FROM bar.items ORDER BY bar.items.identifier DESC LIMIT 1000})
============================================================================
CONVERTING PLAN TREE TO PROCESS TREE
PROCESS PLAN =
LimitNode(0) output=[foo.items.identifier] limit 1000
SortNode(1) output=[foo.items.identifier] [SORT] [foo.items.identifier DESC]
UnionAllNode(2) output=[foo.items.identifier]
ProjectNode(3) output=[foo.items.identifier] [foo.items.identifier]
AccessNode(4) output=[foo.items.identifier] SELECT foo.items.identifier FROM foo.items ORDER BY foo.items.identifier DESC LIMIT 1000
ProjectNode(5) output=[bar.items.identifier] [bar.items.identifier]
AccessNode(6) output=[bar.items.identifier] SELECT bar.items.identifier FROM bar.items ORDER BY bar.items.identifier DESC LIMIT 1000
============================================================================
----------------------------------------------------------------------------
OPTIMIZATION COMPLETE:
PROCESSOR PLAN:
LimitNode(0) output=[foo.items.identifier] limit 1000
SortNode(1) output=[foo.items.identifier] [SORT] [foo.items.identifier DESC]
UnionAllNode(2) output=[foo.items.identifier]
ProjectNode(3) output=[foo.items.identifier] [foo.items.identifier]
AccessNode(4) output=[foo.items.identifier] SELECT foo.items.identifier FROM foo.items ORDER BY foo.items.identifier DESC LIMIT 1000
ProjectNode(5) output=[bar.items.identifier] [bar.items.identifier]
AccessNode(6) output=[bar.items.identifier] SELECT bar.items.identifier FROM bar.items ORDER BY bar.items.identifier DESC LIMIT 1000
============================================================================
14:04:37,561 DEBUG [org.teiid.COMMAND_LOG] (Worker22_QueryProcessorQueue388) qy+D1Orv7o1H START DATA SRC COMMAND: startTime=2014-03-18 14:04:37.561 requestID=qy+D1Orv7o1H.0 sourceCommandID=4 executionID=64 txID=null modelName=foo translatorName=custom sessionID=qy+D1Orv7o1H principal=user at teiid-security sql=SELECT foo.items.identifier FROM foo.items ORDER BY foo.items.identifier DESC LIMIT 1000
14:04:37,561 DEBUG [org.teiid.COMMAND_LOG] (Worker23_QueryProcessorQueue389) qy+D1Orv7o1H START DATA SRC COMMAND: startTime=2014-03-18 14:04:37.561 requestID=qy+D1Orv7o1H.0 sourceCommandID=6 executionID=65 txID=null modelName=bar translatorName=custom sessionID=qy+D1Orv7o1H principal=user at teiid-security sql=SELECT bar.items.identifier FROM bar.items ORDER BY bar.items.identifier DESC LIMIT 1000
14:04:37,594 DEBUG [org.teiid.COMMAND_LOG] (Worker21_QueryProcessorQueue390) qy+D1Orv7o1H END SRC COMMAND: endTime=2014-03-18 14:04:37.594 requestID=qy+D1Orv7o1H.0 sourceCommandID=6 executionID=65 txID=null modelName=bar translatorName=custom sessionID=qy+D1Orv7o1H principal=user at teiid-security finalRowCount=28
14:04:37,891 DEBUG [org.teiid.COMMAND_LOG] (Worker21_QueryProcessorQueue391) qy+D1Orv7o1H END SRC COMMAND: endTime=2014-03-18 14:04:37.891 requestID=qy+D1Orv7o1H.0 sourceCommandID=4 executionID=64 txID=null modelName=foo translatorName=custom sessionID=qy+D1Orv7o1H principal=user at teiid-security finalRowCount=1000
14:04:37,893 DEBUG [org.teiid.COMMAND_LOG] (Worker21_QueryProcessorQueue391) qy+D1Orv7o1H ERROR USER COMMAND: endTime=2014-03-18 14:04:37.892 requestID=qy+D1Orv7o1H.0 txID=null sessionID=qy+D1Orv7o1H principal=user at teiid-security vdbName=Foo vdbVersion=1 finalRowCount=null
14:04:37,893 ERROR [org.teiid.PROCESSOR] (Worker21_QueryProcessorQueue391) qy+D1Orv7o1H TEIID30019 Unexpected exception for request qy+D1Orv7o1H.0: java.lang.AssertionError: ASSERTION FAILED: expected reference to be not null
at org.teiid.core.util.Assertion.failed(Assertion.java:73) [teiid-common-core-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.core.util.Assertion.isNotNull(Assertion.java:100) [teiid-common-core-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.core.util.Assertion.isNotNull(Assertion.java:92) [teiid-common-core-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.common.buffer.TupleBuffer.getBatch(TupleBuffer.java:287) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.common.buffer.TupleBuffer.truncateTo(TupleBuffer.java:425) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.query.processor.relational.SortNode.sortPhase(SortNode.java:117) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.query.processor.relational.SortNode.getBuffer(SortNode.java:205) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.query.processor.relational.LimitNode.getBuffer(LimitNode.java:211) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.query.processor.relational.RelationalPlan.getBuffer(RelationalPlan.java:250) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.query.processor.QueryProcessor.getBuffer(QueryProcessor.java:289) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:149) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:141) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:435) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:320) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:248) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_02]
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_02]
at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]
{{code}}
> ASSERTION FAILED with UNION
> ---------------------------
>
> Key: TEIID-2900
> URL: https://issues.jboss.org/browse/TEIID-2900
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.7
> Reporter: Tom Arnold
> Assignee: Steven Hawkins
> Labels: 8.7, assertionfailedexception, union
>
> This is reproducible in Teiid 8.7 beta2 from the downloads page, and in 8.7 beta3 built from GIT master.
> foo has >1000 rows. bar has 28 rows. Playing with the limit, it's possible to get the query to work.
> {code}
> <model name="foo">
> <source name="foo" translator-name="custom" connection-jndi-name="java:/FooDS"/>
> </model>
> <model name="bar">
> <source name="bar" translator-name="custom" connection-jndi-name="java:/BarDS"/>
> </model>
> {code}
> {code:sql}
> select * from (
> (select identifier from foo.items)
> union all
> (select identifier from bar.items)
> ) x
> order by identifier desc
> limit 1000;
> {code}
> {code}
> 11:15:32,992 DEBUG [org.teiid.COMMAND_LOG] (New I/O worker #1) Nqu3TY8Cd+7P START USER COMMAND: startTime=2014-03-18 11:15:32.992 requestID=Nqu3TY8Cd+7P.0 txID=null sessionID=Nqu3TY8Cd+7P applicationName=JDBCprincipal=user at teiid-security vdbName=Foo vdbVersion=1 sql=select * from (
> (select identifier from foo.items)
> union all
> (select identifier from bar.items)
> ) x
> order by identifier desc
> limit 1000
> 11:15:33,106 DEBUG [org.teiid.COMMAND_LOG] (Worker1_QueryProcessorQueue1) Nqu3TY8Cd+7P START DATA SRC COMMAND: startTime=2014-03-18 11:15:33.106 requestID=Nqu3TY8Cd+7P.0 sourceCommandID=4 executionID=0 txID=null modelName=foo translatorName=foo sessionID=Nqu3TY8Cd+7P principal=user at teiid-security sql=SELECT foo.items.identifier FROM foo.items ORDER BY foo.items.identifier DESC LIMIT 1000
> 11:15:33,106 DEBUG [org.teiid.COMMAND_LOG] (Worker2_QueryProcessorQueue2) Nqu3TY8Cd+7P START DATA SRC COMMAND: startTime=2014-03-18 11:15:33.106 requestID=Nqu3TY8Cd+7P.0 sourceCommandID=6 executionID=1 txID=null modelName=bar translatorName=foo sessionID=Nqu3TY8Cd+7P principal=user at teiid-security sql=SELECT bar.items.identifier FROM bar.items ORDER BY bar.items.identifier DESC LIMIT 1000
> 11:15:33,154 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue3) Nqu3TY8Cd+7P END SRC COMMAND: endTime=2014-03-18 11:15:33.154 requestID=Nqu3TY8Cd+7P.0 sourceCommandID=6 executionID=1 txID=null modelName=bar translatorName=foo sessionID=Nqu3TY8Cd+7P principal=user at teiid-security finalRowCount=28
> 11:15:33,553 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue4) Nqu3TY8Cd+7P END SRC COMMAND: endTime=2014-03-18 11:15:33.553 requestID=Nqu3TY8Cd+7P.0 sourceCommandID=4 executionID=0 txID=null modelName=foo translatorName=foo sessionID=Nqu3TY8Cd+7P principal=user at teiid-security finalRowCount=1000
> 11:15:33,567 DEBUG [org.teiid.COMMAND_LOG] (Worker0_QueryProcessorQueue4) Nqu3TY8Cd+7P ERROR USER COMMAND: endTime=2014-03-18 11:15:33.567 requestID=Nqu3TY8Cd+7P.0 txID=null sessionID=Nqu3TY8Cd+7P principal=user at teiid-security vdbName=Foo vdbVersion=1 finalRowCount=null
> 11:15:33,568 ERROR [org.teiid.PROCESSOR] (Worker0_QueryProcessorQueue4) Nqu3TY8Cd+7P TEIID30019 Unexpected exception for request Nqu3TY8Cd+7P.0: java.lang.AssertionError: ASSERTION FAILED: expected reference to be not null
> at org.teiid.core.util.Assertion.failed(Assertion.java:73) [teiid-common-core-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.core.util.Assertion.isNotNull(Assertion.java:100) [teiid-common-core-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.core.util.Assertion.isNotNull(Assertion.java:92) [teiid-common-core-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.common.buffer.TupleBuffer.getBatch(TupleBuffer.java:287) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.common.buffer.TupleBuffer.truncateTo(TupleBuffer.java:425) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.query.processor.relational.SortNode.sortPhase(SortNode.java:117) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.query.processor.relational.SortNode.getBuffer(SortNode.java:205) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.query.processor.relational.LimitNode.getBuffer(LimitNode.java:211) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.query.processor.relational.RelationalPlan.getBuffer(RelationalPlan.java:250) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.query.processor.QueryProcessor.getBuffer(QueryProcessor.java:289) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:149) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.query.processor.BatchCollector.collectTuples(BatchCollector.java:141) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.dqp.internal.process.RequestWorkItem.processMore(RequestWorkItem.java:435) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.dqp.internal.process.RequestWorkItem.process(RequestWorkItem.java:320) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.dqp.internal.process.AbstractWorkItem.run(AbstractWorkItem.java:51) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.dqp.internal.process.RequestWorkItem.run(RequestWorkItem.java:248) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:274) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214) [teiid-engine-8.7.0.Beta2.jar:8.7.0.Beta2]
> at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) [rt.jar:1.7.0_02]
> at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) [rt.jar:1.7.0_02]
> at java.lang.Thread.run(Thread.java:722) [rt.jar:1.7.0_02]
> {code}
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the teiid-issues
mailing list