incubator-vxquery-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Eldon Carman <ecarm...@ucr.edu>
Subject VXQuery Number Query Plans
Date Thu, 07 Jun 2012 02:30:44 GMT
As we talked about starting with simple queries, I have outlined a few
of the basic integer math queries. The first two queries are just
numbers. VXQuery starts with a empty tuple and assigned the integer to
a variable. The system detects the value is a integer and labels the
value as such. The remaining queries are for addition, subtraction,
multiplication an division. Each of these queries are basically the
same, with the exception of the math function call. First creating
variables for each of the numbers, starting with the first in the
equation. Next passing both variables into the math function call. I
am a little confused by all the functions arguments and sub arguments
for each of the math functions. Let me know if this assessment is
correct.

For example "add" takes two arguments.
  1. The first argument is the result of "promote" which is a function
that takes two arguments.
    a. The first argument to "promote" is another function called
"data" that takes one parameter, the variable of the integer.
    b. The second argument is the type for "promote".
  2. The second is similar for the other variable.


My questions:
 - in 1. The plan use the function promote. Is this to ensure the type
is correct for the addition function?
 - in 1b. Why does the type here show anyAtomicType instead of integer?

Thanks
Preston

Number Queries
----------------------
1

assign [$$1] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(1)] -- |UNPARTITIONED|
  empty-tuple-source -- |UNPARTITIONED|

17

assign [$$1] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(17)] -- |UNPARTITIONED|
  empty-tuple-source -- |UNPARTITIONED|

1 + 1

assign [$$3] <- [function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}add,
Args:[function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$1],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)], function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$2],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)]]] -- |UNPARTITIONED|
  assign [$$2] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(1)] -- |UNPARTITIONED|
    assign [$$1] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(1)] -- |UNPARTITIONED|
      empty-tuple-source -- |UNPARTITIONED|

5 + 4

assign [$$3] <- [function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}add,
Args:[function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$1],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)], function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$2],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)]]] -- |UNPARTITIONED|
  assign [$$2] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(4)] -- |UNPARTITIONED|
    assign [$$1] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(5)] -- |UNPARTITIONED|
      empty-tuple-source -- |UNPARTITIONED|

5 - 4

assign [$$3] <- [function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}subtract,
Args:[function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$1],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)], function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$2],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)]]] -- |UNPARTITIONED|
  assign [$$2] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(4)] -- |UNPARTITIONED|
    assign [$$1] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(5)] -- |UNPARTITIONED|
      empty-tuple-source -- |UNPARTITIONED|

5 * 4

assign [$$3] <- [function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}multiply,
Args:[function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$1],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)], function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$2],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)]]] -- |UNPARTITIONED|
  assign [$$2] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(4)] -- |UNPARTITIONED|
    assign [$$1] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(5)] -- |UNPARTITIONED|
      empty-tuple-source -- |UNPARTITIONED|

6 div 3

assign [$$3] <- [function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}divide,
Args:[function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$1],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)], function-call:
vxquery:{urn:org.apache.vxquery.operators-ext}promote,
Args:[function-call:
vxquery:{http://www.w3.org/2005/xpath-functions}data, Args:[$$2],
{http://www.w3.org/2001/XMLSchema-extensions}type
QUANT_ONE({http://www.w3.org/2001/XMLSchema}anyAtomicType
QUANT_QUESTION)]]] -- |UNPARTITIONED|
  assign [$$2] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(3)] -- |UNPARTITIONED|
    assign [$$1] <- [{http://www.w3.org/2001/XMLSchema}integer
QUANT_ONE(6)] -- |UNPARTITIONED|
      empty-tuple-source -- |UNPARTITIONED|

Mime
View raw message