Return-Path: X-Original-To: apmail-incubator-vxquery-dev-archive@minotaur.apache.org Delivered-To: apmail-incubator-vxquery-dev-archive@minotaur.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 342999C3E for ; Thu, 7 Jun 2012 02:31:16 +0000 (UTC) Received: (qmail 94933 invoked by uid 500); 7 Jun 2012 02:31:15 -0000 Delivered-To: apmail-incubator-vxquery-dev-archive@incubator.apache.org Received: (qmail 94891 invoked by uid 500); 7 Jun 2012 02:31:15 -0000 Mailing-List: contact vxquery-dev-help@incubator.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: vxquery-dev@incubator.apache.org Delivered-To: mailing list vxquery-dev@incubator.apache.org Received: (qmail 94862 invoked by uid 99); 7 Jun 2012 02:31:14 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2012 02:31:14 +0000 X-ASF-Spam-Status: No, hits=-2.3 required=5.0 tests=RCVD_IN_DNSWL_MED,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: local policy) Received: from [138.23.226.212] (HELO sentrell.ucr.edu) (138.23.226.212) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 07 Jun 2012 02:31:06 +0000 Received: from mail-vc0-f176.google.com (mail-vc0-f176.google.com [209.85.220.176]) by sentrell.ucr.edu (MOS 3.10.10a-GA) with ESMTP id UAZ39236 for ; Wed, 6 Jun 2012 19:36:30 -0700 (PDT) Received: by vcbfo14 with SMTP id fo14so82283vcb.21 for ; Wed, 06 Jun 2012 19:30:44 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type :x-gm-message-state; bh=gk1mYMOYaDVukNXGKgBg1IPHuqbuZ9wIKlj7WL5uk1k=; b=CCIbWMx6ZGsh01Ub7BdT8JqfQC+HQj7JB12v7ZV2ThK+jWxNv4WEP+nyaezIY+1SkP deGLm0fo7qwiI91+DwmP9GkYvNNqEk2IpJYiCXrUK16ztpsPfhDbAt2pF/SUM422W1lf yz+2rS7I2J8yw3NBybXG/pW3ue0slo6rZ7FhCa1XKyaEKjsK7HijiQBI1xjnbnu+oiRg rRhdnV0cWfQD9adajFDzwFBj1sRbOX3xz0voq201v3n8ak263AS2ZD7o3Fv4dZHpmCI6 x9y9sLsDVNX5Cbz9qSKTYDnj8Cy31t4Zdiu9OhBVLPaSubVY5dAjH+kUSQOm5njLCj19 5UYQ== MIME-Version: 1.0 Received: by 10.220.221.139 with SMTP id ic11mr341908vcb.74.1339036244504; Wed, 06 Jun 2012 19:30:44 -0700 (PDT) Received: by 10.220.148.70 with HTTP; Wed, 6 Jun 2012 19:30:44 -0700 (PDT) Date: Wed, 6 Jun 2012 19:30:44 -0700 Message-ID: Subject: VXQuery Number Query Plans From: Eldon Carman To: vxquery-dev@incubator.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQk2euxBykb1RWg/SogbsajvnQzKY6ID5EjjelZPGPuRA8k9OW8LOyEeyCQujccQw/PWjMe0 X-Junkmail-Status: score=0/50, host= X-Virus-Checked: Checked by ClamAV on apache.org 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|