You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@vxquery.apache.org by "Shivani Mall (JIRA)" <ji...@apache.org> on 2015/08/04 20:39:04 UTC
[jira] [Created] (VXQUERY-169) Error with the Query Plans for 6 and
7
Shivani Mall created VXQUERY-169:
------------------------------------
Summary: Error with the Query Plans for 6 and 7
Key: VXQUERY-169
URL: https://issues.apache.org/jira/browse/VXQUERY-169
Project: VXQuery
Issue Type: Bug
Reporter: Shivani Mall
Priority: Critical
Here are the logical and optimized plans for Query 6. There is some issue with the plans. There needs to be some operator between child and count. Since child sends out empty sequences and the count aggregate function counts all the empty sequences giving a very large value.
INFO: Optimized Plan:
distribute result [%0->$$16]
-- DISTRIBUTE_RESULT |UNPARTITIONED|
exchange
-- ONE_TO_ONE_EXCHANGE |UNPARTITIONED|
unnest $$16 <- function-call: vxquery:{urn:org.apache.vxquery.operators-ext}iterate, Args:[
%0->$$12
]
-- UNNEST |UNPARTITIONED|
subplan {
aggregate [$$12] <- [function-call: [vxquery:{http://www.w3.org/2005/xpath-functions}count|vxquery:{http://www.w3.org/2005/xpath-functions}sum], Args:[
%0->$$20
]]
-- AGGREGATE |LOCAL|
aggregate [$$20] <- [function-call: vxquery:{http://www.w3.org/2005/xpath-functions}count, Args:[
vxquery:{urn:org.apache.vxquery.operators-ext}child <element(NameTest({}item, {http://www.w3.org/2001/XMLSchema}anyType, nilled) >, Args:[
vxquery:{urn:org.apache.vxquery.operators-ext}treat <node*>, Args:[
%0->$$10
]
]
]]
-- AGGREGATE |LOCAL|
unnest $$10 <- function-call: vxquery:{urn:org.apache.vxquery.operators-ext}iterate, Args:[
%0->$$8
]
-- UNNEST |UNPARTITIONED|
nested tuple source
-- NESTED_TUPLE_SOURCE |UNPARTITIONED|
}
-- SUBPLAN |UNPARTITIONED|
subplan {
aggregate [$$8] <- [function-call: vxquery:{urn:org.apache.vxquery.operators-ext}sequence, Args:[
function-call: vxquery:{urn:org.apache.vxquery.operators-ext}descendant-or-self, Args:[
vxquery:{urn:org.apache.vxquery.operators-ext}treat <node*>, Args:[
%0->$$6
]
]
]]
-- AGGREGATE |UNPARTITIONED|
unnest $$6 <- function-call: vxquery:{urn:org.apache.vxquery.operators-ext}iterate, Args:[
%0->$$3
]
-- UNNEST |UNPARTITIONED|
nested tuple source
-- NESTED_TUPLE_SOURCE |UNPARTITIONED|
}
-- SUBPLAN |UNPARTITIONED|
unnest $$3 <- function-call: vxquery:{urn:org.apache.vxquery.operators-ext}iterate, Args:[
%0->$$2
]
-- UNNEST |UNPARTITIONED|
assign [$$2] <- [function-call: vxquery:{http://www.w3.org/2005/xpath-functions}doc, Args:[
{http://www.w3.org/2001/XMLSchema}string : ../regions.xml
]]
-- ASSIGN |UNPARTITIONED|
empty-tuple-source
-- EMPTY_TUPLE_SOURCE |UNPARTITIONED|
FINE: Logical Plan:
distribute result [%0->$$16] -- |UNPARTITIONED|
unnest $$16 <- function-call: vxquery:{urn:org.apache.vxquery.operators-ext}iterate, Args:[
%0->$$15
] -- |UNPARTITIONED|
subplan {
aggregate [$$15] <- [function-call: vxquery:{urn:org.apache.vxquery.operators-ext}sequence, Args:[
%0->$$14
]] -- |UNPARTITIONED|
assign [$$14] <- [function-call: vxquery:{http://www.w3.org/2005/xpath-functions}count, Args:[
vxquery:{urn:org.apache.vxquery.operators-ext}treat <item*>, Args:[
%0->$$13
]
]] -- |UNPARTITIONED|
assign [$$13] <- [function-call: vxquery:{urn:org.apache.vxquery.operators-ext}sort-distinct-nodes-asc-or-atomics, Args:[
%0->$$12
]] -- |UNPARTITIONED|
subplan {
aggregate [$$12] <- [function-call: vxquery:{urn:org.apache.vxquery.operators-ext}sequence, Args:[
vxquery:{urn:org.apache.vxquery.operators-ext}child <element(NameTest({}item, {http://www.w3.org/2001/XMLSchema}anyType, nilled) >, Args:[
vxquery:{urn:org.apache.vxquery.operators-ext}treat <node*>, Args:[
%0->$$10
]
]
]] -- |UNPARTITIONED|
unnest $$10 at $$11 <- function-call: vxquery:{urn:org.apache.vxquery.operators-ext}iterate, Args:[
%0->$$8
] -- |UNPARTITIONED|
assign [$$9] <- [function-call: vxquery:{http://www.w3.org/2005/xpath-functions}count, Args:[
%0->$$8
]] -- |UNPARTITIONED|
nested tuple source -- |UNPARTITIONED|
} -- |UNPARTITIONED|
subplan {
aggregate [$$8] <- [function-call: vxquery:{urn:org.apache.vxquery.operators-ext}sequence, Args:[
function-call: vxquery:{urn:org.apache.vxquery.operators-ext}descendant-or-self, Args:[
vxquery:{urn:org.apache.vxquery.operators-ext}treat <node*>, Args:[
%0->$$6
]
]
]] -- |UNPARTITIONED|
unnest $$6 at $$7 <- function-call: vxquery:{urn:org.apache.vxquery.operators-ext}iterate, Args:[
%0->$$4
] -- |UNPARTITIONED|
assign [$$5] <- [function-call: vxquery:{http://www.w3.org/2005/xpath-functions}count, Args:[
%0->$$4
]] -- |UNPARTITIONED|
nested tuple source -- |UNPARTITIONED|
} -- |UNPARTITIONED|
assign [$$4] <- [vxquery:{urn:org.apache.vxquery.operators-ext}treat <item >, Args:[
%0->$$3
]] -- |UNPARTITIONED|
unnest $$3 <- function-call: vxquery:{urn:org.apache.vxquery.operators-ext}iterate, Args:[
%0->$$2
] -- |UNPARTITIONED|
assign [$$2] <- [function-call: vxquery:{http://www.w3.org/2005/xpath-functions}doc, Args:[
vxquery:{urn:org.apache.vxquery.operators-ext}promote <{http://www.w3.org/2001/XMLSchema}string?>, Args:[
function-call: vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[
%0->$$1
]
]
]] -- |UNPARTITIONED|
assign [$$1] <- [{http://www.w3.org/2001/XMLSchema}string : ../regions.xml] -- |UNPARTITIONED|
nested tuple source -- |UNPARTITIONED|
} -- |UNPARTITIONED|
empty-tuple-source -- |UNPARTITIONED|
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)