[JBoss JIRA] (TEIID-2900) ASSERTION FAILED with UNION
by Tom Arnold (JIRA)
[ https://issues.jboss.org/browse/TEIID-2900?page=com.atlassian.jira.plugin... ]
Tom Arnold updated TEIID-2900:
------------------------------
Attachment: TestTranslator.zip
I can reproduce the issue on 8.7 beta 2 with this translator. The Foo VDB has two models. The translator reads the number of rows of dummy data to return from the VDB property "Rows".
> 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
> Attachments: TestTranslator.zip
>
>
> 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@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@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@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@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@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@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
10 years, 9 months
[JBoss JIRA] (TEIID-2887) MongoDB: mongodb DBCollection aggregate error
by Ramesh Reddy (JIRA)
[ https://issues.jboss.org/browse/TEIID-2887?page=com.atlassian.jira.plugin... ]
Ramesh Reddy commented on TEIID-2887:
-------------------------------------
In week and half will do a CR1. Meanwhile you can build from master if you want
> MongoDB: mongodb DBCollection aggregate error
> ----------------------------------------------
>
> Key: TEIID-2887
> URL: https://issues.jboss.org/browse/TEIID-2887
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7
> Environment: Teiid 8.7 Beta1 with MongoDB
> Reporter: Ivan Chan
> Assignee: Ramesh Reddy
> Labels: Beta3, teiid
> Fix For: 8.7
>
>
> Here is my simple JSON object:
> "addresst" { "_id": 0,
> "name": "Duke Grant",
> "age": 38,
> "gender": "male",
>
> "address": { "_id": 0,
> "street": "345 Burnett Street",
> "city": "Nash",
> "state": "Rhode Island",
> "zip": 7384 }
> }
> And I define a schema like following:
> REATE FOREIGN TABLE addresst (custid integer PRIMARY KEY, name varchar(25), age integer, gender varchar(25)) OPTIONS(UPDATABLE 'TRUE');
> CREATE FOREIGN TABLE address (custid integer PRIMARY KEY, street varchar(50), city varchar(25), state varchar(25), zipcode varchar(6), FOREIGN KEY (custId) REFERENCES addresst (custid)) OPTIONS(UPDATABLE 'TRUE' , "teiid_mongo:MERGE" 'addresst');
> Got exception when trying to execute a query like following:
> select "MongoDB_addresst"."gender" as "MongoDB_addresst_gender",
> "MongoDB_address"."state" as "MongoDB_address_state"
> from "MongoDB"."addresst" "MongoDB_addresst"
> inner join "MongoDB"."address" "MongoDB_address" on ("MongoDB_addresst"."custid" = "MongoDB_address"."custid")
> group by "MongoDB_addresst"."gender", "MongoDB_address"."state"
> order by "MongoDB_addresst_gender", "MongoDB_address_state"
> limit 1000
> Exception:
> Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "qa-mongodb.jaspersoft.com/172.17.1.48:27017" , "errmsg" : "exception: dotted field names are only allowed at the top level" , "code" :
> 16405 , "ok" : 0.0}
> at com.mongodb.CommandResult.getException(CommandResult.java:71)
> at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
> at com.mongodb.DBCollection.aggregate(DBCollection.java:1308)
> at org.teiid.translator.mongodb.MongoDBQueryExecution.execute(MongoDBQueryExecution.java:99)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:317)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:273)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214)
> ... 3 more
--
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
10 years, 9 months
[JBoss JIRA] (TEIID-2900) ASSERTION FAILED with UNION
by Tom Arnold (JIRA)
[ https://issues.jboss.org/browse/TEIID-2900?page=com.atlassian.jira.plugin... ]
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@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@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@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@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@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@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@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@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@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@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@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@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
10 years, 9 months
[JBoss JIRA] (TEIID-2900) ASSERTION FAILED with UNION
by Tom Arnold (JIRA)
[ https://issues.jboss.org/browse/TEIID-2900?page=com.atlassian.jira.plugin... ]
Tom Arnold edited comment on TEIID-2900 at 3/18/14 2:10 PM:
------------------------------------------------------------
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@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@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@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@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@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@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}
was (Author: tom9729):
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@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@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@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@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@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@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@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@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@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@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@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@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
10 years, 9 months
[JBoss JIRA] (TEIID-2900) ASSERTION FAILED with UNION
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2900?page=com.atlassian.jira.plugin... ]
Steven Hawkins commented on TEIID-2900:
---------------------------------------
Can you attach a query plan as well? At first glance it seems like this could only happen with dup removal and not a full sort, but I'll keep trying to reproduce locally.
> 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@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@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@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@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@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@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
10 years, 9 months
[JBoss JIRA] (TEIID-2896) Add TEXTTABLE function capabilities to interpret fixed width data file content that is shorter than the defined line length
by Steven Hawkins (JIRA)
[ https://issues.jboss.org/browse/TEIID-2896?page=com.atlassian.jira.plugin... ]
Steven Hawkins updated TEIID-2896:
----------------------------------
Issue Type: Enhancement (was: Feature Request)
Fix Version/s: 8.7
Assignee: Steven Hawkins
Just ignore the patch. After thinking about this some more, if this was the old mmx behavior then there isn't really a reason not to support it by default. In the worst case someone would get data where they got an exception before, but seems like a corner case.
> Add TEXTTABLE function capabilities to interpret fixed width data file content that is shorter than the defined line length
> ---------------------------------------------------------------------------------------------------------------------------
>
> Key: TEIID-2896
> URL: https://issues.jboss.org/browse/TEIID-2896
> Project: Teiid
> Issue Type: Enhancement
> Components: Query Engine
> Reporter: Van Halbert
> Assignee: Steven Hawkins
> Fix For: 8.7
>
> Attachments: TEIID-2896.patch
>
>
> Current behavior is that data lines too short to fit a fixed width data interpretation produces an error such as "Error: Text parse error: Fixed width line width 35 is smaller than the expected 60 on text line 1 in file:/tmp/file.csv.". The customer's use case is interpreting data files from another application which bundles multiple types of data along with additional descriptive info/metadata about the data contained within the file. As the error is thrown if any lines after the first interpreted line are shorter than the summed value of the fixed width columns, they are unable to query the file. The customer wishes for the ERROR to be suppressed and the query to return the data independent of whether it fits the fixed width criteria and potentially to be able to filter the data being retrieved.
--
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
10 years, 9 months
[JBoss JIRA] (TEIID-2887) MongoDB: mongodb DBCollection aggregate error
by Ivan Chan (JIRA)
[ https://issues.jboss.org/browse/TEIID-2887?page=com.atlassian.jira.plugin... ]
Ivan Chan commented on TEIID-2887:
----------------------------------
Thanks for the quick response. Do you know when I can expect BETA3?
> MongoDB: mongodb DBCollection aggregate error
> ----------------------------------------------
>
> Key: TEIID-2887
> URL: https://issues.jboss.org/browse/TEIID-2887
> Project: Teiid
> Issue Type: Bug
> Components: Misc. Connectors
> Affects Versions: 8.7
> Environment: Teiid 8.7 Beta1 with MongoDB
> Reporter: Ivan Chan
> Assignee: Ramesh Reddy
> Labels: Beta3, teiid
> Fix For: 8.7
>
>
> Here is my simple JSON object:
> "addresst" { "_id": 0,
> "name": "Duke Grant",
> "age": 38,
> "gender": "male",
>
> "address": { "_id": 0,
> "street": "345 Burnett Street",
> "city": "Nash",
> "state": "Rhode Island",
> "zip": 7384 }
> }
> And I define a schema like following:
> REATE FOREIGN TABLE addresst (custid integer PRIMARY KEY, name varchar(25), age integer, gender varchar(25)) OPTIONS(UPDATABLE 'TRUE');
> CREATE FOREIGN TABLE address (custid integer PRIMARY KEY, street varchar(50), city varchar(25), state varchar(25), zipcode varchar(6), FOREIGN KEY (custId) REFERENCES addresst (custid)) OPTIONS(UPDATABLE 'TRUE' , "teiid_mongo:MERGE" 'addresst');
> Got exception when trying to execute a query like following:
> select "MongoDB_addresst"."gender" as "MongoDB_addresst_gender",
> "MongoDB_address"."state" as "MongoDB_address_state"
> from "MongoDB"."addresst" "MongoDB_addresst"
> inner join "MongoDB"."address" "MongoDB_address" on ("MongoDB_addresst"."custid" = "MongoDB_address"."custid")
> group by "MongoDB_addresst"."gender", "MongoDB_address"."state"
> order by "MongoDB_addresst_gender", "MongoDB_address_state"
> limit 1000
> Exception:
> Caused by: com.mongodb.CommandFailureException: { "serverUsed" : "qa-mongodb.jaspersoft.com/172.17.1.48:27017" , "errmsg" : "exception: dotted field names are only allowed at the top level" , "code" :
> 16405 , "ok" : 0.0}
> at com.mongodb.CommandResult.getException(CommandResult.java:71)
> at com.mongodb.CommandResult.throwOnError(CommandResult.java:110)
> at com.mongodb.DBCollection.aggregate(DBCollection.java:1308)
> at org.teiid.translator.mongodb.MongoDBQueryExecution.execute(MongoDBQueryExecution.java:99)
> at org.teiid.dqp.internal.datamgr.ConnectorWorkItem.execute(ConnectorWorkItem.java:317)
> at org.teiid.dqp.internal.process.DataTierTupleSource.getResults(DataTierTupleSource.java:298)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:110)
> at org.teiid.dqp.internal.process.DataTierTupleSource$1.call(DataTierTupleSource.java:107)
> at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334)
> at java.util.concurrent.FutureTask.run(FutureTask.java:166)
> at org.teiid.dqp.internal.process.FutureWork.run(FutureWork.java:58)
> at org.teiid.dqp.internal.process.DQPWorkContext.runInContext(DQPWorkContext.java:273)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$RunnableWrapper.run(ThreadReuseExecutor.java:119)
> at org.teiid.dqp.internal.process.ThreadReuseExecutor$3.run(ThreadReuseExecutor.java:214)
> ... 3 more
--
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
10 years, 9 months
[JBoss JIRA] (TEIID-2842) Impala/ HIVE2: Unsupported compress file
by Mike LaSpina (JIRA)
[ https://issues.jboss.org/browse/TEIID-2842?page=com.atlassian.jira.plugin... ]
Mike LaSpina commented on TEIID-2842:
-------------------------------------
Ramesh,
I did get it working using LZO compression using Impala. It does require Impala version 1.2.3 in order to get it working, but we did manage to get it to work.
Mike LaSpina Sales Engineer
Jaspersoft Corporation
► Office: +1 602 750 5809
► Skype: mike.laspina.jaspersoft
► Email: mlaspina(a)jaspersoft.com
► Website: http://www.jaspersoft.com Community: http://community.jaspersoft.com/
> Impala/ HIVE2: Unsupported compress file
> -----------------------------------------
>
> Key: TEIID-2842
> URL: https://issues.jboss.org/browse/TEIID-2842
> Project: Teiid
> Issue Type: Bug
> Components: Query Engine
> Affects Versions: 8.6
> Environment: Impala/HIVE2 with Teiid
> Reporter: Ivan Chan
> Assignee: Ramesh Reddy
> Labels: teiid
> Fix For: 8.7
>
>
> Teiid makes a query call "Describe table" in HiveMetadataProcessor.addTable(....). However, if the table contains compress file, HIVE2 driver would return the following execption:
> {code}
> java.sql.SQLException: AnalysisException: Failed to load metadata for table: default.omniturelogs
> CAUSED BY: TableLoadingException: Failed to load metadata for table:
> omniturelogs
> CAUSED BY: RuntimeException: Compressed text files are not supported: hdfs://localhost.localdomain:8020/user/cloudera/omniturelogs/Omniture.0.tsv.gz
> at org.apache.hive.jdbc.Utils.verifySuccess(Utils.java:161)
> at org.apache.hive.jdbc.Utils.verifySuccessWithInfo(Utils.java:149)
> at org.apache.hive.jdbc.HiveStatement.execute(HiveStatement.java:182)
> at org.apache.hive.jdbc.HiveStatement.executeQuery(HiveStatement.java:246)
> at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
> at org.apache.tomcat.dbcp.dbcp.DelegatingStatement.executeQuery(DelegatingStatement.java:208)
> at org.teiid.translator.hive.HiveMetadataProcessor.addTable(HiveMetadataProcessor.java:112)
> at org.teiid.translator.hive.HiveMetadataProcessor.getConnectorMetadata(HiveMetadataProcessor.java:48)
>
> at org.teiid.translator.jdbc.JDBCExecutionFactory.getMetadata(JDBCExecutionFactory.java:311)
> ... 155 more
> {code}
> Maybe Teiid should call "DESCRIBE FORMATTED table" for table that contains compress file.
> Reference:
> http://grokbase.com/t/cloudera/impala-user/13b7c9apmx/impala-failed-to-qu...
--
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
10 years, 9 months