You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@vxquery.apache.org by pr...@apache.org on 2014/04/02 06:11:41 UTC

[01/50] [abbrv] git commit: Added a check to make sure the data file was created.

Repository: incubator-vxquery
Updated Branches:
  refs/heads/prestonc/hash_join fcb024115 -> 0b80d3f56


Added a check to make sure the data file was created.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/25c38f4f
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/25c38f4f
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/25c38f4f

Branch: refs/heads/prestonc/hash_join
Commit: 25c38f4fa0490150e0e0fe206698a165702c9856
Parents: c10a8e9
Author: Preston Carman <pr...@apache.org>
Authored: Fri Feb 28 11:48:55 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 .../main/resources/noaa-ghcn-daily/scripts/weather_data_files.py | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/25c38f4f/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
index 64b86d6..8e26e99 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
@@ -110,6 +110,10 @@ class WeatherDataFiles:
         current_partition = 0
         csv_sorted = self.get_csv_in_partition_order()
         for item, size in csv_sorted.iteritems():
+            if size < 0:
+                print "The progress file does not have the sensor size data saved."
+                return
+            
             station_id = item.split('.')[0]
             # Update partition bases on smallest current size.
             current_partition = partition_sizes.index(min(partition_sizes))


[45/50] [abbrv] New weather benchmark test suite that includes tests for 1, 2, and 4 partitions of data.

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/XQTSCatalogSecondEdition.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/XQTSCatalogSecondEdition.xml b/vxquery-xtest/tests/XQTSCatalogSecondEdition.xml
new file mode 100644
index 0000000..e076557
--- /dev/null
+++ b/vxquery-xtest/tests/XQTSCatalogSecondEdition.xml
@@ -0,0 +1,3816 @@
+<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="XQTSCatalog.xsl" ?><test-suite xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" CatalogDesignDate="2003-04-03" version="1.0.3" SourceOffsetPath="./" ResultOffsetPath="ExpectedTestResults/" XQueryQueryOffsetPath="Queries/XQuery/" XQueryXQueryOffsetPath="Queries/XQueryX/" XQueryFileExtension=".xq" XQueryXFileExtension=".xqx" xsi:schemaLocation="http://www.w3.org/2005/02/query-test-XQTSCatalog XQTSCatalog.xsd">
+<xqts:test-suite-info xmlns:xqts="http://www.w3.org/2005/02/query-test-XQTSCatalog" xmlns:atom="http://www.w3.org/2005/Atom">
+<xqts:title>XQTS 1.0.3 Second Edition Subset</xqts:title>
+<xqts:description>
+            Test Suite for XQuery 1.0 Second Edition.
+            This catalog contains only test cases that reflect changes made in XQuery 1.0 Second Edition.
+            This XQTS subset was generated on 09/17/2010 15:10.
+         </xqts:description>
+</xqts:test-suite-info>
+<citations>
+<citation-spec name="XQuery">
+<description last-mod="2007-01-23">XQuery 1.0: An XML Query Language</description>
+<spec-URI>http://www.w3.org/TR/xquery/</spec-URI>
+</citation-spec>
+<citation-spec name="FuncOps">
+<description last-mod="2007-01-23">XQuery 1.0 and XPath 2.0 Functions and Operators</description>
+<spec-URI>http://www.w3.org/TR/xpath-functions/</spec-URI>
+</citation-spec>
+<citation-spec name="DataModel">
+<description last-mod="2007-01-23">XQuery 1.0 and XPath 2.0 Data Model</description>
+<spec-URI>http://www.w3.org/TR/xpath-datamodel/</spec-URI>
+</citation-spec>
+<citation-spec name="FormalSemantics">
+<description last-mod="2007-01-23">XQuery 1.0 and XPath 2.0 Formal Semantics</description>
+<spec-URI>http://www.w3.org/TR/xquery-semantics/</spec-URI>
+</citation-spec>
+<citation-spec name="SchemaPart2">
+<description last-mod="2003-03-25">XML Schema Part 2: Datatypes</description>
+<spec-URI>http://www.w3.org/TR/xmlschema-2/</spec-URI>
+</citation-spec>
+<citation-spec name="Schema-Errata">
+<description last-mod="2003-03-25">XML Schema Errata</description>
+<note>Current practice is to have one Errata document for all parts of Schema.</note>
+<spec-URI>http://www.w3.org/2001/05/xmlschema-errata</spec-URI>
+</citation-spec>
+<citation-spec name="UseCases">
+<description last-mod="2006-07-12">XML Query Use Cases</description>
+<spec-URI>http://www.w3c.org/TR/xquery-use-cases/</spec-URI>
+</citation-spec>
+<citation-spec name="XQueryX">
+<description last-mod="2007-01-23">XML Syntax for XQuery 1.0 (XQueryX)</description>
+<spec-URI>http://www.w3.org/TR/xqueryx/</spec-URI>
+</citation-spec>
+<citation-spec name="Serialization">
+<description last-mod="2007-01-23">XSLT 2.0 and XQuery 1.0 Serialization</description>
+<spec-URI>http://www.w3.org/TR/xslt-xquery-serialization/</spec-URI>
+</citation-spec>
+</citations>
+<comparisons>
+<comparison name="XML">
+<description last-mod="2003-03-25">The XML InfoSets should be canonicalized and compared.</description>
+</comparison>
+<comparison name="Fragment">
+<description last-mod="2004-10-20">
+            A 'fragment' refers to an XML based instance which has multiple top-level elements and NO XML declaration.
+            The comparator for this should simply wrap the entire fragment in a container element and perform XML comparison.
+         </description>
+</comparison>
+<comparison name="Text">
+<description last-mod="2003-03-25">
+            Each line of non-whitespace text should match. New-line sequences
+            may vary and should be neutralized. Due to issues with the XML serialization of certain characters (e.g. '&lt;'),
+            it is not possible to simply compare the actual and expected results. Rather (as is the case with the 'Fragment' comparator)
+            the test harness should convert the results into valid XML (by adding a container element) and perform comparison
+            on the XML canonicalized versions of the results.
+         </description>
+</comparison>
+<comparison name="Ignore">
+<description last-mod="2003-03-25">
+            Only the presence/absence of this file is significant,
+            not its content.
+         </description>
+</comparison>
+<comparison name="Inspect">
+<description last-mod="2003-03-25">
+            Automated comparison is not possible. the output should be
+            inspected by a human.
+         </description>
+</comparison>
+</comparisons>
+<roles>
+<role name="principal-data">
+<description last-mod="2003-03-25">
+            This is the source that is handed in to the processor as the
+            initial input sequence, setting the "evaluation context" as described in XQuery chapter 2.
+         </description>
+</role>
+<role name="supplemental-data">
+<description last-mod="2003-03-25">
+            These are sources that may be read by functions such as
+            fn:document() as the query is evaluated.
+         </description>
+</role>
+<role name="schema">
+<description last-mod="2003-03-25">
+            These are schema definitions that may be referenced by sources
+            or in the query.
+         </description>
+</role>
+<role name="dtd">
+<description last-mod="2003-03-25">
+            These are dtd definitions that may be referenced by sources
+            or in the query.
+         </description>
+</role>
+<role name="principal">
+<description last-mod="2003-03-25">
+            This is an output (either text or XML) that will contain the
+            query results. If the processor invocation sequence accepts a filename for results, this name may be
+            passed, possibly prefixed by a partial directory path to allow storage of the results in a separate
+            directory tree.
+         </description>
+</role>
+<role name="console-log">
+<description last-mod="2003-03-25">
+            This is an output (text file tagged .log) that will contain the
+            captured "console" output for a command-line invocation, or equivalent messages from a harness. The
+            main goal is to capture error messages that came from the processor.
+         </description>
+<note>
+            A test lab may choose to capture console output for every test case, in which case the presence
+            of this element is a signal that the console log of this test contains messages that are significant to
+            the pass/fail determination.
+         </note>
+</role>
+</roles>
+<scenarios>
+<scenario name="standard">
+<description last-mod="2005-06-10">
+            A query this is expected to produce valid results. Principal input should always be specified, even if the query doesn't have any PathExpr.
+         </description>
+</scenario>
+<scenario name="parse-error">
+<description last-mod="2005-06-10">
+            A query this is expected to raise a parsing/syntax error at query parse time. Principal input should always be specified, even if the query doesn't have any PathExpr.
+         </description>
+</scenario>
+<scenario name="runtime-error">
+<description last-mod="2005-06-10">
+            A query this is expected to raise a runtime error at query parse time. Runtime errors in this case include those raised by static typing rules. Principal input should always be specified, even if the query doesn't have any PathExpr.
+         </description>
+</scenario>
+<scenario name="trivial">
+<description last-mod="2006-03-29">
+            A query this is expected to produce valid results. Principal input should always be specified, even if the query doesn't have any PathExpr.
+            The initial query returns an &lt;xqx:xquery&gt; element (Trivial Embedding of XQuery).
+            This embedded query is then executed to produce the final result.
+         </description>
+</scenario>
+</scenarios>
+<sources>
+<source ID="XQTSCatalog" FileName="XQTSCatalog.xml" Creator="XQuery Test Task Force" schema="XQTSCatalogxsd">
+<description last-mod="2005-04-14">XQuery Test Suite Catalog</description>
+</source>
+<source ID="bib2" FileName="TestSources/bib2.xml" Creator="spec-authors">
+<description last-mod="2003-03-25">Bibliography example with extra comments and PIs.</description>
+</source>
+<source ID="emptydoc" FileName="TestSources/emptydoc.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Contains just a "doc" element, no comments/text/PIs.</description>
+</source>
+<source ID="fsx" FileName="TestSources/fsx.xml" Creator="Mike Rorke">
+<description last-mod="2003-03-25">Data about a filesystem represented in XML.</description>
+</source>
+<source ID="fsx_NS" FileName="TestSources/fsx_NS.xml" Creator="Mike Rorke">
+<description last-mod="2003-03-25">Data about a filesystem represented in XML with namespace-qualified names.</description>
+</source>
+<source ID="MixNS" FileName="TestSources/MixNS.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Small tree with element names in mixed namespaces.</description>
+<note>Use @index to identify elements precisely.</note>
+</source>
+<source ID="nw_Customers" FileName="TestSources/nw_Customers.xml" Creator="Kuen Siew">
+<description last-mod="2003-03-25">Customer name/address file with some non-ASCII characters.</description>
+</source>
+<source ID="TopMany" FileName="TestSources/TopMany.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Like TreeCompass, but with comments and PIs off the root. PI targets vary.</description>
+<note>All text nodes must have non-whitespace characters.</note>
+</source>
+<source ID="Tree1Child" FileName="TestSources/Tree1Child.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has just one child, of an abnormal name, off the center node.</description>
+<note>One attribute each on west and center.</note>
+</source>
+<source ID="Tree1Text" FileName="TestSources/Tree1Text.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has just a text node and no child element off the center node.</description>
+</source>
+<source ID="TreeCompass" FileName="TestSources/TreeCompass.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A tree intended to allow many kinds of path expressions.</description>
+<note>Need multiple attributes on center, west, and south, plus @mark scattered around.</note>
+<note>Mix of text and element children in many places, but east should have only a text node.</note>
+<note>All text nodes must have non-whitespace characters.</note>
+<note>Top element is far-north.</note>
+</source>
+<source ID="TreeEmpty" FileName="TestSources/TreeEmpty.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has just one "south" element at the top, bearing one "mark" attribute.</description>
+</source>
+<source ID="TreeRepeat" FileName="TestSources/TreeRepeat.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has center elements off the real center node.</description>
+<note>Use @mark to distinguish center elements.</note>
+<note>"Real" center must have multiple element children, some with duplicate names (south-east).</note>
+<note>Repeating attribute names used, including same name on elements of the same name.</note>
+<note>Comments and text nodes are strewn about. All text nodes must have non-whitespace characters.</note>
+</source>
+<source ID="TreeStack" FileName="TestSources/TreeStack.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has several "south" elements, some stacked within each other.</description>
+<note>Use "mark" attributes at several levels and on all south elements.</note>
+</source>
+<source ID="TreeTrunc" FileName="TestSources/TreeTrunc.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has no content at all in center or west, no attributes anywhere.</description>
+</source>
+<source ID="xq311A" FileName="TestSources/xq311A.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Data that fits first example in XQuery 3.11.</description>
+</source>
+<source ID="xq311B" FileName="TestSources/xq311B.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Data that fits later examples in XQuery 3.11.</description>
+</source>
+<source ID="DupNode" FileName="TestSources/DupNode.xml" Creator="Andreas Behm">
+<description last-mod="2005-04-26">Simple document with all node kinds</description>
+</source>
+<source ID="inscope" FileName="TestSources/inscope.xml" Creator="Andreas Behm">
+<description last-mod="2005-08-26">Simple document with namespaces</description>
+</source>
+<source ID="nsmode" FileName="TestSources/nsmode.xml" Creator="Andreas Behm">
+<description last-mod="2005-04-26">Source document for namespace copy modes</description>
+</source>
+<source ID="works" FileName="TestSources/works.xml" Creator="Carmelo Montanez">
+<description last-mod="2005-03-04">Data for various NIST tests</description>
+</source>
+<source ID="examples" FileName="TestSources/examples.xml" Creator="Carmelo Montanez" schema="examplesxsd">
+<description last-mod="2006-05-19">Data for fn-data-1 test.</description>
+</source>
+<source ID="works-mod" FileName="TestSources/works-mod.xml" Creator="Carmelo Montanez">
+<description last-mod="2005-03-04">Data for various NIST tests (abbreviated, unabbreviated syntax)</description>
+</source>
+<source ID="lang" FileName="TestSources/lang.xml" Creator="Carmelo Montanez">
+<description last-mod="2005-10-19">Data for fn:lang tests.</description>
+</source>
+<source ID="staff" FileName="TestSources/staff.xml" Creator="Carmelo Montanez">
+<description last-mod="2005-03-04">Data for various NIST tests</description>
+</source>
+<source ID="acme_corp" FileName="TestSources/acme_corp.xml" Creator="Ravindranath Chennoju">
+<description last-mod="2005-08-30">Source document for Function Declaration tests</description>
+</source>
+<source ID="bib" FileName="TestSources/bib.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+</source>
+<source ID="reviews" FileName="TestSources/reviews.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+</source>
+<source ID="books" FileName="TestSources/books.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+</source>
+<source ID="prices" FileName="TestSources/prices.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+</source>
+<source ID="book" FileName="TestSources/book.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query TREE use cases</description>
+</source>
+<source ID="report1" FileName="TestSources/report1.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query SEQ use cases</description>
+</source>
+<source ID="items" FileName="TestSources/items.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+</source>
+<source ID="bids" FileName="TestSources/bids.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+</source>
+<source ID="users" FileName="TestSources/users.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+</source>
+<source ID="string" FileName="TestSources/string.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query STRING use cases</description>
+</source>
+<source ID="company-data" FileName="TestSources/company-data.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query STRING use cases</description>
+</source>
+<source ID="auction" FileName="TestSources/auction.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query NS use cases</description>
+</source>
+<source ID="partlist" FileName="TestSources/partlist.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query PARTS use cases</description>
+</source>
+<source ID="sgml" FileName="TestSources/sgml.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query SGML use cases</description>
+</source>
+<source ID="atomic" FileName="TestSources/atomic.xml" Creator="Carmelo Montanez" schema="atomicxsd">
+<description last-mod="2005-03-08">A Schema validated xml file, that contains values for data types. Can be used by any test.</description>
+</source>
+<source ID="id-idref-dtd" FileName="TestSources/iddtd.xml" Creator="Carmelo Montanez">
+<description last-mod="2006-06-28">A DTD validated xml file, that contains data for the ID/IDREF function tests.</description>
+</source>
+<source ID="atomicns" FileName="TestSources/atomicns.xml" Creator="Carmelo Montanez">
+<description last-mod="2006-03-15">A non schema validated xml file, that contains values for data types. Can be used by any test.</description>
+</source>
+<source ID="orderData" FileName="TestSources/orderData.xml" Creator="Carmelo Montanez" schema="orderDataxsd">
+<description last-mod="2005-06-01">A Schema validated xml file, that contains values for some of the order by tests generated by NIST.</description>
+</source>
+<source ID="id-idref" FileName="TestSources/id.xml" Creator="Carmelo Montanez" schema="idxsd">
+<description last-mod="2006-05-12">Data for id and idref related functions (schema-based).</description>
+</source>
+<source ID="id-idref2" FileName="TestSources/id2.xml" Creator="Michael Kay" schema="idxsd">
+<description last-mod="2009-03-06">More data for id and idref related functions (schema-based).</description>
+</source>
+<source ID="SpecialTypes" FileName="TestSources/SpecialTypes.xml" Creator="Mike Rorke" schema="SpecialTypesXSD">
+<description last-mod="2005-06-01">A Schema validated XML file containing certain special types e.g. interleave types, union types, anySimpleType</description>
+</source>
+<source ID="QNameSource" FileName="TestSources/QName-source.xml" Creator="Mike Rorke" schema="QNameSourceXSD">
+<description last-mod="2005-09-28">A schema validated XML file containing QName and QName derived types.</description>
+</source>
+<source ID="notation" FileName="TestSources/notation.xml" Creator="Andreas Behm" schema="notationschema">
+<description last-mod="2005-10-10">A Scehma validated xml file with NOTATION elements</description>
+</source>
+<source ID="textWithSpaces" FileName="TestSources/textWithSpaces.xml" Creator="Joanne Tong">
+<description last-mod="2005-09-29">Data for normalize-space functions</description>
+</source>
+<source ID="XMarkAuction" FileName="TestSources/XMarkAuction.xml" Creator="Frans Englich">
+<description last-mod="2007-03-09">Source file generated XML Benchmark Project's xmlgen utility. See http://www.xml-benchmark.org/.</description>
+</source>
+<source ID="CPPGlobals" FileName="TestSources/CPPGlobals.xml" Creator="Frans Englich">
+<description last-mod="2007-06-27">The declarations of a C++ file described in XML.</description>
+</source>
+<source ID="MainWindow" FileName="TestSources/MainWindow.ui" Creator="Frans Englich">
+<description last-mod="2007-07-09">A description of an graphical user interface.</description>
+</source>
+<source ID="ComplexWhitespace" FileName="TestSources/ComplexWhitespace.xml" Creator="Frans Englich">
+<description last-mod="2007-07-09">A file containing different forms of whitespace.</description>
+</source>
+<source ID="SpaceBracket" FileName="TestSources/SpaceBracket.xml" Creator="Frans Englich">
+<description last-mod="2007-12-20">A file containing ' ]' as a text node.</description>
+</source>
+<source ID="HighUnicode" FileName="TestSources/HighUnicode.xml" Creator="Frans Englich">
+<description last-mod="2007-12-20">Corner case unicode codepoints.</description>
+</source>
+<source ID="HighUnicode2" FileName="TestSources/HighUnicode2.xml" Creator="Frans Englich">
+<description last-mod="2007-12-21">Corner case unicode codepoints, second case.</description>
+</source>
+<source ID="BCIsInvalid" FileName="TestSources/BCisInvalid.xml" Creator="Frans Englich">
+<description last-mod="2007-12-21">An element name containing 0xBC.</description>
+</source>
+<source ID="InvalidUmlaut" FileName="TestSources/InvalidUmlaut.xml" Creator="Frans Englich">
+<description last-mod="2007-12-27">Contains the codepoint 188 in an NCName.</description>
+</source>
+<source ID="NamespaceSuppliedInternally" FileName="TestSources/NamespaceSuppliedInternally.xml" Creator="Frans Englich">
+<description last-mod="2007-12-27">A namespace declared with a namespace declaration, as well as in the internal subset.</description>
+</source>
+<source ID="XMLIdDuplicated" FileName="TestSources/XMLIdDuplicated.xml" Creator="Frans Englich">
+<description last-mod="2008-01-15">An XML file which has two xml:id attributes with the same value.</description>
+</source>
+<source ID="InvalidXMLId" FileName="TestSources/InvalidXMLId.xml" Creator="Frans Englich">
+<description last-mod="2008-01-15">An XML file which has an invalid xml:id attribute.</description>
+</source>
+<source ID="UsingXMLId" FileName="TestSources/UsingXMLId.xml" Creator="Frans Englich">
+<description last-mod="2008-01-15">An XML file which has xml:id attributes.</description>
+</source>
+<source ID="Books2" FileName="TestSources/Books2.xml" Creator="Frans Englich">
+<description last-mod="2008-01-17">An XML which is in ISO-8859-1 encoding.</description>
+</source>
+<source ID="QObject" FileName="TestSources/QObject.xml" Creator="Frans Englich">
+<description last-mod="2008-02-19"/>
+</source>
+<source ID="Char010D" FileName="TestSources/0x010D.xml" Creator="Frans Englich">
+<description last-mod="2008-02-28"/>
+</source>
+<source ID="SmallTree" FileName="TestSources/SmallTree.xml" Creator="Frans Englich">
+<description last-mod="2008-04-03"/>
+</source>
+<source ID="AttributesAndElements" FileName="TestSources/AttributesAndElements.xml" Creator="Frans Englich">
+<description last-mod="2008-04-03"/>
+</source>
+<source ID="functx_prices" FileName="TestSources/functx_prices.xml" Creator="Frans Englich">
+<description last-mod="2008-05-16"/>
+</source>
+<source ID="functx_order" FileName="TestSources/functx_order.xml" Creator="Frans Englich">
+<description last-mod="2008-05-16"/>
+</source>
+<source ID="functx_cats" FileName="TestSources/functx_cats.xml" Creator="Frans Englich">
+<description last-mod="2008-05-16"/>
+</source>
+<source ID="functx_catalog" FileName="TestSources/functx_catalog.xml" Creator="Frans Englich">
+<description last-mod="2008-05-16"/>
+</source>
+<source ID="functx_book" FileName="TestSources/functx_book.xml" Creator="Frans Englich">
+<description last-mod="2008-06-25"/>
+</source>
+<source ID="badxml" FileName="TestSources/badxml.xml" Creator="Frans Englich">
+<description last-mod="2008-05-19"/>
+</source>
+<source ID="builtinEntities" FileName="TestSources/builtinEntities.xml" Creator="Frans Englich">
+<description last-mod="2008-05-26"/>
+</source>
+<source ID="XMLIdWhitespace" FileName="TestSources/XMLIdWhitespace.xml" Creator="Frans Englich">
+<description last-mod="2008-05-27"/>
+</source>
+<source ID="XMLIDMany" FileName="TestSources/XMLIDMany.xml" Creator="Frans Englich">
+<description last-mod="2008-10-24"/>
+</source>
+<source ID="OneTopElement" FileName="TestSources/OneTopElement.xml" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01"/>
+</source>
+<source ID="namespace-sensitive" FileName="TestSources/namespace-sensitive.xml" schema="namespace-sensitive-schema" Creator="Oliver Hallam">
+<description last-mod="2007-02-26">Document containing namespace-sensitive constructs.</description>
+</source>
+<source ID="dm-e005" FileName="TestSources/dm-e005.xml" schema="dm-e005-schema" Creator="Norm Walsh">
+<description last-mod="2010-03-10">Document to test erratum DM.E05.</description>
+</source>
+<source ID="extendedTypes" FileName="TestSources/extendedTypes.xml" schema="extendedTypes-schema" Creator="Oliver Hallam">
+<description last-mod="2010-03-17">Document containing elements with various restricted and extended types.</description>
+</source>
+<source ID="mixed" FileName="TestSources/mixed.xml" schema="mixedcontent" Creator="Oliver Hallam">
+<description last-mod="2010-03-17">Document containing an element with mixed content but statically could have element only content.</description>
+</source>
+<schema ID="XQTSCatalogxsd" uri="http://www.w3.org/2005/02/query-test-XQTSCatalog" FileName="XQTSCatalog.xsd">
+<description last-mod="2005-04-14">Schema for XQTSCatalog</description>
+</schema>
+<schema ID="atomicxsd" uri="http://www.w3.org/XQueryTest" FileName="TestSources/atomic.xsd">
+<description last-mod="2005-03-08">A Schema for atomic.xml</description>
+</schema>
+<schema ID="orderDataxsd" uri="http://www.w3.org/XQueryTestOrderBy" FileName="TestSources/orderData.xsd">
+<description last-mod="2005-06-01">A Schema for orderData.xml</description>
+</schema>
+<schema ID="SpecialTypesXSD" uri="http://www.example.com/typedecl" FileName="TestSources/SpecialTypes.xsd">
+<description last-mod="2005-06-01">A Schema containing certain special types e.g. interleave types, union types, anySimpleType</description>
+</schema>
+<schema ID="QNameSourceXSD" uri="http://www.example.com/QNameXSD" FileName="TestSources/QName-schema.xsd">
+<description last-mod="2005-09-28">A schema containing QName and QName derived types</description>
+</schema>
+<schema ID="notationschema" uri="http://www.example.com/notation" FileName="TestSources/notationschema.xsd">
+<description last-mod="2005-10-10">A Schema for NOTATION data</description>
+</schema>
+<schema ID="idxsd" uri="http://www.w3.org/XQueryTest/ididrefs" FileName="TestSources/id.xsd">
+<description last-mod="2009-03-06">A schema for the id/idref functions tests</description>
+</schema>
+<schema ID="simplexsd" uri="http://www.w3.org/XQueryTest/simple" FileName="TestSources/simple.xsd">
+<description last-mod="2005-12-07">A schema for simple context tests</description>
+</schema>
+<schema ID="examplesxsd" uri="http://www.w3.org/XQueryTest/someExamples" FileName="TestSources/examples.xsd">
+<description last-mod="2006-05-19">A schema for examples.xml.</description>
+</schema>
+<schema ID="userdefined" uri="http://www.w3.org/XQueryTest/userDefinedTypes" FileName="TestSources/userdefined.xsd">
+<description last-mod="2006-04-03">A schema user defined types and constructor tests</description>
+</schema>
+<schema ID="listunion" uri="http://www.w3.org/XQueryTest/ListUnionTypes" FileName="TestSources/listunion.xsd">
+<description last-mod="2006-06-07">A schema defining a list of unions.</description>
+</schema>
+<schema ID="examples2xsd" uri="http://www.w3.org/XQueryTest/someExamples2" FileName="TestSources/examples2.xsd">
+<description last-mod="2009-10-01">Test schema for Errata XQ.E6.</description>
+</schema>
+<schema ID="attribute" uri="http://www.w3.org/XQueryTest/sample" FileName="TestSources/attribute.xsd">
+<description last-mod="2009-04-01">Test schema that contains an attribute declaration.</description>
+</schema>
+<schema ID="mixedcontent" uri="http://www.w3.org/XQueryTest/mixedcontent" FileName="TestSources/mixedcontent.xsd">
+<description last-mod="2009-04-01">Test schema that contains two complex types, one of them with a mixed content.</description>
+</schema>
+<schema ID="simpleContent" uri="http://www.w3.org/query-test/complexSimple" FileName="TestSources/simpleContent.xsd">
+<description last-mod="2009-11-20">Schema for complex types with
+         simple content</description>
+</schema>
+<schema ID="namespace-sensitive-schema" uri="http://www.example.com/test/namespace-sensitive" FileName="TestSources/namespace-sensitive.xsd">
+<description last-mod="2007-02-26">Schema illustrating various namespace-sensitive constructs.</description>
+</schema>
+<schema ID="dm-e005-schema" uri="http://www.example.com/ns/test" FileName="TestSources/dm-e005.xsd">
+<description last-mod="2010-03-10">Schema to test erratum DM.E05.</description>
+</schema>
+<schema ID="xq-e18-schema" uri="http://www.example.com/ns/test/xq-e18" FileName="TestSources/xq-e18.xsd">
+<description last-mod="2010-03-11">Schema to test erratum XQ.E18.</description>
+</schema>
+<schema ID="extendedTypes-schema" uri="http://www.example.com/XQueryTest/extendedTypes" FileName="TestSources/extendedTypes.xsd">
+<description last-mod="2010-03-17">Schema containing extended and restricted types.</description>
+</schema>
+<schema ID="constraints" uri="http://www.w3.org/constraints" FileName="TestSources/constraints.xsd">
+<description last-mod="2010-06-10">Schema with unique/id/idref constraints.</description>
+</schema>
+<collection ID="collection1" Creator="Andrew Eisenberg">
+<description last-mod="2006-06-07">A simple collection of documents.</description>
+<input-document>bib</input-document>
+<input-document>reviews</input-document>
+</collection>
+<collection ID="collection2" Creator="Andrew Eisenberg">
+<description last-mod="2006-06-07">A simple collection of documents.</description>
+<input-document>bib</input-document>
+<input-document>reviews</input-document>
+<input-document>books</input-document>
+</collection>
+<module ID="module1-lib" FileName="TestSources/module1-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-07-13">Library module for "modules-18" query</description>
+</module>
+<module ID="module2-lib" FileName="TestSources/module2-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-07-13">Library module for "modules-18" query</description>
+</module>
+<module ID="empty-lib" FileName="TestSources/empty-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module for "modules-none" query</description>
+</module>
+<module ID="emptyns-lib" FileName="TestSources/emptyns-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with empty namespace</description>
+</module>
+<module ID="test1-lib" FileName="TestSources/test1-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Simple library module</description>
+</module>
+<module ID="test2-lib" FileName="TestSources/test2-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-01-19">Library module with namespace URI set to empty string.</description>
+</module>
+<module ID="test1a-lib" FileName="TestSources/test1a-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Simple library module</description>
+</module>
+<module ID="test1collide1-lib" FileName="TestSources/test1collide1-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with colliding definitions</description>
+</module>
+<module ID="test1collide2-lib" FileName="TestSources/test1collide2-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with colliding definitions</description>
+</module>
+<module ID="test1c1-lib" FileName="TestSources/test1c1-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with circular includes</description>
+</module>
+<module ID="test2c1-lib" FileName="TestSources/test2c1-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with circular includes</description>
+</module>
+<module ID="context-lib" FileName="TestSources/context-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with interesting context</description>
+</module>
+<module ID="module-defs" FileName="TestSources/moduleDefs-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-01-06">Library module with definitions for various NIST tests.</description>
+</module>
+<module ID="modulewrongprefix-lib" FileName="TestSources/moduleDefs-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-03-21">Library module with invalid namespace prefix ("xml")</description>
+</module>
+<module ID="modulesdiffns" FileName="TestSources/modulesdiffns-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-04-11">Library module with variable on different namespace than target.</description>
+</module>
+<module ID="errata6-module1" FileName="TestSources/errata6-module1" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module2" FileName="TestSources/errata6-module2" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module4" FileName="TestSources/errata6-module4" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module5" FileName="TestSources/errata6-module5" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module6" FileName="TestSources/errata6-module6" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module7" FileName="TestSources/errata6-module7" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata8-module1a" FileName="TestSources/errata8-module1a" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a variable from it, testing circular dependencies.</description>
+</module>
+<module ID="errata8-module1b" FileName="TestSources/errata8-module1b" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a function from it, testing circular dependencies.</description>
+</module>
+<module ID="errata8-module2a" FileName="TestSources/errata8-module2a" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a variable from it, testing circular dependencies.</description>
+</module>
+<module ID="errata8-module2b" FileName="TestSources/errata8-module2b" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a function from it, testing circular dependencies.</description>
+</module>
+<module ID="errata8-module3a" FileName="TestSources/errata8-module3a" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a variable from it, testing circular dependencies pass case.</description>
+</module>
+<module ID="errata8-module3b" FileName="TestSources/errata8-module3b" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a function from it, testing circular dependencies pass case.</description>
+</module>
+<module ID="module3-lib" FileName="TestSources/module3-lib" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01">Module with simple and schema-element() types, used for functions'parameters and return results.</description>
+</module>
+<module ID="module4-lib" FileName="TestSources/module4-lib" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01">Module with schema-attribute() types, used for functions' parameters and return results.</description>
+</module>
+<module ID="modules-recursive1" FileName="TestSources/modules-recursive1" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01">Module with cyclic recursive imports.</description>
+</module>
+<module ID="modules-recursive2" FileName="TestSources/modules-recursive2" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01">Module with cyclic recursive imports.</description>
+</module>
+<module ID="module-pub-priv" FileName="TestSources/module-pub-priv" Creator="Michael Kay">
+<description last-mod="2009-10-01">Module that contains both private and public function declarations (XQuery 1.1).</description>
+</module>
+</sources>
+<implementation-defined-items>
+<implementation-defined-item name="expressionUnicode" spec="XQuery">
+<description last-mod="2005-04-04">The version of Unicode that is used to construct expressions.</description>
+</implementation-defined-item>
+<implementation-defined-item name="collations" spec="XQuery">
+<description last-mod="2005-04-04">The statically-known collations.</description>
+</implementation-defined-item>
+<implementation-defined-item name="implicitTimezone" spec="XQuery">
+<description last-mod="2005-04-04">The implicit timezone.</description>
+</implementation-defined-item>
+<implementation-defined-item name="warningsMethod" spec="XQuery">
+<description last-mod="2005-04-04">The circumstances in which warnings are raised, and the ways in which warnings are handled.</description>
+</implementation-defined-item>
+<implementation-defined-item name="errorsMethod" spec="XQuery">
+<description last-mod="2005-04-04">The method by which errors are reported to the external processing environment.</description>
+</implementation-defined-item>
+<implementation-defined-item name="XMLVersion" spec="XQuery">
+<description last-mod="2005-10-10">Whether the implementation is based on the rules of [XML 1.0] and [XML Names] or the rules of [XML 1.1] and [XML Names 1.1]. One of these sets of rules must be applied consistently by all aspects of the implementation.</description>
+</implementation-defined-item>
+<implementation-defined-item name="overwrittenContextComponents" spec="XQuery">
+<description last-mod="2005-04-04">Any components of the static context or dynamic context that are overwritten or augmented by the implementation.</description>
+</implementation-defined-item>
+<implementation-defined-item name="axes" spec="XQuery">
+<description last-mod="2005-04-04">Which of the optional axes are supported by the implementation, if the Full-Axis Feature is not supported.</description>
+</implementation-defined-item>
+<implementation-defined-item name="defaultOrderEmpty" spec="XQuery">
+<description last-mod="2005-04-04">The default handling of empty sequences returned by an ordering key (sortspec) in an order by clause (empty least or empty greatest).</description>
+</implementation-defined-item>
+<implementation-defined-item name="pragmas" spec="XQuery">
+<description last-mod="2005-04-04">The names and semantics of any extension expressions (pragmas) recognized by the implementation.</description>
+</implementation-defined-item>
+<implementation-defined-item name="optionDeclarations" spec="XQuery">
+<description last-mod="2005-04-04">The names and semantics of any option declarations recognized by the implementation.</description>
+</implementation-defined-item>
+<implementation-defined-item name="externalFunctionProtocols" spec="XQuery">
+<description last-mod="2005-04-04">Protocols (if any) by which parameters can be passed to an external function, and the result of the function can returned to the invoking query.</description>
+</implementation-defined-item>
+<implementation-defined-item name="moduleLocationHints" spec="XQuery">
+<description last-mod="2005-11-01">The process by which the specific modules to be imported by a module import are identified, if the Module Feature is supported (includes processing of location hints, if any.)</description>
+</implementation-defined-item>
+<implementation-defined-item name="staticTypingExtensions" spec="XQuery">
+<description last-mod="2005-04-04">Any static typing extensions supported by the implementation, if the Static Typing Feature is supported.</description>
+</implementation-defined-item>
+<implementation-defined-item name="serializationInvocation" spec="XQuery">
+<description last-mod="2005-04-04">The means by which serialization is invoked, if the Serialization Feature is supported.</description>
+</implementation-defined-item>
+<implementation-defined-item name="serializationDefaults" spec="XQuery">
+<description last-mod="2005-10-10">The default values for the byte-order-mark, encoding, media-type, normalization-form, omit-xml-declaration, standalone, and version parameters, if the Serialization Feature is supported.</description>
+</implementation-defined-item>
+<implementation-defined-item name="externalFunctionCall" spec="XQuery">
+<description last-mod="2006-08-09">The result of an unsuccessful call to an external function (for example, if the function implementation cannot be found or does not return a value of the declared type).</description>
+</implementation-defined-item>
+<implementation-defined-item name="limits" spec="XQuery">
+<description last-mod="2005-11-01">Limits on ranges of values for various data types, as enumerated in 5.3 Data Model Conformance.</description>
+</implementation-defined-item>
+<implementation-defined-item name="traceDestination" spec="FuncOps">
+<description last-mod="2005-10-10">The destination of the trace output is implementation-defined. See 4 The Trace Function.</description>
+</implementation-defined-item>
+<implementation-defined-item name="integerOperations" spec="FuncOps">
+<description last-mod="2005-10-10">For xs:integer operations, implementations that support limited-precision integer operations must either raise an error [err:FOAR0002] or provide an implementation-defined mechanism that allows users to choose between raising an error and returning a result that is modulo the largest representable integer value. See 6.2 Operators on Numeric Values.</description>
+</implementation-defined-item>
+<implementation-defined-item name="decimalDigits" spec="FuncOps">
+<description last-mod="2005-11-01">For xs:decimal values the number of digits of precision returned by the numeric operators is implementation-defined. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer.</description>
+</implementation-defined-item>
+<implementation-defined-item name="roundOrTruncate" spec="FuncOps">
+<description last-mod="2005-10-10">If the number of digits in the result exceeds the number of digits that the implementation supports, the result is truncated or rounded in an implementation-defined manner. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer.</description>
+</implementation-defined-item>
+<implementation-defined-item name="Unicode" spec="FuncOps">
+<description last-mod="2005-11-01">It is implementation-defined which version of Unicode is supported by the features defined in this specification, but it is recommended that the most recent version of Unicode be used. See 7.1 String Types.</description>
+</implementation-defined-item>
+<implementation-defined-item name="normalizationForms" spec="FuncOps">
+<description last-mod="2005-10-10">For 7.4.6 fn:normalize-unicode, conforming implementations must support normalization form "NFC" and may support normalization forms "NFD", "NFKC", "NFKD", "FULLY-NORMALIZED". They may also support other normalization forms with implementation-defined semantics.</description>
+</implementation-defined-item>
+<implementation-defined-item name="collationUnits" spec="FuncOps">
+<description last-mod="2005-10-10">The ability to decompose strings into collation units suitable for substring matching is an implementation-defined property of a collation. See 7.5 Functions Based on Substring Matching.</description>
+</implementation-defined-item>
+<implementation-defined-item name="secondsDigits" spec="FuncOps">
+<description last-mod="2005-10-10">All minimally conforming processors must support year values with a minimum of 4 digits (i.e., YYYY) and a minimum fractional second precision of 1 millisecond or three digits (i.e., s.sss). However, conforming processors may set larger implementation-defined limits on the maximum number of digits they support in these two situations. See 10.1.1 Limits and Precision.</description>
+</implementation-defined-item>
+<implementation-defined-item name="stringToDecimal" spec="FuncOps">
+<description last-mod="2006-08-09">The result of casting a string to xs:decimal, when the resulting value is not too large or too small but nevertheless has too many decimal digits to be accurately represented, is implementation-defined. See 17.1.1 Casting from xs:string and xs:untypedAtomic.</description>
+</implementation-defined-item>
+<implementation-defined-item name="docProcessing" spec="FuncOps">
+<description last-mod="2005-10-10">Various aspects of the processing provided by 15.5.4 fn:doc are implementation-defined. Implementations may provide external configuration options that allow any aspect of the processing to be controlled by the user.</description>
+</implementation-defined-item>
+<implementation-defined-item name="weakenStable" spec="FuncOps">
+<description last-mod="2006-08-09">The manner in which implementations provide options to weaken the stable characteristic of 15.5.6 fn:collection and 15.5.4 fn:doc are implementation-defined.</description>
+</implementation-defined-item>
+<implementation-defined-item name="additionalTypes" spec="DataModel">
+<description last-mod="2005-04-04">Support for additional user-defined or implementation-defined types is implementation-defined. (See 2.6.1 Representation of Types)</description>
+</implementation-defined-item>
+<implementation-defined-item name="undefinedProperties" spec="DataModel">
+<description last-mod="2005-04-04">Some typed values in the data model are undefined. Attempting to access an undefined property is always an error. Behavior in these cases is implementation-defined and the host language is responsible for determining the result. (See 5 Accessors)</description>
+</implementation-defined-item>
+<implementation-defined-item name="sequenceNormalization" spec="Serialization">
+<description last-mod="2005-04-04">For any implementation-defined output method, it is implementation-defined whether sequence normalization process takes place. (See 2 Sequence Normalization)</description>
+</implementation-defined-item>
+<implementation-defined-item name="outputMethods" spec="Serialization">
+<description last-mod="2005-04-04">If the namespace URI is non-null for the method serialization parameter, then the parameter specifies an implementation-defined output method. (See 3 Serialization Parameters)</description>
+</implementation-defined-item>
+<implementation-defined-item name="normalizationFormBehavior" spec="Serialization">
+<description last-mod="2005-04-04">If the value of the normalization-form form parameter is not NFC, NFD, NFKC, NFKD, fully-normalized, or none then the meaning of the value and it's effect is implementation-defined. (See 4 Phases of Serialization)</description>
+</implementation-defined-item>
+<implementation-defined-item name="additionalParams" spec="Serialization">
+<description last-mod="2005-11-01">The effect of additional serialization parameters on the output of the serializer, where the name of such a parameter must be namespace-qualified, is implementation-defined or implementation-dependent. The extent of this effect on the output must not override the provisions of this specification. (See 3 Serialization Parameters)</description>
+</implementation-defined-item>
+<implementation-defined-item name="encodingPhase" spec="Serialization">
+<description last-mod="2005-04-04">The effect of providing an option that allows the encoding phase to be skipped, so that the result of serialization is a stream of Unicode characters, is implementation-defined. The serializer is not required to support such an option. (See 4 Phases of Serialization)</description>
+</implementation-defined-item>
+<implementation-defined-item name="CDATASerialization" spec="Serialization">
+<description last-mod="2005-04-04">An serializer may provide an implementation-defined mechanism to place CDATA sections in the result tree. (See 5.1.4 XML Output Method: the cdata-section-elements Parameter)</description>
+</implementation-defined-item>
+</implementation-defined-items>
+<features>
+<feature name="Minimal Conformance"/>
+<feature name="Schema Import"/>
+<feature name="Schema Validation"/>
+<feature name="Static Typing"/>
+<feature name="Static Typing Extensions"/>
+<feature name="Full Axis"/>
+<feature name="Module"/>
+<feature name="Serialization"/>
+</features>
+<context-properties>
+<context-property name="Statically known namespaces" context-type="static"/>
+<context-property name="Default element/type namespace" context-type="static"/>
+<context-property name="Default function namespace" context-type="static"/>
+<context-property name="In-scope schema types" context-type="static"/>
+<context-property name="In-scope element declarations" context-type="static"/>
+<context-property name="In-scope attribute declarations" context-type="static"/>
+<context-property name="In-scope variables" context-type="static"/>
+<context-property name="Context item static type" context-type="static"/>
+<context-property name="Function signatures" context-type="static"/>
+<context-property name="Statically known collations" context-type="static"/>
+<context-property name="Default collation" context-type="static"/>
+<context-property name="Construction mode" context-type="static"/>
+<context-property name="Ordering mode" context-type="static"/>
+<context-property name="Default order for empty sequences" context-type="static"/>
+<context-property name="Boundary-space policy" context-type="static"/>
+<context-property name="Copy-namespaces mode" context-type="static"/>
+<context-property name="Base URI" context-type="static"/>
+<context-property name="Statically known documents" context-type="static"/>
+<context-property name="Statically known collections" context-type="static"/>
+<context-property name="Statically known default collection type" context-type="static"/>
+<context-property name="Context item" context-type="dynamic"/>
+<context-property name="Context position" context-type="dynamic"/>
+<context-property name="Context size" context-type="dynamic"/>
+<context-property name="Variable values" context-type="dynamic"/>
+<context-property name="Function implementations" context-type="dynamic"/>
+<context-property name="Current dateTime" context-type="dynamic"/>
+<context-property name="Implicit timezone" context-type="dynamic"/>
+<context-property name="Available documents" context-type="dynamic"/>
+<context-property name="Available collections" context-type="dynamic"/>
+<context-property name="Default collection" context-type="dynamic"/>
+</context-properties>
+<xqts:test-group xmlns:xqts="http://www.w3.org/2005/02/query-test-XQTSCatalog" xmlns:atom="http://www.w3.org/2005/Atom" name="MinimalConformance">
+<xqts:GroupInfo>
+<xqts:title>Minimal Conformance</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+</xqts:test-group>
+<xqts:test-group xmlns:xqts="http://www.w3.org/2005/02/query-test-XQTSCatalog" xmlns:atom="http://www.w3.org/2005/Atom" name="XQuery2ed">
+<xqts:GroupInfo>
+<xqts:title>Optional Features</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<xqts:test-group name="DM.E002">
+<xqts:GroupInfo>
+<xqts:title>DM.E002</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<test-case is-XPath2="false" Creator="Mary Holstege" name="validate-sc-1" FilePath="SchemaValidation/ValidateExpression/" scenario="standard">
+<description>Test validation of elements of simple content</description>
+<spec-citation spec="DataModel" section-number="3.3.1.2" section-title="Typed Value Determination" section-pointer="TypedValueDetermination"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4413</reflects-resolution>
+<query name="validateexpr-sc-1" date="2009-11-20"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<!-- role=schema forbidden by DTD, but this is the schema to use:
+     <input-file role="schema" variable="dummy">simpleContent</input-file> -->
+<output-file role="principal" compare="Fragment">validateexpr-sc-1.txt</output-file>
+</test-case>
+<test-case is-XPath2="false" Creator="Mary Holstege" name="validateexpr-sc-2" FilePath="SchemaValidation/ValidateExpression/" scenario="standard">
+<description>Test validation of elements of simple content</description>
+<spec-citation spec="DataModel" section-number="3.3.1.2" section-title="Typed Value Determination" section-pointer="TypedValueDetermination"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4413</reflects-resolution>
+<query name="validateexpr-sc-2" date="2009-11-20"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<!-- role=schema forbidden by DTD, but this is the schema to use:
+     <input-file role="schema" variable="dummy">simpleContent</input-file> -->
+<output-file role="principal" compare="Fragment">validateexpr-sc-2.txt</output-file>
+</test-case>
+<test-case is-XPath2="false" Creator="Mary Holstege" name="validateexpr-sc-4" FilePath="SchemaValidation/ValidateExpression/" scenario="standard">
+<description>Test validation of elements of simple content</description>
+<spec-citation spec="DataModel" section-number="3.3.1.2" section-title="Typed Value Determination" section-pointer="TypedValueDetermination"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4413</reflects-resolution>
+<query name="validateexpr-sc-4" date="2009-11-20"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<!-- role=schema forbidden by DTD, but this is the schema to use:
+     <input-file role="schema" variable="dummy">simpleContent</input-file> -->
+<output-file role="principal" compare="Fragment">validateexpr-sc-4.txt</output-file>
+</test-case>
+<test-case is-XPath2="false" Creator="Mary Holstege" name="validateexpr-sc-5" FilePath="SchemaValidation/ValidateExpression/" scenario="standard">
+<description>Test validation of elements of simple content</description>
+<spec-citation spec="DataModel" section-number="3.3.1.2" section-title="Typed Value Determination" section-pointer="TypedValueDetermination"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4413</reflects-resolution>
+<query name="validateexpr-sc-5" date="2009-11-20"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<!-- role=schema forbidden by DTD, but this is the schema to use:
+     <input-file role="schema" variable="dummy">simpleContent</input-file> -->
+<output-file role="principal" compare="Fragment">validateexpr-sc-5.txt</output-file>
+</test-case>
+<test-case is-XPath2="false" Creator="Mary Holstege" name="validateexpr-sc-6" FilePath="SchemaValidation/ValidateExpression/" scenario="standard">
+<description>Test validation of elements of simple content</description>
+<spec-citation spec="DataModel" section-number="3.3.1.2" section-title="Typed Value Determination" section-pointer="TypedValueDetermination"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4413</reflects-resolution>
+<query name="validateexpr-sc-6" date="2009-11-20"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<!-- role=schema forbidden by DTD, but this is the schema to use:
+     <input-file role="schema" variable="dummy">simpleContent</input-file> -->
+<output-file role="principal" compare="Fragment">validateexpr-sc-6.txt</output-file>
+</test-case>
+<test-case is-XPath2="false" Creator="Mary Holstege" name="validateexpr-sc-7" FilePath="SchemaValidation/ValidateExpression/" scenario="standard">
+<description>Test validation of elements of simple content</description>
+<spec-citation spec="DataModel" section-number="3.3.1.2" section-title="Typed Value Determination" section-pointer="TypedValueDetermination"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4413</reflects-resolution>
+<query name="validateexpr-sc-7" date="2009-11-20"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<!-- role=schema forbidden by DTD, but this is the schema to use:
+     <input-file role="schema" variable="dummy">simpleContent</input-file> -->
+<output-file role="principal" compare="Fragment">validateexpr-sc-7.txt</output-file>
+</test-case>
+<test-case is-XPath2="false" Creator="Mary Holstege" name="validateexpr-sc-8" FilePath="SchemaValidation/ValidateExpression/" scenario="standard">
+<description>Test validation of elements of simple content</description>
+<spec-citation spec="DataModel" section-number="3.3.1.2" section-title="Typed Value Determination" section-pointer="TypedValueDetermination"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4413</reflects-resolution>
+<query name="validateexpr-sc-8" date="2009-11-20"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<!-- role=schema forbidden by DTD, but this is the schema to use:
+     <input-file role="schema" variable="dummy">simpleContent</input-file> -->
+<output-file role="principal" compare="Fragment">validateexpr-sc-8.txt</output-file>
+</test-case>
+<test-case is-XPath2="false" Creator="Mary Holstege" name="validateexpr-sc-9" FilePath="SchemaValidation/ValidateExpression/" scenario="standard">
+<description>Test validation of elements of simple content</description>
+<spec-citation spec="DataModel" section-number="3.3.1.2" section-title="Typed Value Determination" section-pointer="TypedValueDetermination"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4413</reflects-resolution>
+<query name="validateexpr-sc-9" date="2009-11-20"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<!-- role=schema forbidden by DTD, but this is the schema to use:
+     <input-file role="schema" variable="dummy">simpleContent</input-file> -->
+<output-file role="principal" compare="Fragment">validateexpr-sc-9.txt</output-file>
+</test-case>
+</xqts:test-group>
+<xqts:test-group name="DM.E005">
+<xqts:GroupInfo>
+<xqts:title>DM.E005</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<test-case is-XPath2="false" name="validateexpr-27" FilePath="SchemaValidation/ValidateExpression/" scenario="standard" Creator="Norm Walsh">
+<description>Test Bug 4519, [DM] Definition of is-id property</description>
+<spec-citation spec="XQuery" section-number="3.13" section-title="Validate Expressions" section-pointer="id-validate"/>
+<spec-citation spec="DataModel" section-number="6.3.4" section-title="Construction from a PSVI" section-pointer="const-psvi-attribute"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4519</reflects-resolution>
+<query name="validateexpr-27" date="2010-03-10"/>
+<input-file role="principal-data" variable="input-context">dm-e005</input-file>
+<output-file role="principal" compare="XML">validateexpr-27.xml</output-file>
+</test-case>
+</xqts:test-group>
+<xqts:test-group name="FO.E1">
+<xqts:GroupInfo>
+<xqts:title>FO.E1</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<test-case is-XPath2="true" name="fn-resolve-uri-24" FilePath="Functions/URIFunc/ResolveURIFunc/" scenario="runtime-error" Creator="Michael Kay">
+<description>Evaluation of "fn:resolve-uri" function with second argument ($base) being a relative URI. See erratum FO.E1</description>
+<spec-citation spec="FuncOps" section-number="8.1" section-title="fn:resolve-uri" section-pointer="func-resolve-uri"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4373</reflects-resolution>
+<query name="fn-resolve-uri-24" date="2010-01-04"/>
+<expected-error>FORG0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" name="fn-resolve-uri-25" FilePath="Functions/URIFunc/ResolveURIFunc/" scenario="standard" Creator="Michael Kay">
+<description>Evaluation of "fn:resolve-uri" function with first argument ($relative) being an absolute URI and
+                   second argument ($base) being a relative URI. See erratum FO.E1</description>
+<spec-citation spec="FuncOps" section-number="8.1" section-title="fn:resolve-uri" section-pointer="func-resolve-uri"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4373</reflects-resolution>
+<query name="fn-resolve-uri-25" date="2010-01-04"/>
+<output-file role="principal" compare="Text">fn-resolve-uri-25.txt</output-file>
+</test-case>
+</xqts:test-group>
+<xqts:test-group name="FO.E4">
+<xqts:GroupInfo>
+<xqts:title>FO.E4</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-11" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-MatchesFunc-11" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-12" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#2).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-MatchesFunc-12" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-13" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#3).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-MatchesFunc-13" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-14" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#3).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-MatchesFunc-14" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-4" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-ReplaceFunc-4" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-5" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#2).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-ReplaceFunc-5" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-6" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#3).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-ReplaceFunc-6" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-7" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#3).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-ReplaceFunc-7" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-8" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Since no string is captured by the back-reference, the single character is matched.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
+<query name="K2-MatchesFunc-8" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-9" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Since no string is captured by the back-reference, the single character is matched(#2).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
+<query name="K2-MatchesFunc-9" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-10" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>A non-matching backwards-reference matches the empty string.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
+<query name="K2-MatchesFunc-10" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-3" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference that isn't preceeded by sufficiently many captures, and therefore match the empty sequence.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
+<query name="K2-ReplaceFunc-3" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+</xqts:test-group>
+<xqts:test-group name="FO.E6">
+<xqts:GroupInfo>
+<xqts:title>FO.E6</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K-SeqExprCast-232" FilePath="Expressions/exprSeqTypes/SeqExprCast/" scenario="standard">
+<description>Ensure casting xs:gYear to xs:string, with timezone '+00:00' is properly handled.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4471</reflects-resolution>
+<query name="K-SeqExprCast-232" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">K-SeqExprCast-232.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K-SeqExprCast-254" FilePath="Expressions/exprSeqTypes/SeqExprCast/" scenario="standard">
+<description>Ensure casting xs:gDay to xs:string, with timezone '+00:00' is properly handled.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4471</reflects-resolution>
+<query name="K-SeqExprCast-254" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">K-SeqExprCast-254.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K-SeqExprCast-269" FilePath="Expressions/exprSeqTypes/SeqExprCast/" scenario="standard">
+<description>Ensure casting xs:gMonth to xs:string, with timezone '+00:00' is properly handled.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4471</reflects-resolution>
+<query name="K-SeqExprCast-269" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">K-SeqExprCast-269.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K-SeqExprCast-284" FilePath="Expressions/exprSeqTypes/SeqExprCast/" scenario="standard">
+<description>Ensure casting xs:gYearMonth to xs:string, with timezone '+00:00' is properly handled.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4471</reflects-resolution>
+<query name="K-SeqExprCast-284" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">K-SeqExprCast-284.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K-SeqExprCast-305" FilePath="Expressions/exprSeqTypes/SeqExprCast/" scenario="standard">
+<description>Ensure casting xs:gMonthDay to xs:string, with timezone '+00:00' is properly handled.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4471</reflects-resolution>
+<query name="K-SeqExprCast-305" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">K-SeqExprCast-305.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K-SeqExprCast-341" FilePath="Expressions/exprSeqTypes/SeqExprCast/" scenario="standard">
+<description>Ensure casting xs:dateTime to xs:string, with timezone '+00:00' is properly handled.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4471</reflects-resolution>
+<query name="K-SeqExprCast-341" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">K-SeqExprCast-341.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K-SeqExprCast-366" FilePath="Expressions/exprSeqTypes/SeqExprCast/" scenario="standard">
+<description>Ensure casting xs:time to xs:string, with timezone '+00:00' is properly handled.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4471</reflects-resolution>
+<query name="K-SeqExprCast-366" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">K-SeqExprCast-366.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K-SeqExprCast-402" FilePath="Expressions/exprSeqTypes/SeqExprCast/" scenario="standard">
+<description>Ensure casting xs:date to xs:string, with timezone '+00:00' is properly handled.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4471</reflects-resolution>
+<query name="K-SeqExprCast-402" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">K-SeqExprCast-402.txt</output-file>
+</test-case>
+</xqts:test-group>
+<xqts:test-group name="FO.E7">
+<xqts:GroupInfo>
+<xqts:title>FO.E7</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<test-case is-XPath2="true" name="fn-matches-26" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Andrew Eisenberg">
+<description>Check for the correct behavior of ^ and $ in multi-line mode</description>
+<spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
+<query name="fn-matches-26" date="2006-09-25"/>
+<input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+<output-file role="principal" compare="Text">fn-matches-26.txt</output-file>
+</test-case>
+<test-case is-XPath2="false" name="fn-matches-27" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Andrew Eisenberg">
+<description>Check for the correct behavior of ^ and $ in multi-line mode</description>
+<spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
+<query name="fn-matches-27" date="2006-09-25"/>
+<input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+<output-file role="principal" compare="Text">fn-matches-27.txt</output-file>
+</test-case>
+<test-case is-XPath2="false" name="fn-matches-28" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Andrew Eisenberg">
+<description>Check for the correct behavior of ^ and $ in multi-line mode</description>
+<spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
+<query name="fn-matches-28" date="2006-09-25"/>
+<input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+<output-file role="principal" compare="Text">fn-matches-28.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" name="fn-matches-29" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay">
+<description>Two digits not treated as back-reference</description>
+<spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
+<query name="fn-matches-29" date="2009-03-05"/>
+<input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+<output-file role="principal" compare="Text">fn-matches-29.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" name="fn-matches-30" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Michael Kay">
+<description>Two digits treated as back-reference</description>
+<spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4543</reflects-resolution>
+<query name="fn-matches-30" date="2009-03-05"/>
+<input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+<output-file role="principal" compare="Text">fn-matches-30.txt</output-file>
+</test-case>
+</xqts:test-group>
+<xqts:test-group name="FO.E12">
+<xqts:GroupInfo>
+<xqts:title>FO.E12</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<test-case is-XPath2="true" name="op-multiply-yearMonthDuration-1" FilePath="Expressions/Operators/ArithExpr/DurationArith/YearMonthDurationMultiply/" scenario="standard" Creator="Carmelo Montanez">
+<description>Evaluates the "op:multiply-yearMonthDuration" operator as per example 1 (for this function) of the Functions and Operators spec.</description>
+<spec-citation spec="FuncOps" section-number="10.6.3" section-title="op:multiply-yearMonthDuration" section-pointer="func-multiply-yearMonthDuration"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4621</reflects-resolution>
+<query name="op-multiply-yearMonthDuration-1" date="2005-06-29"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">op-multiply-yearMonthDuration-1.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" name="op-multiply-yearMonthDuration-20" FilePath="Expressions/Operators/ArithExpr/DurationArith/YearMonthDurationMultiply/" scenario="standard" Creator="Michael Kay, Saxonica">
+<description>Tests rounding of the result of the "op:multiply-yearMonthDuration" operator. See erratum E12.</description>
+<spec-citation spec="FuncOps" section-number="10.6.3" section-title="op:multiply-yearMonthDuration" section-pointer="func-multiply-yearMonthDuration"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4621</reflects-resolution>
+<query name="op-multiply-yearMonthDuration-20" date="2009-03-05"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">op-multiply-yearMonthDuration-20.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" name="op-divide-yearMonthDuration-17" FilePath="Expressions/Operators/ArithExpr/DurationArith/YearMonthDurationDivide/" scenario="standard" Creator="Michael Kay">
+<description>Tests rounding behaviour for the "op:divide-yearMonthDuration" function, see erratum FO.E12.</description>
+<spec-citation spec="FuncOps" section-number="10.6.4" section-title="op:divide-yearMonthDuration" section-pointer="func-divide-yearMonthDuration"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4621</reflects-resolution>
+<query name="op-divide-yearMonthDuration-17" date="2009-03-05"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<output-file role="principal" compare="Text">op-divide-yearMonthDuration-17.txt</output-file>
+</test-case>
+</xqts:test-group>
+<xqts:test-group name="FO.E13">
+<xqts:GroupInfo>
+<xqts:title>FO.E13</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<test-case is-XPath2="false" name="validateexpr-27" FilePath="SchemaValidation/ValidateExpression/" scenario="standard" Creator="Norm Walsh">
+<description>Test Bug 4519, [DM] Definition of is-id property</description>
+<spec-citation spec="XQuery" section-number="3.13" section-title="Validate Expressions" section-pointer="id-validate"/>
+<spec-citation spec="DataModel" section-number="6.3.4" section-title="Construction from a PSVI" section-pointer="const-psvi-attribute"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4519</reflects-resolution>
+<query name="validateexpr-27" date="2010-03-10"/>
+<input-file role="principal-data" variable="input-context">dm-e005</input-file>
+<output-file role="principal" compare="XML">validateexpr-27.xml</output-file>
+</test-case>
+</xqts:test-group>
+<xqts:test-group name="FO.E24">
+<xqts:GroupInfo>
+<xqts:title>FO.E24</xqts:title>
+<xqts:description/>
+</xqts:GroupInfo>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-11" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-MatchesFunc-11" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-12" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#2).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-MatchesFunc-12" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-13" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#3).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-MatchesFunc-13" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-14" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#3).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-MatchesFunc-14" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-4" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-ReplaceFunc-4" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-5" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#2).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-ReplaceFunc-5" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-6" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#3).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-ReplaceFunc-6" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-7" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference inside a character class(#3).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4106</reflects-resolution>
+<query name="K2-ReplaceFunc-7" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-8" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Since no string is captured by the back-reference, the single character is matched.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
+<query name="K2-MatchesFunc-8" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-9" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>Since no string is captured by the back-reference, the single character is matched(#2).</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
+<query name="K2-MatchesFunc-9" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-MatchesFunc-10" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error">
+<description>A non-matching backwards-reference matches the empty string.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
+<query name="K2-MatchesFunc-10" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" Creator="Frans Englich" name="K2-ReplaceFunc-3" FilePath="Functions/AllStringFunc/MatchStringFunc/ReplaceFunc/" scenario="runtime-error">
+<description>Use a back reference that isn't preceeded by sufficiently many captures, and therefore match the empty sequence.</description>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=4634</reflects-resolution>
+<query name="K2-ReplaceFunc-3" date="2007-11-26+01:00"/>
+<input-file role="principal-data" variable="input-context">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" name="fn-matches-35" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Zhen Hua  Liu">
+<description>Test for bug fix of 5348 in Errata for FO</description>
+<spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=5348</reflects-resolution>
+<query name="fn-matches-35" date="2009-11-15"/>
+<input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+<expected-error>FORX0002</expected-error>
+</test-case>
+<test-case is-XPath2="true" name="fn-matches-36" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="standard" Creator="Zhen Hua  Liu">
+<description>Test for bug fix of 5348 in Errata for FO</description>
+<spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=5348</reflects-resolution>
+<query name="fn-matches-36" date="2009-11-15"/>
+<input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+<output-file role="principal" compare="Text">fn-matches-36.txt</output-file>
+</test-case>
+<test-case is-XPath2="true" name="fn-matches-37" FilePath="Functions/AllStringFunc/MatchStringFunc/MatchesFunc/" scenario="runtime-error" Creator="Zhen Hua  Liu">
+<description>Test for bug fix of 5348 in Errata for FO</description>
+<spec-citation spec="FuncOps" section-number="7.6.2" section-title="fn:matches" section-pointer="func-matches"/>
+<reflects-resolution>http://www.w3.org/Bugs/Public/show_bug.cgi?id=5348</ref

<TRUNCATED>

[12/50] [abbrv] git commit: Removed extra space.

Posted by pr...@apache.org.
Removed extra space.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/f8049b76
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/f8049b76
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/f8049b76

Branch: refs/heads/prestonc/hash_join
Commit: f8049b76ac03f90be1a18f3e828b6d75c05801ea
Parents: d61f5bd
Author: Preston Carman <pr...@apache.org>
Authored: Wed Mar 12 16:21:57 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py  | 1 -
 1 file changed, 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f8049b76/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py
index 801e748..6d3bd9c 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py
@@ -93,4 +93,3 @@ INVENTORY_FIELDS.append(['LONGITUDE', 22, 30, 'Real'])
 INVENTORY_FIELDS.append(['ELEMENT', 32, 35, 'Character'])
 INVENTORY_FIELDS.append(['FIRSTYEAR', 37, 40, 'Integer'])
 INVENTORY_FIELDS.append(['LASTYEAR', 42, 45, 'Integer'])
-


[11/50] [abbrv] git commit: Added logging to the benchmark script and a new join query.

Posted by pr...@apache.org.
Added logging to the benchmark script and a new join query.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/75d60770
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/75d60770
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/75d60770

Branch: refs/heads/prestonc/hash_join
Commit: 75d60770ba1d0302c86058d165260c4bcbf8f4bd
Parents: 65c05e0
Author: Preston Carman <pr...@apache.org>
Authored: Thu Mar 13 23:06:48 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../main/resources/noaa-ghcn-daily/queries/q07.xq    | 15 +++++++++++++++
 .../noaa-ghcn-daily/scripts/run_benchmark.sh         |  7 +++++--
 .../rewriter/rules/InlineNestedVariablesRule.java    |  4 ++--
 3 files changed, 22 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/75d60770/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
new file mode 100644
index 0000000..412285c
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
@@ -0,0 +1,15 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) for each station 2001.         :)
+let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+for $s in collection($station_collection)/stationCollection/stations
+
+return fn:min(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
+    where $s/id eq $r/station
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-date($date) eq 2001
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/75d60770/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
index 8417660..bbfe35d 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
@@ -32,12 +32,15 @@ then
     exit
 fi
 
-for j in $(find ${1} -name '*.xq')
+for j in $(find ${1} -name '*q??.xq')
 do
 	if [ -z "${3}" ] || [[ "${j}" =~ "${3}" ]] 
 	then
 		echo "Running query: ${j}"
-		time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -frame-size 1000000 -repeatexec 10 > ${j}.log 2>&1
+		log_file="$(basename ${j}).$(date +%Y%m%d).log"
+		log_base_path=$(dirname ${j/queries/query_logs})
+		mkdir -p ${log_base_path}
+		time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -frame-size 1000000 -repeatexec 10 > ${log_base_path}/${log_file} 2>&1
 	fi;
 done
 

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/75d60770/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/InlineNestedVariablesRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/InlineNestedVariablesRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/InlineNestedVariablesRule.java
index 8cd86f8..c0c082f 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/InlineNestedVariablesRule.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/InlineNestedVariablesRule.java
@@ -62,7 +62,7 @@ public class InlineNestedVariablesRule extends InlineVariablesRule {
         }
 
         boolean modified = false;
-        // Descend into nested plans removing projects on the way.
+        // Descend into nested plans inlining along the way.
         if (op.hasNestedPlans()) {
             AbstractOperatorWithNestedPlans nestedOp = (AbstractOperatorWithNestedPlans) op;
             for (ILogicalPlan nestedPlan : nestedOp.getNestedPlans()) {
@@ -74,7 +74,7 @@ public class InlineNestedVariablesRule extends InlineVariablesRule {
             }
         }
 
-        // Descend into children removing projects on the way.
+        // Descend into children inlining along on the way.
         for (Mutable<ILogicalOperator> inputOpRef : op.getInputs()) {
             if (inlineVariables(inputOpRef, context)) {
                 modified = true;


[16/50] [abbrv] git commit: Benchmark scripts simplification and update.

Posted by pr...@apache.org.
Benchmark scripts simplification and update.

* Removed compression.
* Added a print out of the partition scheme.
* Added new queries to the list.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/491e5917
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/491e5917
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/491e5917

Branch: refs/heads/prestonc/hash_join
Commit: 491e5917847c4d0dd9041bcf71b8b6712faab067
Parents: 73875c6
Author: Preston Carman <pr...@apache.org>
Authored: Thu Mar 13 23:15:10 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../scripts/weather_benchmark.py                | 105 ++++++++++++++-----
 .../noaa-ghcn-daily/scripts/weather_cli.py      |  21 ++--
 .../scripts/weather_convert_to_xml.py           |  11 +-
 .../scripts/weather_data_files.py               |  17 ++-
 4 files changed, 108 insertions(+), 46 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/491e5917/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index 66f85d6..0500de3 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -34,7 +34,8 @@ class WeatherBenchmark:
 
     QUERY_REPLACEMENT_KEY = "/tmp/1.0_partition_ghcnd_all_xml/"
     QUERY_MASTER_FOLDER = "../queries/"
-    QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq", "q04.xq", "q05.xq"] 
+    QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq", "q04.xq", "q05.xq", "q06.xq"] 
+    QUERY_UTILITY_LIST = ["sensor_count.xq", "station_count.xq", "q04_sensor.xq", "q04_station.xq", "q05_sensor.xq", "q05_station.xq", "q06_sensor.xq"] 
     BENCHMARK_LOCAL_TESTS = ["local_speed_up", "local_batch_scale_out"] 
     BENCHMARK_CLUSTER_TESTS = ["speed_up", "batch_scale_out"] 
     QUERY_COLLECTIONS = ["sensors", "stations"]
@@ -47,40 +48,73 @@ class WeatherBenchmark:
         self.dataset = dataset
         self.nodes = nodes
         
-    def build_data_links(self, xml_save_path):
+    def print_partition_scheme(self, xml_save_path):
         if (len(self.base_paths) == 0):
             return
         for test in self.dataset.get_tests():
             if test in self.BENCHMARK_LOCAL_TESTS:
-                self.build_local_data_links(test, xml_save_path)
+                self.print_local_partition_schemes(test, xml_save_path)
             elif test in self.BENCHMARK_CLUSTER_TESTS:
-                self.build_cluster_data_links(test, xml_save_path)
+                self.print_cluster_partition_schemes(test, xml_save_path)
             else:
                 print "Unknown test."
                 exit()
             
-    def build_local_data_links(self, test, xml_save_path):
-        virtual_partitions = get_local_virtual_partitions(self.partitions)
-        data_paths = get_partition_paths(virtual_partitions, self.base_paths)
+    def print_local_partition_schemes(self, test, xml_save_path):
         for i in self.partitions:
-            link_base_paths = get_partition_paths(i, self.base_paths, "data_links/" + test)
-            # Match link paths to real data paths.
-            offset = 0
-            group_size = len(data_paths) / len(link_base_paths)
-            for link_index, link_path in enumerate(link_base_paths):
-                if os.path.isdir(link_path):
-                    shutil.rmtree(link_path)
-                for data_index, data_path in enumerate(data_paths):
-                    if offset <= data_index and data_index < offset + group_size:
-                        self.add_collection_links_for(data_path, link_path, data_index)
-                offset += group_size
+            scheme = self.get_local_partition_scheme(test, xml_save_path, i)
+            virtual_partitions = get_local_virtual_partitions(self.partitions)
+            self.print_partition_schemes(virtual_partitions, scheme, test, i)
+        
+    def print_cluster_partition_schemes(self, test, xml_save_path):
+        scheme = self.get_cluster_partition_scheme(test, xml_save_path)
+        virtual_partitions = get_cluster_virtual_partitions(self.nodes, self.partitions)
+        self.print_partition_schemes(virtual_partitions, scheme, test, 0)
+        
+    def print_partition_schemes(self, virtual_partitions, scheme, test, partitions):
+        print
+        print "---------------- Partition Scheme --------------------"
+        print "    Test: " + test
+        print "    Virtual Partitions: " + str(virtual_partitions)
+        print "    Disks: " + str(len(self.base_paths))
+        print "    Partitions: " + str(partitions)
+        
+        if len(scheme) > 0:
+            folder_length = len(scheme[0][3]) + 5
+            row_format = "{:>5} {:>5} {:<" + str(folder_length) + "} {:<" + str(folder_length) + "}"
+            HEADER = ("Index", "Link", "Data Path", "Link Path")
+            print row_format.format(*HEADER)
+            for row in scheme:
+                print row_format.format(*row)
+            print
+        else:
+            print "    Scheme is EMPTY."
+
+    def get_local_partition_scheme(self, test, xml_save_path, partition):
+        scheme = []
+        virtual_partitions = get_local_virtual_partitions(self.partitions)
+        data_schems = get_partition_scheme(virtual_partitions, self.base_paths)
+        
+        link_base_schemes = get_partition_scheme(partition, self.base_paths, "data_links/" + test)
+        # Match link paths to real data paths.
+        offset = 0
+        group_size = len(data_schemes) / len(link_base_schemes)
+        for link_disk, link_virtual, link_index, link_path in enumerate(link_base_schemes):
+            for data_disk, data_virtual, data_index, data_path in enumerate(data_schemes):
+                if test == "local_speed_up" and offset <= data_index and data_index < offset + group_size:
+                    scheme.append([data_index, link_index, data_path, link_path])
+                elif test == "local_batch_scale_out" and data_index == link_index:
+                    scheme.append([data_index, link_index, data_path, link_path])
+            offset += group_size
+        return scheme
     
-    def build_cluster_data_links(self, test, xml_save_path):
+    def get_cluster_partition_scheme(self, test, xml_save_path):
         node_index = self.get_current_node_index()
         if node_index == -1:
             print "Unknown host."
             return 
         
+        scheme = []
         virtual_partitions = get_cluster_virtual_partitions(self.nodes, self.partitions)
         data_paths = get_partition_paths(virtual_partitions, self.base_paths)
         link_base_paths = get_cluster_link_paths(len(self.nodes), self.base_paths, "data_links/" + test)
@@ -88,8 +122,6 @@ class WeatherBenchmark:
         # Match link paths to real data paths.
         link_base_paths.sort()
         for link_index, link_path in enumerate(link_base_paths):
-            if os.path.isdir(link_path):
-                shutil.rmtree(link_path)
             # Prep
             link_offset = link_index % len(self.nodes)
             disk_offset = link_index // len(self.nodes)
@@ -111,8 +143,33 @@ class WeatherBenchmark:
             data_paths.sort()
             for data_index, data_path in enumerate(data_paths):
                 if has_data and node_offset <= data_index and data_index < node_offset + group_size:
-                    self.add_collection_links_for(data_path, link_path, data_index)
-            self.add_collection_links_for("", link_path, -1)
+                    scheme.append([data_index, link_index, data_path, link_path])
+            scheme.append([-1, link_index, "", link_path])
+        return scheme
+    
+    def build_data_links(self, xml_save_path):
+        if (len(self.base_paths) == 0):
+            return
+        for test in self.dataset.get_tests():
+            if test in self.BENCHMARK_LOCAL_TESTS:
+                for i in self.partitions:
+                    scheme = self.get_local_partition_scheme(test, xml_save_path, i)
+                    self.build_data_links_scheme(scheme)
+            elif test in self.BENCHMARK_CLUSTER_TESTS:
+                scheme = self.get_cluster_partition_scheme(test, xml_save_path)
+                self.build_data_links_scheme(scheme)
+            else:
+                print "Unknown test."
+                exit()
+    
+    def build_data_links_scheme(self, scheme):
+        """Build all the data links based on the scheme information."""
+        link_path_cleared = []
+        for (data_index, partition, data_path, link_path) in scheme:
+            if link_path not in link_path_cleared and os.path.isdir(link_path):
+                shutil.rmtree(link_path)
+                link_path_cleared.append(link_path)
+            self.add_collection_links_for(data_path, link_path, data_index)
     
     def get_current_node_index(self):
         found = False
@@ -172,7 +229,7 @@ class WeatherBenchmark:
     def copy_and_replace_query(self, query_path, replacement_list):
         '''Copy the query files over to the query_path and replace the path
         for the where the collection data is located.'''
-        for query_file in self.QUERY_FILE_LIST:
+        for query_file in self.QUERY_FILE_LIST + self.QUERY_UTILITY_LIST:
             shutil.copyfile(self.QUERY_MASTER_FOLDER + query_file, query_path + query_file)
         
             # Make a search replace for each collection.

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/491e5917/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
index a1a1aa2..52945e5 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
@@ -24,7 +24,6 @@ from weather_config import *
 from weather_benchmark import *
 
 DEBUG_OUTPUT = False
-COMPRESSED = False
 
 #
 # Weather conversion for GHCN-DAILY files to xml.
@@ -42,7 +41,7 @@ def main(argv):
     xml_config_path = ""
     
     try:
-        opts, args = getopt.getopt(argv, "acf:hl:m:ruvw:x:", ["file=", "locality=", "max_station_files=", "web_service=", "xml_config="])
+        opts, args = getopt.getopt(argv, "af:hl:m:ruvw:x:", ["file=", "locality=", "max_station_files=", "web_service=", "xml_config="])
     except getopt.GetoptError:
         print 'The file options for weather_cli.py were not correctly specified.'
         print 'To see a full list of options try:'
@@ -52,10 +51,9 @@ def main(argv):
         if opt == '-h':
             print 'Converting weather daily files to xml options:'
             print '    -a        Append the results to the progress file.'
-            print '    -c        Compress the produced XML file with .gz.'
             print '    -f (str)  The file name of a specific station to process.'
             print '              * Helpful when testing a single stations XML file output.'
-            print '    -l (str)  Select the locality of the scripts execution (download, progress_file, sensor_build, station_build, partition, statistics).'
+            print '    -l (str)  Select the locality of the scripts execution (download, progress_file, sensor_build, station_build, partition, partition_scheme, statistics).'
             print '    -m (int)  Limits the number of files created for each station.'
             print '              * Helpful when testing to make sure all elements are supported for each station.'
             print '              Alternate form: --max_station_files=(int)'
@@ -67,9 +65,6 @@ def main(argv):
             sys.exit()
         elif opt in ('-a', "--append"):
             append = True
-        elif opt == '-c':
-            global COMPRESSED
-            COMPRESSED = True
         elif opt in ('-f', "--file"):
             # check if file exists.
             if os.path.exists(arg):
@@ -78,7 +73,7 @@ def main(argv):
                 print 'Error: Argument must be a file name for --file (-f).'
                 sys.exit()
         elif opt in ('-l', "--locality"):
-            if arg in ("download", "progress_file", "sensor_build", "station_build", "partition", "test_links", "queries", "statistics"):
+            if arg in ("download", "progress_file", "sensor_build", "station_build", "partition", "partition_scheme", "test_links", "queries", "statistics"):
                 section = arg
             else:
                 print 'Error: Argument must be a string for --locality (-l) and a valid locality.'
@@ -144,7 +139,7 @@ def main(argv):
         os.makedirs(xml_data_save_path)
 
     # Set up the XML build objects.
-    convert = WeatherWebServiceMonthlyXMLFile(download_path, xml_data_save_path, COMPRESSED, DEBUG_OUTPUT)
+    convert = WeatherWebServiceMonthlyXMLFile(download_path, xml_data_save_path, DEBUG_OUTPUT)
     progress_file = xml_data_save_path + "_data_progress.csv"
     data = WeatherDataFiles(ghcnd_data_dly_path, progress_file)
     if section in ("all", "progress_file"):
@@ -207,15 +202,19 @@ def main(argv):
             base_paths.append(paths + dataset_folder + "/")
         benchmark = WeatherBenchmark(base_paths, dataset.get_partitions(), dataset, config.get_node_machine_list())
         
-        if section in ("all", "partition"):
+        if section in ("all", "partition", "partition_scheme"):
             slices = benchmark.get_number_of_slices()
             print 'Processing the partition section (' + dataset.get_name() + ':d' + str(len(base_paths)) + ':s' + str(slices) + ').'
             data.reset()
-            data.copy_to_n_partitions(xml_data_save_path, slices, base_paths, reset)
+            if section == "partition_scheme":
+                benchmark.print_partition_scheme(xml_data_save_path)
+            else:
+                data.copy_to_n_partitions(xml_data_save_path, slices, base_paths, reset)
     
         if section in ("all", "test_links"):
             # TODO determine current node 
             print 'Processing the test links section (' + dataset.get_name() + ').'
+            benchmark.print_partition_scheme(xml_data_save_path)
             benchmark.build_data_links(xml_data_save_path)
 
         if section in ("all", "queries"):

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/491e5917/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
index a7adce5..c115efa 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
@@ -17,7 +17,6 @@
 import textwrap
 from datetime import date
 import os
-import gzip
 from collections import OrderedDict
 
 # Custom modules.
@@ -104,9 +103,8 @@ class WeatherConvertToXML:
     
     token = ""
     
-    def __init__(self, base_path, save_path, compressed, debug_output):
+    def __init__(self, base_path, save_path, debug_output):
         self.save_path = save_path
-        self.compressed = compressed
         self.debug_output = debug_output
 
         # Extra support files.
@@ -134,14 +132,9 @@ class WeatherConvertToXML:
             print str(field[FIELD_INDEX_NAME]) + " = '" + row[(field[FIELD_INDEX_START] - 1):field[FIELD_INDEX_END]] + "'"
     
     def save_file(self, filename, contents):
-        if self.compressed:
-            filename = filename + '.gz'
-            file = gzip.open(filename, 'wb')
-        else:
-            file = open(filename, 'w')
+        file = open(filename, 'w')
         file.write(contents)
         file.close()
-        
         return filename
     
     def get_folder_size(self, folder_name):

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/491e5917/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
index a9b4ecc..a68cba1 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
@@ -318,13 +318,26 @@ class WeatherDataFiles:
         return columns[self.INDEX_DATA_FILE_NAME]
     
     
+# Index values of each field details.
+PARTITION_INDEX_DISK = 0
+PARTITION_INDEX_VIRTUAL = 1
+PARTITION_INDEX = 2
+PARTITION_INDEX_PATH = 3
+PARTITION_HEADER = ("Disk", "Virtual", "Index", "Path")
+            
 def get_partition_paths(partitions, base_paths, key="partitions"):        
     partition_paths = []
+    for scheme in get_partition_scheme(partitions, base_paths, key):
+        partition_paths.append(scheme[PARTITION_INDEX_PATH])
+    return partition_paths
+
+def get_partition_scheme(partitions, base_paths, key="partitions"):        
+    partition_scheme = []
     for i in range(0, partitions):
         for j in range(0, len(base_paths)):
             new_partition_path = base_paths[j] + key + "/" + get_partition_folder(j, partitions, i) + "/"
-            partition_paths.append(new_partition_path)
-    return partition_paths
+            partition_scheme.append((j, partitions, i, new_partition_path))
+    return partition_scheme
 
 def get_partition_folder(disks, partitions, index):        
     return "d" + str(disks) + "_p" + str(partitions) + "_i" + str(index)


[38/50] [abbrv] git commit: Added a new test group to show counts of the benchmark queries.

Posted by pr...@apache.org.
Added a new test group to show counts of the benchmark queries.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/65c6d1b7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/65c6d1b7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/65c6d1b7

Branch: refs/heads/prestonc/hash_join
Commit: 65c6d1b75a7c94d47d2a596a25bca7994d1d13fb
Parents: d2771c0
Author: Preston Carman <pr...@apache.org>
Authored: Tue Apr 1 11:41:51 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:26 2014 -0700

----------------------------------------------------------------------
 .../Collection/Partition-1/q02_count.txt        |  1 +
 .../Collection/Partition-1/q03_count.txt        |  1 +
 .../Collection/Partition-1/q05_count.txt        |  1 +
 .../Collection/Partition-1/q07_count.txt        |  1 +
 .../Collection/Partition-2/q02_count.txt        |  1 +
 .../Collection/Partition-2/q03_count.txt        |  1 +
 .../Collection/Partition-2/q05_count.txt        |  1 +
 .../Collection/Partition-2/q07_count.txt        |  1 +
 .../Collection/Partition-4/q02_count.txt        |  1 +
 .../Collection/Partition-4/q03_count.txt        |  1 +
 .../Collection/Partition-4/q05_count.txt        |  1 +
 .../Collection/Partition-4/q07_count.txt        |  1 +
 .../XQuery/Collection/Partition-1/q02_count.xq  | 11 +++++++
 .../XQuery/Collection/Partition-1/q03_count.xq  |  8 ++++++
 .../XQuery/Collection/Partition-1/q05_count.xq  | 16 +++++++++++
 .../XQuery/Collection/Partition-1/q07_count.xq  | 16 +++++++++++
 .../XQuery/Collection/Partition-2/q02_count.xq  | 11 +++++++
 .../XQuery/Collection/Partition-2/q03_count.xq  |  8 ++++++
 .../XQuery/Collection/Partition-2/q05_count.xq  | 16 +++++++++++
 .../XQuery/Collection/Partition-2/q07_count.xq  | 16 +++++++++++
 .../XQuery/Collection/Partition-4/q02_count.xq  | 11 +++++++
 .../XQuery/Collection/Partition-4/q03_count.xq  |  8 ++++++
 .../XQuery/Collection/Partition-4/q05_count.xq  | 16 +++++++++++
 .../XQuery/Collection/Partition-4/q07_count.xq  | 16 +++++++++++
 vxquery-xtest/tests/XQTSCatalog.xml             | 20 +++++++++++++
 .../tests/cat/CollectionPartition1Queries.xml   | 30 ++++++++++++++++++++
 .../tests/cat/CollectionPartition2Queries.xml   | 30 ++++++++++++++++++++
 .../tests/cat/CollectionPartition4Queries.xml   | 30 ++++++++++++++++++++
 .../tests/cat/GhcndPartition2Queries.xml        | 16 +++++------
 .../tests/cat/GhcndPartition4Queries.xml        | 16 +++++------
 30 files changed, 291 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q02_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q02_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q02_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q02_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q03_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q03_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q03_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q03_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q05_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q05_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q05_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q05_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q07_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q07_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q07_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q07_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q02_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q02_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q02_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q02_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q03_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q03_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q03_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q03_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q05_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q05_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q05_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q05_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q07_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q07_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q07_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q07_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q02_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q02_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q02_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q02_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q03_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q03_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q03_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q03_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q05_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q05_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q05_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q05_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q07_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q07_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q07_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q07_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q02_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q02_count.xq
new file mode 100644
index 0000000..73e8aea
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q02_count.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q03_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q03_count.xq
new file mode 100644
index 0000000..0d327d1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q03_count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q05_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q05_count.xq
new file mode 100644
index 0000000..9f2ac93
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q05_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:count(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q07_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q07_count.xq
new file mode 100644
index 0000000..917b7c6
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q07_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q02_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q02_count.xq
new file mode 100644
index 0000000..52e7790
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q02_count.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q03_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q03_count.xq
new file mode 100644
index 0000000..619c6d1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q03_count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q05_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q05_count.xq
new file mode 100644
index 0000000..c32bcd1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q05_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:count(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q07_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q07_count.xq
new file mode 100644
index 0000000..fd3431f
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q07_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q02_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q02_count.xq
new file mode 100644
index 0000000..2940380
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q02_count.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q03_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q03_count.xq
new file mode 100644
index 0000000..eb6ff10
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q03_count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q05_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q05_count.xq
new file mode 100644
index 0000000..768e35d
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q05_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:count(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q07_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q07_count.xq
new file mode 100644
index 0000000..8ea026b
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q07_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/XQTSCatalog.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/XQTSCatalog.xml b/vxquery-xtest/tests/XQTSCatalog.xml
index 88a7981..3b30b30 100644
--- a/vxquery-xtest/tests/XQTSCatalog.xml
+++ b/vxquery-xtest/tests/XQTSCatalog.xml
@@ -148,6 +148,11 @@
 <!ENTITY GhcndPartition1Queries SYSTEM "cat/GhcndPartition1Queries.xml">
 <!ENTITY GhcndPartition2Queries SYSTEM "cat/GhcndPartition2Queries.xml">
 <!ENTITY GhcndPartition4Queries SYSTEM "cat/GhcndPartition4Queries.xml">
+
+<!ENTITY CollectionPartition1Queries SYSTEM "cat/CollectionPartition1Queries.xml">
+<!ENTITY CollectionPartition2Queries SYSTEM "cat/CollectionPartition2Queries.xml">
+<!ENTITY CollectionPartition4Queries SYSTEM "cat/CollectionPartition4Queries.xml">
+
 ]>
 <test-suite xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
@@ -952,4 +957,19 @@
          &GhcndPartition4Queries;
       </test-group>
    </test-group>
+   <test-group name="CollectionPartitionQueries" featureOwner="Preston Carman">
+      <GroupInfo>
+         <title>Collection Partition Queries</title>
+         <description/>
+      </GroupInfo>
+      <test-group name="ParallelExecutionTests" featureOwner="Preston Carman">
+         <GroupInfo>
+            <title>Parallel Execution Tests</title>
+            <description/>
+         </GroupInfo>
+         &CollectionPartition1Queries;
+         &CollectionPartition2Queries;
+         &CollectionPartition4Queries;
+      </test-group>
+   </test-group>
 </test-suite>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/cat/CollectionPartition1Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/CollectionPartition1Queries.xml b/vxquery-xtest/tests/cat/CollectionPartition1Queries.xml
new file mode 100644
index 0000000..71673af
--- /dev/null
+++ b/vxquery-xtest/tests/cat/CollectionPartition1Queries.xml
@@ -0,0 +1,30 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="CollectionPartition1Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>Collection Partition 1</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="collection-partition-1-q02" FilePath="Collection/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 1 partition.</description>
+      <query name="q02_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="collection-partition-1-q03" FilePath="Collection/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 1 partition.</description>
+      <query name="q03_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="collection-partition-1-q05" FilePath="Collection/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 1 partition.</description>
+      <query name="q05_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="collection-partition-1-q07" FilePath="Collection/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 1 partition.</description>
+      <query name="q07_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07_count.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/cat/CollectionPartition2Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/CollectionPartition2Queries.xml b/vxquery-xtest/tests/cat/CollectionPartition2Queries.xml
new file mode 100644
index 0000000..80dd480
--- /dev/null
+++ b/vxquery-xtest/tests/cat/CollectionPartition2Queries.xml
@@ -0,0 +1,30 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="CollectionPartition2Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>Collection Partition 2</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="collection-partition-2-q02" FilePath="Collection/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 2 partitions.</description>
+      <query name="q02_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="collection-partition-2-q03" FilePath="Collection/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 2 partitions.</description>
+      <query name="q03_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="collection-partition-2-q05" FilePath="Collection/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 2 partitions.</description>
+      <query name="q05_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="collection-partition-2-q07" FilePath="Collection/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 2 partitions.</description>
+      <query name="q07_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07_count.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/cat/CollectionPartition4Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/CollectionPartition4Queries.xml b/vxquery-xtest/tests/cat/CollectionPartition4Queries.xml
new file mode 100644
index 0000000..8b99f0f
--- /dev/null
+++ b/vxquery-xtest/tests/cat/CollectionPartition4Queries.xml
@@ -0,0 +1,30 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="CollectionPartition4Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>Collection Partition 4</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="collection-partition-4-q02" FilePath="Collection/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 4 partitions.</description>
+      <query name="q02_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="collection-partition-4-q03" FilePath="Collection/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 4 partitions.</description>
+      <query name="q03_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="collection-partition-4-q05" FilePath="Collection/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 4 partitions.</description>
+      <query name="q05_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="collection-partition-4-q07" FilePath="Collection/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 4 partitions.</description>
+      <query name="q07_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07_count.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/cat/GhcndPartition2Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndPartition2Queries.xml b/vxquery-xtest/tests/cat/GhcndPartition2Queries.xml
index 3f2d6ea..86b5cf0 100644
--- a/vxquery-xtest/tests/cat/GhcndPartition2Queries.xml
+++ b/vxquery-xtest/tests/cat/GhcndPartition2Queries.xml
@@ -3,49 +3,49 @@
       <title>GHCND Partition 1</title>
       <description/>
    </GroupInfo>
-   <test-case is-XPath2="true" name="ghcnd-partition-2-q00" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q00" FilePath="Ghcnd/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q00 from the weather benchmark with 2 partitions.</description>
       <query name="q00" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q00.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-2-q01" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q01" FilePath="Ghcnd/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q01 from the weather benchmark with 2 partitions.</description>
       <query name="q01" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q01.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-2-q02" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q02" FilePath="Ghcnd/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q02 from the weather benchmark with 2 partitions.</description>
       <query name="q02" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q02.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-2-q03" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q03" FilePath="Ghcnd/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q03 from the weather benchmark with 2 partitions.</description>
       <query name="q03" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q03.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-2-q04" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q04" FilePath="Ghcnd/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q04 from the weather benchmark with 2 partitions.</description>
       <query name="q04" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q04.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-2-q05" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q05" FilePath="Ghcnd/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q05 from the weather benchmark with 2 partitions.</description>
       <query name="q05" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q05.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-2-q06" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q06" FilePath="Ghcnd/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q06 from the weather benchmark with 2 partitions.</description>
       <query name="q06" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q06.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-2-q07" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q07" FilePath="Ghcnd/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q07 from the weather benchmark with 2 partitions.</description>
       <query name="q07" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c6d1b7/vxquery-xtest/tests/cat/GhcndPartition4Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndPartition4Queries.xml b/vxquery-xtest/tests/cat/GhcndPartition4Queries.xml
index 9c1b5ae..232a7b0 100644
--- a/vxquery-xtest/tests/cat/GhcndPartition4Queries.xml
+++ b/vxquery-xtest/tests/cat/GhcndPartition4Queries.xml
@@ -3,49 +3,49 @@
       <title>GHCND Partition 4</title>
       <description/>
    </GroupInfo>
-   <test-case is-XPath2="true" name="ghcnd-partition-4-q00" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q00" FilePath="Ghcnd/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q00 from the weather benchmark with 4 partitions.</description>
       <query name="q00" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q00.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-4-q01" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q01" FilePath="Ghcnd/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q01 from the weather benchmark with 4 partitions.</description>
       <query name="q01" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q01.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-4-q02" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q02" FilePath="Ghcnd/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q02 from the weather benchmark with 4 partitions.</description>
       <query name="q02" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q02.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-4-q03" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q03" FilePath="Ghcnd/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q03 from the weather benchmark with 4 partitions.</description>
       <query name="q03" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q03.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-4-q04" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q04" FilePath="Ghcnd/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q04 from the weather benchmark with 4 partitions.</description>
       <query name="q04" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q04.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-4-q05" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q05" FilePath="Ghcnd/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q05 from the weather benchmark with 4 partitions.</description>
       <query name="q05" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q05.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-4-q06" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q06" FilePath="Ghcnd/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q06 from the weather benchmark with 4 partitions.</description>
       <query name="q06" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
       <output-file role="principal" compare="Text">q06.txt</output-file>
    </test-case>
-   <test-case is-XPath2="true" name="ghcnd-partition-4-q07" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q07" FilePath="Ghcnd/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
       <description>Execution of q07 from the weather benchmark with 4 partitions.</description>
       <query name="q07" date="2014-04-01"/>
       <input-file role="principal-data" variable="input-context1">emptydoc</input-file>


[40/50] [abbrv] git commit: Added more parallel tests to the VXQuery test suite.

Posted by pr...@apache.org.
Added more parallel tests to the VXQuery test suite.

* Added specific aggregate queries.
* Added supporting count and record queries to debug parallel aggregate and join queries.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/7cde080b
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/7cde080b
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/7cde080b

Branch: refs/heads/prestonc/hash_join
Commit: 7cde080b00699159bb56cbea1838da70e21c838a
Parents: 65c6d1b
Author: Preston Carman <pr...@apache.org>
Authored: Tue Apr 1 16:53:19 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:26 2014 -0700

----------------------------------------------------------------------
 .../Collection/Partition-1/q02_count.txt        |  1 -
 .../Collection/Partition-1/q03_count.txt        |  1 -
 .../Collection/Partition-1/q05_count.txt        |  1 -
 .../Collection/Partition-1/q07_count.txt        |  1 -
 .../Collection/Partition-2/q02_count.txt        |  1 -
 .../Collection/Partition-2/q03_count.txt        |  1 -
 .../Collection/Partition-2/q05_count.txt        |  1 -
 .../Collection/Partition-2/q07_count.txt        |  1 -
 .../Collection/Partition-4/q02_count.txt        |  1 -
 .../Collection/Partition-4/q03_count.txt        |  1 -
 .../Collection/Partition-4/q05_count.txt        |  1 -
 .../Collection/Partition-4/q07_count.txt        |  1 -
 .../Ghcnd/Partition-1/q00.txt                   |  2 +-
 .../Ghcnd/Partition-1/q04.txt                   |  2 +-
 .../Ghcnd/Partition-1/q05.txt                   |  2 +-
 .../Ghcnd/Partition-1/q07.txt                   |  2 +-
 .../Ghcnd/Partition-2/q00.txt                   |  2 +-
 .../Ghcnd/Partition-2/q04.txt                   |  2 +-
 .../Ghcnd/Partition-2/q05.txt                   |  2 +-
 .../Ghcnd/Partition-2/q07.txt                   |  2 +-
 .../Ghcnd/Partition-4/q00.txt                   |  2 +-
 .../Ghcnd/Partition-4/q04.txt                   |  2 +-
 .../Ghcnd/Partition-4/q05.txt                   |  2 +-
 .../Ghcnd/Partition-4/q07.txt                   |  2 +-
 .../GhcndCount/Partition-1/q02_count.txt        |  1 +
 .../GhcndCount/Partition-1/q03_count.txt        |  1 +
 .../GhcndCount/Partition-1/q05_count.txt        |  1 +
 .../GhcndCount/Partition-1/q07_count.txt        |  1 +
 .../GhcndCount/Partition-2/q02_count.txt        |  1 +
 .../GhcndCount/Partition-2/q03_count.txt        |  1 +
 .../GhcndCount/Partition-2/q05_count.txt        |  1 +
 .../GhcndCount/Partition-2/q07_count.txt        |  1 +
 .../GhcndCount/Partition-4/q02_count.txt        |  1 +
 .../GhcndCount/Partition-4/q03_count.txt        |  1 +
 .../GhcndCount/Partition-4/q05_count.txt        |  1 +
 .../GhcndCount/Partition-4/q07_count.txt        |  1 +
 .../GhcndRecords/Partition-1/q02_records.txt    |  1 +
 .../GhcndRecords/Partition-1/q03_records.txt    |  3 ++
 .../GhcndRecords/Partition-1/q05_records.txt    |  1 +
 .../GhcndRecords/Partition-1/q07_records.txt    |  3 ++
 .../GhcndRecords/Partition-2/q02_records.txt    |  1 +
 .../GhcndRecords/Partition-2/q03_records.txt    |  3 ++
 .../GhcndRecords/Partition-2/q05_records.txt    |  1 +
 .../GhcndRecords/Partition-2/q07_records.txt    |  3 ++
 .../GhcndRecords/Partition-4/q02_records.txt    |  1 +
 .../GhcndRecords/Partition-4/q03_records.txt    |  3 ++
 .../GhcndRecords/Partition-4/q05_records.txt    |  1 +
 .../GhcndRecords/Partition-4/q07_records.txt    |  3 ++
 .../XQuery/Collection/Partition-1/q02_count.xq  | 11 ----
 .../XQuery/Collection/Partition-1/q03_count.xq  |  8 ---
 .../XQuery/Collection/Partition-1/q05_count.xq  | 16 ------
 .../XQuery/Collection/Partition-1/q07_count.xq  | 16 ------
 .../XQuery/Collection/Partition-2/q02_count.xq  | 11 ----
 .../XQuery/Collection/Partition-2/q03_count.xq  |  8 ---
 .../XQuery/Collection/Partition-2/q05_count.xq  | 16 ------
 .../XQuery/Collection/Partition-2/q07_count.xq  | 16 ------
 .../XQuery/Collection/Partition-4/q02_count.xq  | 11 ----
 .../XQuery/Collection/Partition-4/q03_count.xq  |  8 ---
 .../XQuery/Collection/Partition-4/q05_count.xq  | 16 ------
 .../XQuery/Collection/Partition-4/q07_count.xq  | 16 ------
 .../XQuery/GhcndCount/Partition-1/q02_count.xq  | 11 ++++
 .../XQuery/GhcndCount/Partition-1/q03_count.xq  |  8 +++
 .../XQuery/GhcndCount/Partition-1/q05_count.xq  | 16 ++++++
 .../XQuery/GhcndCount/Partition-1/q07_count.xq  | 16 ++++++
 .../XQuery/GhcndCount/Partition-2/q02_count.xq  | 11 ++++
 .../XQuery/GhcndCount/Partition-2/q03_count.xq  |  8 +++
 .../XQuery/GhcndCount/Partition-2/q05_count.xq  | 16 ++++++
 .../XQuery/GhcndCount/Partition-2/q07_count.xq  | 16 ++++++
 .../XQuery/GhcndCount/Partition-4/q02_count.xq  | 11 ++++
 .../XQuery/GhcndCount/Partition-4/q03_count.xq  |  8 +++
 .../XQuery/GhcndCount/Partition-4/q05_count.xq  | 16 ++++++
 .../XQuery/GhcndCount/Partition-4/q07_count.xq  | 16 ++++++
 .../GhcndRecords/Partition-1/q02_records.xq     |  9 ++++
 .../GhcndRecords/Partition-1/q03_records.xq     |  6 +++
 .../GhcndRecords/Partition-1/q05_records.xq     | 14 +++++
 .../GhcndRecords/Partition-1/q07_records.xq     | 14 +++++
 .../GhcndRecords/Partition-2/q02_records.xq     |  9 ++++
 .../GhcndRecords/Partition-2/q03_records.xq     |  6 +++
 .../GhcndRecords/Partition-2/q05_records.xq     | 14 +++++
 .../GhcndRecords/Partition-2/q07_records.xq     | 14 +++++
 .../GhcndRecords/Partition-4/q02_records.xq     |  9 ++++
 .../GhcndRecords/Partition-4/q03_records.xq     |  6 +++
 .../GhcndRecords/Partition-4/q05_records.xq     | 14 +++++
 .../GhcndRecords/Partition-4/q07_records.xq     | 14 +++++
 .../quarter_1/sesnors/US000000001_200101_0.xml  |  2 +-
 .../quarter_2/sesnors/US000000002_200202_0.xml  |  2 +-
 .../quarter_3/sesnors/AS000000003_200303_0.xml  |  2 +-
 vxquery-xtest/tests/XQTSCatalog.xml             | 56 ++++++++++++++++----
 .../tests/cat/AggregatePartition1Queries.xml    | 36 +++++++++++++
 .../tests/cat/AggregatePartition2Queries.xml    | 36 +++++++++++++
 .../tests/cat/AggregatePartition4Queries.xml    | 36 +++++++++++++
 .../tests/cat/CollectionPartition1Queries.xml   | 30 -----------
 .../tests/cat/CollectionPartition2Queries.xml   | 30 -----------
 .../tests/cat/CollectionPartition4Queries.xml   | 30 -----------
 .../tests/cat/GhcndCountPartition1Queries.xml   | 30 +++++++++++
 .../tests/cat/GhcndCountPartition2Queries.xml   | 30 +++++++++++
 .../tests/cat/GhcndCountPartition4Queries.xml   | 30 +++++++++++
 .../tests/cat/GhcndRecordsPartition1Queries.xml | 30 +++++++++++
 .../tests/cat/GhcndRecordsPartition2Queries.xml | 30 +++++++++++
 .../tests/cat/GhcndRecordsPartition4Queries.xml | 30 +++++++++++
 100 files changed, 668 insertions(+), 279 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q02_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q02_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q02_count.txt
deleted file mode 100644
index 56a6051..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q02_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q03_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q03_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q03_count.txt
deleted file mode 100644
index e440e5c..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q03_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q05_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q05_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q05_count.txt
deleted file mode 100644
index 56a6051..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q05_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q07_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q07_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q07_count.txt
deleted file mode 100644
index e440e5c..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-1/q07_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q02_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q02_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q02_count.txt
deleted file mode 100644
index 56a6051..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q02_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q03_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q03_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q03_count.txt
deleted file mode 100644
index e440e5c..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q03_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q05_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q05_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q05_count.txt
deleted file mode 100644
index 56a6051..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q05_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q07_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q07_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q07_count.txt
deleted file mode 100644
index e440e5c..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-2/q07_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q02_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q02_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q02_count.txt
deleted file mode 100644
index 56a6051..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q02_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q03_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q03_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q03_count.txt
deleted file mode 100644
index e440e5c..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q03_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q05_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q05_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q05_count.txt
deleted file mode 100644
index 56a6051..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q05_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q07_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q07_count.txt b/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q07_count.txt
deleted file mode 100644
index e440e5c..0000000
--- a/vxquery-xtest/tests/ExpectedTestResults/Collection/Partition-4/q07_count.txt
+++ /dev/null
@@ -1 +0,0 @@
-3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q00.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
index 06502bc..e6116d0 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
@@ -1,2 +1,2 @@
-<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
 <data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q04.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
index a1ca535..c5b9925 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
@@ -1,3 +1,3 @@
-<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
 <data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
 <data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q05.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q05.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q05.txt
index b123147..9f5aceb 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q05.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q05.txt
@@ -1 +1 @@
-1.1
\ No newline at end of file
+1.125
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q07.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q07.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q07.txt
index d8263ee..bfda7af 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q07.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q07.txt
@@ -1 +1 @@
-2
\ No newline at end of file
+1.95
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q00.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
index 06502bc..e6116d0 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
@@ -1,2 +1,2 @@
-<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
 <data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q04.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
index a1ca535..c5b9925 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
@@ -1,3 +1,3 @@
-<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
 <data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
 <data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q05.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q05.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q05.txt
index b123147..9f5aceb 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q05.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q05.txt
@@ -1 +1 @@
-1.1
\ No newline at end of file
+1.125
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q07.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q07.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q07.txt
index d8263ee..bfda7af 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q07.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q07.txt
@@ -1 +1 @@
-2
\ No newline at end of file
+1.95
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q00.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
index 06502bc..e6116d0 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
@@ -1,2 +1,2 @@
-<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
 <data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q04.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
index a1ca535..c5b9925 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
@@ -1,3 +1,3 @@
-<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
 <data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
 <data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q05.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q05.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q05.txt
index b123147..9f5aceb 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q05.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q05.txt
@@ -1 +1 @@
-1.1
\ No newline at end of file
+1.125
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q07.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q07.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q07.txt
index d8263ee..bfda7af 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q07.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q07.txt
@@ -1 +1 @@
-2
\ No newline at end of file
+1.95
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q02_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q02_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q02_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q02_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q03_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q03_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q03_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q03_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q05_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q05_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q05_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q05_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q07_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q07_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q07_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-1/q07_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q02_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q02_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q02_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q02_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q03_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q03_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q03_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q03_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q05_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q05_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q05_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q05_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q07_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q07_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q07_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-2/q07_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q02_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q02_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q02_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q02_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q03_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q03_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q03_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q03_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q05_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q05_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q05_count.txt
new file mode 100644
index 0000000..56a6051
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q05_count.txt
@@ -0,0 +1 @@
+1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q07_count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q07_count.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q07_count.txt
new file mode 100644
index 0000000..e440e5c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndCount/Partition-4/q07_count.txt
@@ -0,0 +1 @@
+3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q02_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q02_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q02_records.txt
new file mode 100644
index 0000000..a533a86
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q02_records.txt
@@ -0,0 +1 @@
+<value>20</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q03_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q03_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q03_records.txt
new file mode 100644
index 0000000..8d77b4d
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q03_records.txt
@@ -0,0 +1,3 @@
+<value>31</value>
+<value>32</value>
+<value>33</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q05_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q05_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q05_records.txt
new file mode 100644
index 0000000..802ab3c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q05_records.txt
@@ -0,0 +1 @@
+<value>11.25</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q07_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q07_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q07_records.txt
new file mode 100644
index 0000000..fdd1637
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-1/q07_records.txt
@@ -0,0 +1,3 @@
+19.75
+19.5
+19.25
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q02_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q02_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q02_records.txt
new file mode 100644
index 0000000..a533a86
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q02_records.txt
@@ -0,0 +1 @@
+<value>20</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q03_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q03_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q03_records.txt
new file mode 100644
index 0000000..8d77b4d
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q03_records.txt
@@ -0,0 +1,3 @@
+<value>31</value>
+<value>32</value>
+<value>33</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q05_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q05_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q05_records.txt
new file mode 100644
index 0000000..802ab3c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q05_records.txt
@@ -0,0 +1 @@
+<value>11.25</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q07_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q07_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q07_records.txt
new file mode 100644
index 0000000..fdd1637
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-2/q07_records.txt
@@ -0,0 +1,3 @@
+19.75
+19.5
+19.25
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q02_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q02_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q02_records.txt
new file mode 100644
index 0000000..a533a86
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q02_records.txt
@@ -0,0 +1 @@
+<value>20</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q03_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q03_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q03_records.txt
new file mode 100644
index 0000000..8d77b4d
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q03_records.txt
@@ -0,0 +1,3 @@
+<value>31</value>
+<value>32</value>
+<value>33</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q05_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q05_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q05_records.txt
new file mode 100644
index 0000000..802ab3c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q05_records.txt
@@ -0,0 +1 @@
+<value>11.25</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q07_records.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q07_records.txt b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q07_records.txt
new file mode 100644
index 0000000..fdd1637
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/GhcndRecords/Partition-4/q07_records.txt
@@ -0,0 +1,3 @@
+19.75
+19.5
+19.25
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q02_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q02_count.xq
deleted file mode 100644
index 73e8aea..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q02_count.xq
+++ /dev/null
@@ -1,11 +0,0 @@
-(: XQuery Aggregate Query :)
-(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
-(: station (US000000002) for 2002.                                            :)
-fn:count(
-    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
-    for $r in collection($collection)/dataCollection/data
-    where $r/station eq "GHCND:US000000002" 
-        and $r/dataType eq "PRCP" 
-        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
-    return $r/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q03_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q03_count.xq
deleted file mode 100644
index 0d327d1..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q03_count.xq
+++ /dev/null
@@ -1,8 +0,0 @@
-(: XQuery Aggregate Query :)
-(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
-fn:count(
-    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
-    for $r in collection($collection)/dataCollection/data
-    where $r/dataType eq "TMAX"
-    return $r/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q05_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q05_count.xq
deleted file mode 100644
index 9f2ac93..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q05_count.xq
+++ /dev/null
@@ -1,16 +0,0 @@
-(: XQuery Join Aggregate Query :)
-(: Find the lowest recorded temperature (TMIN) in the United States for     :)
-(: 2001.                                                                      :)
-fn:count(
-    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
-    for $s in collection($station_collection)/stationCollection/station
-    
-    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
-    for $r in collection($sensor_collection)/dataCollection/data
-    
-    where $s/id eq $r/station
-        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
-        and $r/dataType eq "TMIN" 
-        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
-    return $r/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q07_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q07_count.xq
deleted file mode 100644
index 917b7c6..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-1/q07_count.xq
+++ /dev/null
@@ -1,16 +0,0 @@
-(: XQuery Self Join Query :)
-(: Self join with all stations finding the difference in min and max       :)
-(: temperature and get the average.                                        :)
-fn:count(
-    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
-    for $r_min in collection($sensor_collection_min)/dataCollection/data
-    
-    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
-    for $r_max in collection($sensor_collection_max)/dataCollection/data
-    
-    where $r_min/station eq $r_max/station
-        and $r_min/date eq $r_max/date
-        and $r_min/dataType eq "TMIN"
-        and $r_max/dataType eq "TMAX"
-    return $r_max/value - $r_min/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q02_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q02_count.xq
deleted file mode 100644
index 52e7790..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q02_count.xq
+++ /dev/null
@@ -1,11 +0,0 @@
-(: XQuery Aggregate Query :)
-(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
-(: station (US000000002) for 2002.                                            :)
-fn:count(
-    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
-    for $r in collection($collection)/dataCollection/data
-    where $r/station eq "GHCND:US000000002" 
-        and $r/dataType eq "PRCP" 
-        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
-    return $r/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q03_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q03_count.xq
deleted file mode 100644
index 619c6d1..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q03_count.xq
+++ /dev/null
@@ -1,8 +0,0 @@
-(: XQuery Aggregate Query :)
-(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
-fn:count(
-    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
-    for $r in collection($collection)/dataCollection/data
-    where $r/dataType eq "TMAX"
-    return $r/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q05_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q05_count.xq
deleted file mode 100644
index c32bcd1..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q05_count.xq
+++ /dev/null
@@ -1,16 +0,0 @@
-(: XQuery Join Aggregate Query :)
-(: Find the lowest recorded temperature (TMIN) in the United States for     :)
-(: 2001.                                                                      :)
-fn:count(
-    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
-    for $s in collection($station_collection)/stationCollection/station
-    
-    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
-    for $r in collection($sensor_collection)/dataCollection/data
-    
-    where $s/id eq $r/station
-        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
-        and $r/dataType eq "TMIN" 
-        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
-    return $r/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q07_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q07_count.xq
deleted file mode 100644
index fd3431f..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-2/q07_count.xq
+++ /dev/null
@@ -1,16 +0,0 @@
-(: XQuery Self Join Query :)
-(: Self join with all stations finding the difference in min and max       :)
-(: temperature and get the average.                                        :)
-fn:count(
-    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
-    for $r_min in collection($sensor_collection_min)/dataCollection/data
-    
-    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
-    for $r_max in collection($sensor_collection_max)/dataCollection/data
-    
-    where $r_min/station eq $r_max/station
-        and $r_min/date eq $r_max/date
-        and $r_min/dataType eq "TMIN"
-        and $r_max/dataType eq "TMAX"
-    return $r_max/value - $r_min/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q02_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q02_count.xq
deleted file mode 100644
index 2940380..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q02_count.xq
+++ /dev/null
@@ -1,11 +0,0 @@
-(: XQuery Aggregate Query :)
-(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
-(: station (US000000002) for 2002.                                            :)
-fn:count(
-    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
-    for $r in collection($collection)/dataCollection/data
-    where $r/station eq "GHCND:US000000002" 
-        and $r/dataType eq "PRCP" 
-        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
-    return $r/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q03_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q03_count.xq
deleted file mode 100644
index eb6ff10..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q03_count.xq
+++ /dev/null
@@ -1,8 +0,0 @@
-(: XQuery Aggregate Query :)
-(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
-fn:count(
-    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
-    for $r in collection($collection)/dataCollection/data
-    where $r/dataType eq "TMAX"
-    return $r/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q05_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q05_count.xq
deleted file mode 100644
index 768e35d..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q05_count.xq
+++ /dev/null
@@ -1,16 +0,0 @@
-(: XQuery Join Aggregate Query :)
-(: Find the lowest recorded temperature (TMIN) in the United States for     :)
-(: 2001.                                                                      :)
-fn:count(
-    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
-    for $s in collection($station_collection)/stationCollection/station
-    
-    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
-    for $r in collection($sensor_collection)/dataCollection/data
-    
-    where $s/id eq $r/station
-        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
-        and $r/dataType eq "TMIN" 
-        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
-    return $r/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q07_count.xq b/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q07_count.xq
deleted file mode 100644
index 8ea026b..0000000
--- a/vxquery-xtest/tests/Queries/XQuery/Collection/Partition-4/q07_count.xq
+++ /dev/null
@@ -1,16 +0,0 @@
-(: XQuery Self Join Query :)
-(: Self join with all stations finding the difference in min and max       :)
-(: temperature and get the average.                                        :)
-fn:count(
-    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
-    for $r_min in collection($sensor_collection_min)/dataCollection/data
-    
-    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
-    for $r_max in collection($sensor_collection_max)/dataCollection/data
-    
-    where $r_min/station eq $r_max/station
-        and $r_min/date eq $r_max/date
-        and $r_min/dataType eq "TMIN"
-        and $r_max/dataType eq "TMAX"
-    return $r_max/value - $r_min/value
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q02_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q02_count.xq
new file mode 100644
index 0000000..73e8aea
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q02_count.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q03_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q03_count.xq
new file mode 100644
index 0000000..0d327d1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q03_count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q05_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q05_count.xq
new file mode 100644
index 0000000..9f2ac93
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q05_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:count(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q07_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q07_count.xq
new file mode 100644
index 0000000..917b7c6
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-1/q07_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q02_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q02_count.xq
new file mode 100644
index 0000000..52e7790
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q02_count.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q03_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q03_count.xq
new file mode 100644
index 0000000..619c6d1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q03_count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q05_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q05_count.xq
new file mode 100644
index 0000000..c32bcd1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q05_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:count(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q07_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q07_count.xq
new file mode 100644
index 0000000..fd3431f
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-2/q07_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q02_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q02_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q02_count.xq
new file mode 100644
index 0000000..2940380
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q02_count.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q03_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q03_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q03_count.xq
new file mode 100644
index 0000000..eb6ff10
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q03_count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q05_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q05_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q05_count.xq
new file mode 100644
index 0000000..768e35d
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q05_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:count(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q07_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q07_count.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q07_count.xq
new file mode 100644
index 0000000..8ea026b
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndCount/Partition-4/q07_count.xq
@@ -0,0 +1,16 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:count(
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q02_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q02_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q02_records.xq
new file mode 100644
index 0000000..68b87b5
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q02_records.xq
@@ -0,0 +1,9 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q03_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q03_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q03_records.xq
new file mode 100644
index 0000000..8a22c5e
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q03_records.xq
@@ -0,0 +1,6 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q05_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q05_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q05_records.xq
new file mode 100644
index 0000000..0cd735d
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q05_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q07_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q07_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q07_records.xq
new file mode 100644
index 0000000..793fbba
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-1/q07_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q02_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q02_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q02_records.xq
new file mode 100644
index 0000000..4b14f55
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q02_records.xq
@@ -0,0 +1,9 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q03_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q03_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q03_records.xq
new file mode 100644
index 0000000..581644a
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q03_records.xq
@@ -0,0 +1,6 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q05_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q05_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q05_records.xq
new file mode 100644
index 0000000..83b4683
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q05_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q07_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q07_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q07_records.xq
new file mode 100644
index 0000000..1948ba0
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-2/q07_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q02_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q02_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q02_records.xq
new file mode 100644
index 0000000..8fb560b
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q02_records.xq
@@ -0,0 +1,9 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q03_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q03_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q03_records.xq
new file mode 100644
index 0000000..835e3b2
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q03_records.xq
@@ -0,0 +1,6 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value


[42/50] [abbrv] git commit: Found an error in the aggregate functions where the argument was overwriting the saved value.

Posted by pr...@apache.org.
Found an error in the aggregate functions where the argument was overwriting the saved value.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/91e801d1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/91e801d1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/91e801d1

Branch: refs/heads/prestonc/hash_join
Commit: 91e801d17cd09f4c5bdedebe60f6924816eff918
Parents: deabbf7
Author: Preston Carman <pr...@apache.org>
Authored: Tue Apr 1 17:10:34 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:26 2014 -0700

----------------------------------------------------------------------
 .../AvgLocalAggregateEvaluatorFactory.java      | 23 +++++++++++-------
 .../FnAvgAggregateEvaluatorFactory.java         | 24 +++++++++++++------
 .../FnSumAggregateEvaluatorFactory.java         | 25 ++++++++++++++------
 3 files changed, 50 insertions(+), 22 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/91e801d1/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgLocalAggregateEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgLocalAggregateEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgLocalAggregateEvaluatorFactory.java
index 91657c6..45414dc 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgLocalAggregateEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgLocalAggregateEvaluatorFactory.java
@@ -26,7 +26,6 @@ import org.apache.vxquery.datamodel.values.XDMConstants;
 import org.apache.vxquery.exceptions.ErrorCode;
 import org.apache.vxquery.exceptions.SystemException;
 import org.apache.vxquery.runtime.functions.arithmetic.AddOperation;
-import org.apache.vxquery.runtime.functions.arithmetic.DivideOperation;
 import org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentAggregateEvaluator;
 import org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentAggregateEvaluatorFactory;
 import org.apache.vxquery.runtime.functions.util.FunctionHelper;
@@ -48,10 +47,12 @@ public class AvgLocalAggregateEvaluatorFactory extends AbstractTaggedValueArgume
     @Override
     protected IAggregateEvaluator createEvaluator(IScalarEvaluator[] args) throws AlgebricksException {
         final TaggedValuePointable tvpCount = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
-        final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
+        final ArrayBackedValueStorage abvsCount = new ArrayBackedValueStorage();
+        final DataOutput dOutCount = abvsCount.getDataOutput();
+        final ArrayBackedValueStorage abvsSum = new ArrayBackedValueStorage();
+        final DataOutput dOutSum = abvsSum.getDataOutput();
         final ArrayBackedValueStorage abvsSeq = new ArrayBackedValueStorage();
         final SequenceBuilder sb = new SequenceBuilder();
-        final DataOutput dOut = abvs.getDataOutput();
         final AddOperation aOp = new AddOperation();
 
         return new AbstractTaggedValueArgumentAggregateEvaluator(args) {
@@ -70,10 +71,10 @@ public class AvgLocalAggregateEvaluatorFactory extends AbstractTaggedValueArgume
                 } else {
                     // Set count as a TaggedValuePointable.
                     try {
-                        abvs.reset();
-                        dOut.write(ValueTag.XS_INTEGER_TAG);
-                        dOut.writeLong(count);
-                        tvpCount.set(abvs);
+                        abvsCount.reset();
+                        dOutCount.write(ValueTag.XS_INTEGER_TAG);
+                        dOutCount.writeLong(count);
+                        tvpCount.set(abvsCount);
 
                         // Save intermediate result.
                         abvsSeq.reset();
@@ -93,7 +94,13 @@ public class AvgLocalAggregateEvaluatorFactory extends AbstractTaggedValueArgume
                 TaggedValuePointable tvp = args[0];
                 if (count == 0) {
                     // Init.
-                    tvpSum.set(tvp);
+                    try {
+                        abvsSum.reset();
+                        dOutSum.write(tvp.getByteArray(), tvp.getStartOffset(), tvp.getLength());
+                        tvpSum.set(abvsSum);
+                    } catch (IOException e) {
+                        throw new SystemException(ErrorCode.SYSE0001, e.toString());
+                    }
                 } else {
                     FunctionHelper.arithmeticOperation(aOp, dCtx, tvp, tvpSum, tvpSum);
                 }

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/91e801d1/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgAggregateEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgAggregateEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgAggregateEvaluatorFactory.java
index 9417ae2..ecde53b 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgAggregateEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgAggregateEvaluatorFactory.java
@@ -17,10 +17,12 @@
 package org.apache.vxquery.runtime.functions.aggregate;
 
 import java.io.DataOutput;
+import java.io.IOException;
 
 import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
 import org.apache.vxquery.datamodel.values.ValueTag;
 import org.apache.vxquery.datamodel.values.XDMConstants;
+import org.apache.vxquery.exceptions.ErrorCode;
 import org.apache.vxquery.exceptions.SystemException;
 import org.apache.vxquery.runtime.functions.arithmetic.AddOperation;
 import org.apache.vxquery.runtime.functions.arithmetic.DivideOperation;
@@ -45,8 +47,10 @@ public class FnAvgAggregateEvaluatorFactory extends AbstractTaggedValueArgumentA
     @Override
     protected IAggregateEvaluator createEvaluator(IScalarEvaluator[] args) throws AlgebricksException {
         final TaggedValuePointable tvpCount = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
-        final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
-        final DataOutput dOut = abvs.getDataOutput();
+        final ArrayBackedValueStorage abvsSum = new ArrayBackedValueStorage();
+        final DataOutput dOutSum = abvsSum.getDataOutput();
+        final ArrayBackedValueStorage abvsCount = new ArrayBackedValueStorage();
+        final DataOutput dOutCount = abvsCount.getDataOutput();
         final AddOperation aOp = new AddOperation();
         final DivideOperation aOpDivide = new DivideOperation();
 
@@ -66,10 +70,10 @@ public class FnAvgAggregateEvaluatorFactory extends AbstractTaggedValueArgumentA
                 } else {
                     // Set count as a TaggedValuePointable.
                     try {
-                        abvs.reset();
-                        dOut.write(ValueTag.XS_INTEGER_TAG);
-                        dOut.writeLong(count);
-                        tvpCount.set(abvs);
+                        abvsCount.reset();
+                        dOutCount.write(ValueTag.XS_INTEGER_TAG);
+                        dOutCount.writeLong(count);
+                        tvpCount.set(abvsCount);
 
                         FunctionHelper.arithmeticOperation(aOpDivide, dCtx, tvpSum, tvpCount, tvpSum);
                         result.set(tvpSum);
@@ -84,7 +88,13 @@ public class FnAvgAggregateEvaluatorFactory extends AbstractTaggedValueArgumentA
                 TaggedValuePointable tvp = args[0];
                 if (count == 0) {
                     // Init.
-                    tvpSum.set(tvp);
+                    try {
+                        abvsSum.reset();
+                        dOutSum.write(tvp.getByteArray(), tvp.getStartOffset(), tvp.getLength());
+                        tvpSum.set(abvsSum);
+                    } catch (IOException e) {
+                        throw new SystemException(ErrorCode.SYSE0001, e.toString());
+                    }
                 } else {
                     FunctionHelper.arithmeticOperation(aOp, dCtx, tvp, tvpSum, tvpSum);
                 }

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/91e801d1/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumAggregateEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumAggregateEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumAggregateEvaluatorFactory.java
index cbdf4d4..8572a11 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumAggregateEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumAggregateEvaluatorFactory.java
@@ -17,9 +17,11 @@
 package org.apache.vxquery.runtime.functions.aggregate;
 
 import java.io.DataOutput;
+import java.io.IOException;
 
 import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
 import org.apache.vxquery.datamodel.values.ValueTag;
+import org.apache.vxquery.exceptions.ErrorCode;
 import org.apache.vxquery.exceptions.SystemException;
 import org.apache.vxquery.runtime.functions.arithmetic.AddOperation;
 import org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentAggregateEvaluator;
@@ -42,8 +44,10 @@ public class FnSumAggregateEvaluatorFactory extends AbstractTaggedValueArgumentA
 
     @Override
     protected IAggregateEvaluator createEvaluator(IScalarEvaluator[] args) throws AlgebricksException {
-        final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
-        final DataOutput dOut = abvs.getDataOutput();
+        final ArrayBackedValueStorage abvsCount = new ArrayBackedValueStorage();
+        final DataOutput dOutCount = abvsCount.getDataOutput();
+        final ArrayBackedValueStorage abvsSum = new ArrayBackedValueStorage();
+        final DataOutput dOutSum = abvsSum.getDataOutput();
         final AddOperation aOp = new AddOperation();
 
         return new AbstractTaggedValueArgumentAggregateEvaluator(args) {
@@ -61,11 +65,12 @@ public class FnSumAggregateEvaluatorFactory extends AbstractTaggedValueArgumentA
                 if (count == 0) {
                     // No argument return an integer.
                     try {
-                        abvs.reset();
-                        dOut.write(ValueTag.XS_INTEGER_TAG);
-                        dOut.writeLong(0);
-                        result.set(abvs);
+                        abvsCount.reset();
+                        dOutCount.write(ValueTag.XS_INTEGER_TAG);
+                        dOutCount.writeLong(0);
+                        result.set(abvsCount);
                     } catch (Exception e) {
+                        
                         throw new AlgebricksException(e);
                     }
                 } else {
@@ -78,7 +83,13 @@ public class FnSumAggregateEvaluatorFactory extends AbstractTaggedValueArgumentA
                 TaggedValuePointable tvp = args[0];
                 if (count == 0) {
                     // Init.
-                    tvpSum.set(tvp);
+                    try {
+                        abvsSum.reset();
+                        dOutSum.write(tvp.getByteArray(), tvp.getStartOffset(), tvp.getLength());
+                        tvpSum.set(abvsSum);
+                    } catch (IOException e) {
+                        throw new SystemException(ErrorCode.SYSE0001, e.toString());
+                    }
                 } else {
                     FunctionHelper.arithmeticOperation(aOp, dCtx, tvp, tvpSum, tvpSum);
                 }


[48/50] [abbrv] git commit: New weather benchmark test suite that includes tests for 1, 2, and 4 partitions of data.

Posted by pr...@apache.org.
New weather benchmark test suite that includes tests for 1, 2, and 4 partitions of data.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/d2771c04
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/d2771c04
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/d2771c04

Branch: refs/heads/prestonc/hash_join
Commit: d2771c0467d1a4805c51d6cdd4451e5b65e5939d
Parents: c97d817
Author: Preston Carman <pr...@apache.org>
Authored: Tue Apr 1 11:12:24 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:26 2014 -0700

----------------------------------------------------------------------
 .../Ghcnd/Partition-1/q00.txt                   |    2 +
 .../Ghcnd/Partition-1/q01.txt                   |    1 +
 .../Ghcnd/Partition-1/q02.txt                   |    1 +
 .../Ghcnd/Partition-1/q03.txt                   |    1 +
 .../Ghcnd/Partition-1/q04.txt                   |    3 +
 .../Ghcnd/Partition-1/q05.txt                   |    1 +
 .../Ghcnd/Partition-1/q06.txt                   |    3 +
 .../Ghcnd/Partition-1/q07.txt                   |    1 +
 .../Ghcnd/Partition-2/q00.txt                   |    2 +
 .../Ghcnd/Partition-2/q01.txt                   |    1 +
 .../Ghcnd/Partition-2/q02.txt                   |    1 +
 .../Ghcnd/Partition-2/q03.txt                   |    1 +
 .../Ghcnd/Partition-2/q04.txt                   |    3 +
 .../Ghcnd/Partition-2/q05.txt                   |    1 +
 .../Ghcnd/Partition-2/q06.txt                   |    3 +
 .../Ghcnd/Partition-2/q07.txt                   |    1 +
 .../Ghcnd/Partition-4/q00.txt                   |    2 +
 .../Ghcnd/Partition-4/q01.txt                   |    1 +
 .../Ghcnd/Partition-4/q02.txt                   |    1 +
 .../Ghcnd/Partition-4/q03.txt                   |    1 +
 .../Ghcnd/Partition-4/q04.txt                   |    3 +
 .../Ghcnd/Partition-4/q05.txt                   |    1 +
 .../Ghcnd/Partition-4/q06.txt                   |    3 +
 .../Ghcnd/Partition-4/q07.txt                   |    1 +
 .../Queries/XQuery/Ghcnd/Partition-1/q00.xq     |   11 +
 .../Queries/XQuery/Ghcnd/Partition-1/q01.xq     |    8 +
 .../Queries/XQuery/Ghcnd/Partition-1/q02.xq     |   11 +
 .../Queries/XQuery/Ghcnd/Partition-1/q03.xq     |    8 +
 .../Queries/XQuery/Ghcnd/Partition-1/q04.xq     |   13 +
 .../XQuery/Ghcnd/Partition-1/q04_sensors.xq     |    8 +
 .../XQuery/Ghcnd/Partition-1/q04_stations.xq    |    8 +
 .../Queries/XQuery/Ghcnd/Partition-1/q05.xq     |   16 +
 .../Queries/XQuery/Ghcnd/Partition-1/q06.xq     |   13 +
 .../Queries/XQuery/Ghcnd/Partition-1/q07.xq     |   16 +
 .../Queries/XQuery/Ghcnd/Partition-2/q00.xq     |   11 +
 .../Queries/XQuery/Ghcnd/Partition-2/q01.xq     |    8 +
 .../Queries/XQuery/Ghcnd/Partition-2/q02.xq     |   11 +
 .../Queries/XQuery/Ghcnd/Partition-2/q03.xq     |    8 +
 .../Queries/XQuery/Ghcnd/Partition-2/q04.xq     |   13 +
 .../Queries/XQuery/Ghcnd/Partition-2/q05.xq     |   16 +
 .../Queries/XQuery/Ghcnd/Partition-2/q06.xq     |   13 +
 .../Queries/XQuery/Ghcnd/Partition-2/q07.xq     |   16 +
 .../Queries/XQuery/Ghcnd/Partition-4/q00.xq     |   11 +
 .../Queries/XQuery/Ghcnd/Partition-4/q01.xq     |    8 +
 .../Queries/XQuery/Ghcnd/Partition-4/q02.xq     |   11 +
 .../Queries/XQuery/Ghcnd/Partition-4/q03.xq     |    8 +
 .../Queries/XQuery/Ghcnd/Partition-4/q04.xq     |   13 +
 .../Queries/XQuery/Ghcnd/Partition-4/q05.xq     |   16 +
 .../Queries/XQuery/Ghcnd/Partition-4/q06.xq     |   13 +
 .../Queries/XQuery/Ghcnd/Partition-4/q07.xq     |   16 +
 .../quarter_1/sesnors/US000000001_200101_0.xml  |    1 +
 .../half_1/quarter_1/stations/US000000001.xml   |    1 +
 .../quarter_2/sesnors/US000000002_200202_0.xml  |    1 +
 .../half_1/quarter_2/stations/US000000004.xml   |    1 +
 .../quarter_3/sesnors/AS000000003_200303_0.xml  |    1 +
 .../half_2/quarter_3/stations/US000000002.xml   |    1 +
 .../quarter_4/sesnors/US000000004_200404_0.xml  |    1 +
 .../half_2/quarter_4/stations/AS000000003.xml   |    1 +
 vxquery-xtest/tests/XQTSCatalog.xml             |  955 ++++
 vxquery-xtest/tests/XQTSCatalog.xsd             | 1136 +++++
 vxquery-xtest/tests/XQTSCatalog.xsl             |  745 +++
 .../tests/XQTSCatalogSecondEdition.xml          | 3816 ++++++++++++++
 vxquery-xtest/tests/XQTSCatalogSubmission.xml   | 4774 ++++++++++++++++++
 .../tests/cat/GhcndPartition1Queries.xml        |   54 +
 .../tests/cat/GhcndPartition2Queries.xml        |   54 +
 .../tests/cat/GhcndPartition4Queries.xml        |   54 +
 66 files changed, 11939 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q00.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
new file mode 100644
index 0000000..06502bc
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q00.txt
@@ -0,0 +1,2 @@
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
new file mode 100644
index 0000000..82de09d
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
@@ -0,0 +1 @@
+<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q02.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q02.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q02.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q02.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q03.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q03.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q03.txt
new file mode 100644
index 0000000..f30101c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q03.txt
@@ -0,0 +1 @@
+3.3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q04.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
new file mode 100644
index 0000000..a1ca535
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q04.txt
@@ -0,0 +1,3 @@
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q05.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q05.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q05.txt
new file mode 100644
index 0000000..b123147
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q05.txt
@@ -0,0 +1 @@
+1.1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q06.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q06.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q06.txt
new file mode 100644
index 0000000..ca942fc
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q06.txt
@@ -0,0 +1,3 @@
+<displayName>Station 2</displayName>
+<date>2002-02-02T00:00:00.000</date>
+<value>32</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q07.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q07.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q07.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q07.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q00.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
new file mode 100644
index 0000000..06502bc
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q00.txt
@@ -0,0 +1,2 @@
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
new file mode 100644
index 0000000..82de09d
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
@@ -0,0 +1 @@
+<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q02.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q02.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q02.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q02.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q03.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q03.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q03.txt
new file mode 100644
index 0000000..f30101c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q03.txt
@@ -0,0 +1 @@
+3.3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q04.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
new file mode 100644
index 0000000..a1ca535
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q04.txt
@@ -0,0 +1,3 @@
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q05.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q05.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q05.txt
new file mode 100644
index 0000000..b123147
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q05.txt
@@ -0,0 +1 @@
+1.1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q06.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q06.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q06.txt
new file mode 100644
index 0000000..ca942fc
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q06.txt
@@ -0,0 +1,3 @@
+<displayName>Station 2</displayName>
+<date>2002-02-02T00:00:00.000</date>
+<value>32</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q07.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q07.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q07.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q07.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q00.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
new file mode 100644
index 0000000..06502bc
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q00.txt
@@ -0,0 +1,2 @@
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
new file mode 100644
index 0000000..82de09d
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
@@ -0,0 +1 @@
+<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q02.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q02.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q02.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q02.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q03.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q03.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q03.txt
new file mode 100644
index 0000000..f30101c
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q03.txt
@@ -0,0 +1 @@
+3.3
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q04.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
new file mode 100644
index 0000000..a1ca535
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q04.txt
@@ -0,0 +1,3 @@
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
+<data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q05.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q05.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q05.txt
new file mode 100644
index 0000000..b123147
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q05.txt
@@ -0,0 +1 @@
+1.1
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q06.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q06.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q06.txt
new file mode 100644
index 0000000..ca942fc
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q06.txt
@@ -0,0 +1,3 @@
+<displayName>Station 2</displayName>
+<date>2002-02-02T00:00:00.000</date>
+<value>32</value>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q07.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q07.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q07.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q07.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q00.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q00.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q00.xq
new file mode 100644
index 0000000..86241cd
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q00.xq
@@ -0,0 +1,11 @@
+(: XQuery Filter Query :)
+(: See historical data for Riverside, CA (AS000000003) station by selecting   :)
+(: the weather readings for December 25 over the last 10 years.               :)
+let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $r in collection($collection)/dataCollection/data
+let $datetime := xs:dateTime(fn:data($r/date))
+where $r/station eq "GHCND:AS000000003" 
+    and fn:year-from-dateTime($datetime) ge 2000
+    and fn:month-from-dateTime($datetime) eq 3 
+    and fn:day-from-dateTime($datetime) eq 3
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q01.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q01.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q01.xq
new file mode 100644
index 0000000..1572994
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q01.xq
@@ -0,0 +1,8 @@
+(: XQuery Filter Query :)
+(: Find all reading for hurricane force wind warning or extreme wind warning. :)
+(: The warnings occur when the wind speed (AWND) exceeds 110 mph (49.1744     :)
+(: meters per second). (Wind value is in tenth of a meter per second)         :)
+let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $r in collection($collection)/dataCollection/data
+where $r/dataType eq "AWND" and xs:decimal(fn:data($r/value)) gt 491.744
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q02.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q02.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q02.xq
new file mode 100644
index 0000000..d363fbf
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q02.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:sum(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q03.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q03.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q03.xq
new file mode 100644
index 0000000..75a8935
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q03.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:max(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04.xq
new file mode 100644
index 0000000..61452fb
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for Washington state for a specific day    :)
+(: 2002-2-2.                                                                  :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $r in collection($sensor_collection)/dataCollection/data
+    
+where $s/id eq $r/station 
+    and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "STATE 1"))
+    and xs:dateTime(fn:data($r/date)) eq xs:dateTime("2002-02-02T00:00:00.000")
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04_sensors.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04_sensors.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04_sensors.xq
new file mode 100644
index 0000000..18f5929
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04_sensors.xq
@@ -0,0 +1,8 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for Washington state for a specific day    :)
+(: 2002-2-2.                                                                  :)
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $r in collection($sensor_collection)/dataCollection/data
+    
+where xs:dateTime(fn:data($r/date)) eq xs:dateTime("2002-02-02T00:00:00.000")
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04_stations.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04_stations.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04_stations.xq
new file mode 100644
index 0000000..d7630f0
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q04_stations.xq
@@ -0,0 +1,8 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for Washington state for a specific day    :)
+(: 2002-2-2.                                                                  :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $s in collection($station_collection)/stationCollection/station
+
+where (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "STATE 1"))
+return $s
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q05.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q05.xq
new file mode 100644
index 0000000..df822a1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q05.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:min(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q06.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q06.xq
new file mode 100644
index 0000000..ed9bdb0
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q06.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each     :)
+(: day over the year 2002.                                                    :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+for $r in collection($sensor_collection)/dataCollection/data
+
+where $s/id eq $r/station
+    and $r/dataType eq "TMAX" 
+    and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q07.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q07.xq
new file mode 100644
index 0000000..d0e8c48
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-1/q07.xq
@@ -0,0 +1,16 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q00.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q00.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q00.xq
new file mode 100644
index 0000000..64636bc
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q00.xq
@@ -0,0 +1,11 @@
+(: XQuery Filter Query :)
+(: See historical data for Riverside, CA (AS000000003) station by selecting   :)
+(: the weather readings for December 25 over the last 10 years.               :)
+let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $r in collection($collection)/dataCollection/data
+let $datetime := xs:dateTime(fn:data($r/date))
+where $r/station eq "GHCND:AS000000003" 
+    and fn:year-from-dateTime($datetime) ge 2000
+    and fn:month-from-dateTime($datetime) eq 3 
+    and fn:day-from-dateTime($datetime) eq 3
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q01.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q01.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q01.xq
new file mode 100644
index 0000000..4e1edc5
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q01.xq
@@ -0,0 +1,8 @@
+(: XQuery Filter Query :)
+(: Find all reading for hurricane force wind warning or extreme wind warning. :)
+(: The warnings occur when the wind speed (AWND) exceeds 110 mph (49.1744     :)
+(: meters per second). (Wind value is in tenth of a meter per second)         :)
+let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $r in collection($collection)/dataCollection/data
+where $r/dataType eq "AWND" and xs:decimal(fn:data($r/value)) gt 491.744
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q02.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q02.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q02.xq
new file mode 100644
index 0000000..fac6bf0
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q02.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:sum(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q03.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q03.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q03.xq
new file mode 100644
index 0000000..ce3d0d3
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q03.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:max(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q04.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q04.xq
new file mode 100644
index 0000000..5d6d1d1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q04.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for Washington state for a specific day    :)
+(: 2002-2-2.                                                                  :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $r in collection($sensor_collection)/dataCollection/data
+    
+where $s/id eq $r/station 
+    and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "STATE 1"))
+    and xs:dateTime(fn:data($r/date)) eq xs:dateTime("2002-02-02T00:00:00.000")
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q05.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q05.xq
new file mode 100644
index 0000000..15b98c1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q05.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:min(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q06.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q06.xq
new file mode 100644
index 0000000..df17713
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q06.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each     :)
+(: day over the year 2002.                                                    :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+for $r in collection($sensor_collection)/dataCollection/data
+
+where $s/id eq $r/station
+    and $r/dataType eq "TMAX" 
+    and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q07.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q07.xq
new file mode 100644
index 0000000..2debae0
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-2/q07.xq
@@ -0,0 +1,16 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q00.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q00.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q00.xq
new file mode 100644
index 0000000..e130e2a
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q00.xq
@@ -0,0 +1,11 @@
+(: XQuery Filter Query :)
+(: See historical data for Riverside, CA (AS000000003) station by selecting   :)
+(: the weather readings for December 25 over the last 10 years.               :)
+let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $r in collection($collection)/dataCollection/data
+let $datetime := xs:dateTime(fn:data($r/date))
+where $r/station eq "GHCND:AS000000003" 
+    and fn:year-from-dateTime($datetime) ge 2000
+    and fn:month-from-dateTime($datetime) eq 3 
+    and fn:day-from-dateTime($datetime) eq 3
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q01.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q01.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q01.xq
new file mode 100644
index 0000000..bad94e4
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q01.xq
@@ -0,0 +1,8 @@
+(: XQuery Filter Query :)
+(: Find all reading for hurricane force wind warning or extreme wind warning. :)
+(: The warnings occur when the wind speed (AWND) exceeds 110 mph (49.1744     :)
+(: meters per second). (Wind value is in tenth of a meter per second)         :)
+let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $r in collection($collection)/dataCollection/data
+where $r/dataType eq "AWND" and xs:decimal(fn:data($r/value)) gt 491.744
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q02.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q02.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q02.xq
new file mode 100644
index 0000000..f4c2722
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q02.xq
@@ -0,0 +1,11 @@
+(: XQuery Aggregate Query :)
+(: Find the annual precipitation (PRCP) for a Seattle using the airport       :)
+(: station (US000000002) for 2002.                                            :)
+fn:sum(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/station eq "GHCND:US000000002" 
+        and $r/dataType eq "PRCP" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q03.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q03.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q03.xq
new file mode 100644
index 0000000..7199c97
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q03.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest recorded temperature (TMAX) in Celsius.                   :)
+fn:max(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX"
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q04.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q04.xq
new file mode 100644
index 0000000..cdf85dd
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q04.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find all the weather readings for Washington state for a specific day    :)
+(: 2002-2-2.                                                                  :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $r in collection($sensor_collection)/dataCollection/data
+    
+where $s/id eq $r/station 
+    and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "STATE 1"))
+    and xs:dateTime(fn:data($r/date)) eq xs:dateTime("2002-02-02T00:00:00.000")
+return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q05.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q05.xq
new file mode 100644
index 0000000..5036305
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q05.xq
@@ -0,0 +1,16 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+fn:min(
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q06.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q06.xq
new file mode 100644
index 0000000..51c474d
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q06.xq
@@ -0,0 +1,13 @@
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each     :)
+(: day over the year 2002.                                                    :)
+let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+for $r in collection($sensor_collection)/dataCollection/data
+
+where $s/id eq $r/station
+    and $r/dataType eq "TMAX" 
+    and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2002
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q07.xq b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q07.xq
new file mode 100644
index 0000000..a508e52
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Ghcnd/Partition-4/q07.xq
@@ -0,0 +1,16 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
new file mode 100644
index 0000000..bb0124e
--- /dev/null
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="3"><data><date>2001-01-01T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000001</station><value>11</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2001-01-01T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000001</station><value>31</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/stations/US000000001.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/stations/US000000001.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/stations/US000000001.xml
new file mode 100644
index 0000000..213f748
--- /dev/null
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/stations/US000000001.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stationCollection pageSize="100" pageCount="1" totalCount="1"><station><id>GHCND:US000000001</id><displayName>Station 1</displayName><latitude>10.000</latitude><longitude>-10.000</longitude><elevation>1000.0</elevation><locationLabels><type>ST</type><id>FIPS:1</id><displayName>State 1</displayName></locationLabels><locationLabels><type>CNTY</type><id>FIPS:-9999</id><displayName>County 1</displayName></locationLabels><locationLabels><type>CNTRY</type><id>FIPS:US</id><displayName>UNITED STATES</displayName></locationLabels></station></stationCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
new file mode 100644
index 0000000..b4a7897
--- /dev/null
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="3"><data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/stations/US000000004.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/stations/US000000004.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/stations/US000000004.xml
new file mode 100644
index 0000000..3bcec27
--- /dev/null
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/stations/US000000004.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stationCollection pageSize="100" pageCount="1" totalCount="1"><station><id>GHCND:US000000004</id><displayName>Station 4</displayName><latitude>40.000</latitude><longitude>-40.000</longitude><elevation>4000.0</elevation><locationLabels><type>ST</type><id>FIPS:1</id><displayName>State 4</displayName></locationLabels><locationLabels><type>CNTY</type><id>FIPS:-9999</id><displayName>County 4</displayName></locationLabels><locationLabels><type>CNTRY</type><id>FIPS:US</id><displayName>UNITED STATES</displayName></locationLabels></station></stationCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
new file mode 100644
index 0000000..6a23ab6
--- /dev/null
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="2"><data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/stations/US000000002.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/stations/US000000002.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/stations/US000000002.xml
new file mode 100644
index 0000000..e9dc6e9
--- /dev/null
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/stations/US000000002.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stationCollection pageSize="100" pageCount="1" totalCount="1"><station><id>GHCND:US000000002</id><displayName>Station 2</displayName><latitude>20.000</latitude><longitude>-20.000</longitude><elevation>2000.0</elevation><locationLabels><type>ST</type><id>FIPS:1</id><displayName>State 1</displayName></locationLabels><locationLabels><type>CNTY</type><id>FIPS:-9999</id><displayName>County 2</displayName></locationLabels><locationLabels><type>CNTRY</type><id>FIPS:US</id><displayName>UNITED STATES</displayName></locationLabels></station></stationCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/sesnors/US000000004_200404_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/sesnors/US000000004_200404_0.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/sesnors/US000000004_200404_0.xml
new file mode 100644
index 0000000..2dbe586
--- /dev/null
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/sesnors/US000000004_200404_0.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="2"><data><date>2004-04-04T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000004</station><value>40</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2004-04-04T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000004</station><value>4</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/stations/AS000000003.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/stations/AS000000003.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/stations/AS000000003.xml
new file mode 100644
index 0000000..4919c20
--- /dev/null
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/stations/AS000000003.xml
@@ -0,0 +1 @@
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><stationCollection pageSize="100" pageCount="1" totalCount="1"><station><id>GHCND:AS000000003</id><displayName>Station 3</displayName><latitude>-30.000</latitude><longitude>30.000</longitude><locationLabels><type>CNTRY</type><id>FIPS:AS</id><displayName>AUSTRALIA</displayName></locationLabels></station></stationCollection>
\ No newline at end of file


[49/50] [abbrv] git commit: Found some files missing from the last commit for aggregate tests.

Posted by pr...@apache.org.
Found some files missing from the last commit for aggregate tests.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/3d64ae33
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/3d64ae33
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/3d64ae33

Branch: refs/heads/prestonc/hash_join
Commit: 3d64ae3399af8a20eadce8b9da0929c910471a0a
Parents: 7cde080
Author: Preston Carman <pr...@apache.org>
Authored: Tue Apr 1 17:06:57 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:26 2014 -0700

----------------------------------------------------------------------
 .../tests/ExpectedTestResults/Aggregate/Partition-1/avg.txt  | 1 +
 .../ExpectedTestResults/Aggregate/Partition-1/count.txt      | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-1/max.txt  | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-1/min.txt  | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-1/sum.txt  | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-2/avg.txt  | 1 +
 .../ExpectedTestResults/Aggregate/Partition-2/count.txt      | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-2/max.txt  | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-2/min.txt  | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-2/sum.txt  | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-4/avg.txt  | 1 +
 .../ExpectedTestResults/Aggregate/Partition-4/count.txt      | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-4/max.txt  | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-4/min.txt  | 1 +
 .../tests/ExpectedTestResults/Aggregate/Partition-4/sum.txt  | 1 +
 .../tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt      | 2 +-
 .../tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt      | 2 +-
 .../tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt      | 2 +-
 .../tests/Queries/XQuery/Aggregate/Partition-1/avg.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-1/count.xq      | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-1/max.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-1/min.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-1/sum.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-2/avg.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-2/count.xq      | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-2/max.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-2/min.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-2/sum.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-4/avg.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-4/count.xq      | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-4/max.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-4/min.xq        | 8 ++++++++
 .../tests/Queries/XQuery/Aggregate/Partition-4/sum.xq        | 8 ++++++++
 33 files changed, 138 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/avg.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/avg.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/avg.txt
new file mode 100644
index 0000000..7ef6ffe
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/avg.txt
@@ -0,0 +1 @@
+12.5
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/count.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/count.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/count.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/max.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/max.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/max.txt
new file mode 100644
index 0000000..dc7b54a
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/max.txt
@@ -0,0 +1 @@
+33
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/min.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/min.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/min.txt
new file mode 100644
index 0000000..ea1acb6
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/min.txt
@@ -0,0 +1 @@
+11.25
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/sum.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/sum.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/sum.txt
new file mode 100644
index 0000000..2b82dfe
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-1/sum.txt
@@ -0,0 +1 @@
+60
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/avg.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/avg.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/avg.txt
new file mode 100644
index 0000000..7ef6ffe
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/avg.txt
@@ -0,0 +1 @@
+12.5
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/count.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/count.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/count.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/max.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/max.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/max.txt
new file mode 100644
index 0000000..dc7b54a
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/max.txt
@@ -0,0 +1 @@
+33
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/min.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/min.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/min.txt
new file mode 100644
index 0000000..ea1acb6
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/min.txt
@@ -0,0 +1 @@
+11.25
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/sum.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/sum.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/sum.txt
new file mode 100644
index 0000000..2b82dfe
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-2/sum.txt
@@ -0,0 +1 @@
+60
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/avg.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/avg.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/avg.txt
new file mode 100644
index 0000000..7ef6ffe
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/avg.txt
@@ -0,0 +1 @@
+12.5
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/count.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/count.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/count.txt
new file mode 100644
index 0000000..d8263ee
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/count.txt
@@ -0,0 +1 @@
+2
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/max.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/max.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/max.txt
new file mode 100644
index 0000000..dc7b54a
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/max.txt
@@ -0,0 +1 @@
+33
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/min.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/min.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/min.txt
new file mode 100644
index 0000000..ea1acb6
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/min.txt
@@ -0,0 +1 @@
+11.25
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/sum.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/sum.txt b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/sum.txt
new file mode 100644
index 0000000..2b82dfe
--- /dev/null
+++ b/vxquery-xtest/tests/ExpectedTestResults/Aggregate/Partition-4/sum.txt
@@ -0,0 +1 @@
+60
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
index 82de09d..ff4bc9b 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-1/q01.txt
@@ -1 +1 @@
-<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
+<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
index 82de09d..ff4bc9b 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-2/q01.txt
@@ -1 +1 @@
-<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
+<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
index 82de09d..ff4bc9b 100644
--- a/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
+++ b/vxquery-xtest/tests/ExpectedTestResults/Ghcnd/Partition-4/q01.txt
@@ -1 +1 @@
-<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute/><attribute/><attribute>a</attribute><attribute/></attributes></data>
\ No newline at end of file
+<data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/avg.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/avg.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/avg.xq
new file mode 100644
index 0000000..12cfc02
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/avg.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the average minimum temperature.                                            :)
+fn:avg(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMIN" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/count.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/count.xq
new file mode 100644
index 0000000..3a2609b
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the number of wind sensor readings.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "AWND" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/max.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/max.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/max.xq
new file mode 100644
index 0000000..161b409
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/max.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest max temperature.                                            :)
+fn:max(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/min.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/min.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/min.xq
new file mode 100644
index 0000000..0a135d1
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/min.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the lowest min temperature.                                            :)
+fn:min(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMIN" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/sum.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/sum.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/sum.xq
new file mode 100644
index 0000000..91a2c4c
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-1/sum.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the total precipitation.                                            :)
+fn:sum(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "PRCP" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/avg.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/avg.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/avg.xq
new file mode 100644
index 0000000..864fdb9
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/avg.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the average minimum temperature.                                            :)
+fn:avg(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMIN" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/count.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/count.xq
new file mode 100644
index 0000000..3ad16b6
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the number of wind sensor readings.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "AWND" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/max.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/max.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/max.xq
new file mode 100644
index 0000000..82b1061
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/max.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest max temperature.                                            :)
+fn:max(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/min.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/min.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/min.xq
new file mode 100644
index 0000000..d990aff
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/min.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the lowest min temperature.                                            :)
+fn:min(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMIN" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/sum.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/sum.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/sum.xq
new file mode 100644
index 0000000..8c9bea9
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-2/sum.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the total precipitation.                                            :)
+fn:sum(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "PRCP" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/avg.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/avg.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/avg.xq
new file mode 100644
index 0000000..d50166d
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/avg.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the average minimum temperature.                                            :)
+fn:avg(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMIN" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/count.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/count.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/count.xq
new file mode 100644
index 0000000..cebf3e6
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/count.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the number of wind sensor readings.                                            :)
+fn:count(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "AWND" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/max.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/max.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/max.xq
new file mode 100644
index 0000000..ba4f771
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/max.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the highest max temperature.                                            :)
+fn:max(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMAX" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/min.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/min.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/min.xq
new file mode 100644
index 0000000..b37f462
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/min.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the lowest min temperature.                                            :)
+fn:min(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "TMIN" 
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3d64ae33/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/sum.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/sum.xq b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/sum.xq
new file mode 100644
index 0000000..c41c7b6
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/Aggregate/Partition-4/sum.xq
@@ -0,0 +1,8 @@
+(: XQuery Aggregate Query :)
+(: Find the total precipitation.                                            :)
+fn:sum(
+    let $collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($collection)/dataCollection/data
+    where $r/dataType eq "PRCP" 
+    return $r/value
+)
\ No newline at end of file


[21/50] [abbrv] git commit: Switched from using shared datasources to a single datasource per data scan.

Posted by pr...@apache.org.
Switched from using shared datasources to a single datasource per data scan.

Fixes an issue with self join and pushing child path steps onto the data source scan.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/3171202a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/3171202a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/3171202a

Branch: refs/heads/prestonc/hash_join
Commit: 3171202ae93f4f2cce06886d67131adc0b51f360
Parents: 74a22a3
Author: Preston Carman <pr...@apache.org>
Authored: Fri Mar 14 22:07:00 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../rewriter/VXQueryOptimizationContext.java         | 14 ++++++++++++++
 .../rewriter/rules/IntroduceCollectionRule.java      | 15 +++++++++++++--
 .../VXQueryCollectionOperatorDescriptor.java         |  1 -
 3 files changed, 27 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3171202a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/VXQueryOptimizationContext.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/VXQueryOptimizationContext.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/VXQueryOptimizationContext.java
index a763649..f86b9d6 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/VXQueryOptimizationContext.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/VXQueryOptimizationContext.java
@@ -38,6 +38,8 @@ public class VXQueryOptimizationContext extends AlgebricksOptimizationContext {
     private final Map<ILogicalOperator, Cardinality> cardinalityOperatorMap = new HashMap<ILogicalOperator, Cardinality>();
 
     private final Map<String, VXQueryCollectionDataSource> dataSourceScanMap = new HashMap<String, VXQueryCollectionDataSource>();
+    private int totalDataSources = 0;
+    private int collectionId = 0;
 
     public VXQueryOptimizationContext(int varCounter, IExpressionEvalSizeComputer expressionEvalSizeComputer,
             IMergeAggregationExpressionFactory mergeAggregationExpressionFactory,
@@ -63,6 +65,18 @@ public class VXQueryOptimizationContext extends AlgebricksOptimizationContext {
         this.dataSourceScanMap.put(collectionName, ds);
     }
 
+    public void incrementTotalDataSources() {
+        totalDataSources++;
+    }
+
+    public int getTotalDataSources() {
+        return totalDataSources;
+    }
+
+    public int newCollectionId() {
+        return ++collectionId;
+    }
+
     public Cardinality getCardinalityOperatorMap(ILogicalOperator op) {
         if (cardinalityOperatorMap.containsKey(op)) {
             return cardinalityOperatorMap.get(op);

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3171202a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceCollectionRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceCollectionRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceCollectionRule.java
index cbe1008..bc8d58a 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceCollectionRule.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceCollectionRule.java
@@ -16,9 +16,15 @@
  */
 package org.apache.vxquery.compiler.rewriter.rules;
 
+import java.util.ArrayList;
+import java.util.List;
+
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.vxquery.compiler.rewriter.VXQueryOptimizationContext;
 import org.apache.vxquery.metadata.VXQueryCollectionDataSource;
+import org.apache.vxquery.types.AnyItemType;
+import org.apache.vxquery.types.Quantifier;
+import org.apache.vxquery.types.SequenceType;
 
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalOperator;
@@ -69,9 +75,14 @@ public class IntroduceCollectionRule extends AbstractCollectionRule {
 
         if (collectionName != null) {
             // Build the new operator and update the query plan.
-            VXQueryCollectionDataSource ds = vxqueryContext.getCollectionDataSourceMap(collectionName);
+            int collectionId = vxqueryContext.newCollectionId();
+            List<Object> types = new ArrayList<Object>();
+            types.add(SequenceType.create(AnyItemType.INSTANCE, Quantifier.QUANT_STAR));
+
+            VXQueryCollectionDataSource ds = new VXQueryCollectionDataSource(collectionId, collectionName,
+                    types.toArray());
             if (ds != null) {
-                ds.setTotalDataSources(vxqueryContext.getCollectionDataSourceMapSize());
+                ds.setTotalDataSources(vxqueryContext.getTotalDataSources());
 
                 // Known to be true because of collection name.
                 AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/3171202a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java
index 593b8ad..5cc2276 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionOperatorDescriptor.java
@@ -30,7 +30,6 @@ import org.apache.vxquery.exceptions.SystemException;
 import org.apache.vxquery.runtime.functions.step.ChildPathStepOperatorDescriptor;
 import org.apache.vxquery.runtime.functions.util.FunctionHelper;
 import org.apache.vxquery.xmlparser.ITreeNodeIdProvider;
-import org.apache.vxquery.xmlparser.SAXContentHandler;
 import org.apache.vxquery.xmlparser.TreeNodeIdProvider;
 import org.apache.vxquery.xmlparser.XMLParser;
 import org.xml.sax.InputSource;


[44/50] [abbrv] New weather benchmark test suite that includes tests for 1, 2, and 4 partitions of data.

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/XQTSCatalogSubmission.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/XQTSCatalogSubmission.xml b/vxquery-xtest/tests/XQTSCatalogSubmission.xml
new file mode 100644
index 0000000..1ce710e
--- /dev/null
+++ b/vxquery-xtest/tests/XQTSCatalogSubmission.xml
@@ -0,0 +1,4774 @@
+<?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="XQTSCatalog.xsl" ?><test-suite xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" CatalogDesignDate="2003-04-03" version="1.0.3" SourceOffsetPath="./" ResultOffsetPath="ExpectedTestResults/" XQueryQueryOffsetPath="Queries/XQuery/" XQueryXQueryOffsetPath="Queries/XQueryX/" XQueryFileExtension=".xq" XQueryXFileExtension=".xqx" xsi:schemaLocation="http://www.w3.org/2005/02/query-test-XQTSCatalog XQTSCatalog.xsd">
+<test-suite-info>
+<title>XQuery Test Suite 1.0.3 (under development)</title>
+<description> 
+         Test Suite for XQuery 1.0. 
+         See http://www.w3.org/XML/Query/test-suite/. 
+    </description>
+</test-suite-info>
+<citations>
+<citation-spec name="XQuery">
+<description last-mod="2007-01-23">XQuery 1.0: An XML Query Language</description>
+<spec-URI>http://www.w3.org/TR/xquery/</spec-URI>
+</citation-spec>
+<citation-spec name="FuncOps">
+<description last-mod="2007-01-23">XQuery 1.0 and XPath 2.0 Functions and Operators</description>
+<spec-URI>http://www.w3.org/TR/xpath-functions/</spec-URI>
+</citation-spec>
+<citation-spec name="DataModel">
+<description last-mod="2007-01-23">XQuery 1.0 and XPath 2.0 Data Model</description>
+<spec-URI>http://www.w3.org/TR/xpath-datamodel/</spec-URI>
+</citation-spec>
+<citation-spec name="FormalSemantics">
+<description last-mod="2007-01-23">XQuery 1.0 and XPath 2.0 Formal Semantics</description>
+<spec-URI>http://www.w3.org/TR/xquery-semantics/</spec-URI>
+</citation-spec>
+<citation-spec name="SchemaPart2">
+<description last-mod="2003-03-25">XML Schema Part 2: Datatypes</description>
+<spec-URI>http://www.w3.org/TR/xmlschema-2/</spec-URI>
+</citation-spec>
+<citation-spec name="Schema-Errata">
+<description last-mod="2003-03-25">XML Schema Errata</description>
+<note>Current practice is to have one Errata document for all parts of Schema.</note>
+<spec-URI>http://www.w3.org/2001/05/xmlschema-errata</spec-URI>
+</citation-spec>
+<citation-spec name="UseCases">
+<description last-mod="2006-07-12">XML Query Use Cases</description>
+<spec-URI>http://www.w3c.org/TR/xquery-use-cases/</spec-URI>
+</citation-spec>
+<citation-spec name="XQueryX">
+<description last-mod="2007-01-23">XML Syntax for XQuery 1.0 (XQueryX)</description>
+<spec-URI>http://www.w3.org/TR/xqueryx/</spec-URI>
+</citation-spec>
+<citation-spec name="Serialization">
+<description last-mod="2007-01-23">XSLT 2.0 and XQuery 1.0 Serialization</description>
+<spec-URI>http://www.w3.org/TR/xslt-xquery-serialization/</spec-URI>
+</citation-spec>
+</citations>
+<comparisons>
+<comparison name="XML">
+<description last-mod="2003-03-25">The XML InfoSets should be canonicalized and compared.</description>
+</comparison>
+<comparison name="Fragment">
+<description last-mod="2004-10-20">
+            A 'fragment' refers to an XML based instance which has multiple top-level elements and NO XML declaration.
+            The comparator for this should simply wrap the entire fragment in a container element and perform XML comparison.
+         </description>
+</comparison>
+<comparison name="Text">
+<description last-mod="2003-03-25">
+            Each line of non-whitespace text should match. New-line sequences
+            may vary and should be neutralized. Due to issues with the XML serialization of certain characters (e.g. '&lt;'),
+            it is not possible to simply compare the actual and expected results. Rather (as is the case with the 'Fragment' comparator)
+            the test harness should convert the results into valid XML (by adding a container element) and perform comparison
+            on the XML canonicalized versions of the results.
+         </description>
+</comparison>
+<comparison name="Ignore">
+<description last-mod="2003-03-25">
+            Only the presence/absence of this file is significant,
+            not its content.
+         </description>
+</comparison>
+<comparison name="Inspect">
+<description last-mod="2003-03-25">
+            Automated comparison is not possible. the output should be
+            inspected by a human.
+         </description>
+</comparison>
+</comparisons>
+<roles>
+<role name="principal-data">
+<description last-mod="2003-03-25">
+            This is the source that is handed in to the processor as the
+            initial input sequence, setting the "evaluation context" as described in XQuery chapter 2.
+         </description>
+</role>
+<role name="supplemental-data">
+<description last-mod="2003-03-25">
+            These are sources that may be read by functions such as
+            fn:document() as the query is evaluated.
+         </description>
+</role>
+<role name="schema">
+<description last-mod="2003-03-25">
+            These are schema definitions that may be referenced by sources
+            or in the query.
+         </description>
+</role>
+<role name="dtd">
+<description last-mod="2003-03-25">
+            These are dtd definitions that may be referenced by sources
+            or in the query.
+         </description>
+</role>
+<role name="principal">
+<description last-mod="2003-03-25">
+            This is an output (either text or XML) that will contain the
+            query results. If the processor invocation sequence accepts a filename for results, this name may be
+            passed, possibly prefixed by a partial directory path to allow storage of the results in a separate
+            directory tree.
+         </description>
+</role>
+<role name="console-log">
+<description last-mod="2003-03-25">
+            This is an output (text file tagged .log) that will contain the
+            captured "console" output for a command-line invocation, or equivalent messages from a harness. The
+            main goal is to capture error messages that came from the processor.
+         </description>
+<note>
+            A test lab may choose to capture console output for every test case, in which case the presence
+            of this element is a signal that the console log of this test contains messages that are significant to
+            the pass/fail determination.
+         </note>
+</role>
+</roles>
+<scenarios>
+<scenario name="standard">
+<description last-mod="2005-06-10">
+            A query this is expected to produce valid results. Principal input should always be specified, even if the query doesn't have any PathExpr.
+         </description>
+</scenario>
+<scenario name="parse-error">
+<description last-mod="2005-06-10">
+            A query this is expected to raise a parsing/syntax error at query parse time. Principal input should always be specified, even if the query doesn't have any PathExpr.
+         </description>
+</scenario>
+<scenario name="runtime-error">
+<description last-mod="2005-06-10">
+            A query this is expected to raise a runtime error at query parse time. Runtime errors in this case include those raised by static typing rules. Principal input should always be specified, even if the query doesn't have any PathExpr.
+         </description>
+</scenario>
+<scenario name="trivial">
+<description last-mod="2006-03-29">
+            A query this is expected to produce valid results. Principal input should always be specified, even if the query doesn't have any PathExpr.
+            The initial query returns an &lt;xqx:xquery&gt; element (Trivial Embedding of XQuery).
+            This embedded query is then executed to produce the final result.
+         </description>
+</scenario>
+</scenarios>
+<sources>
+<source ID="XQTSCatalog" FileName="XQTSCatalog.xml" Creator="XQuery Test Task Force" schema="XQTSCatalogxsd">
+<description last-mod="2005-04-14">XQuery Test Suite Catalog</description>
+</source>
+<source ID="bib2" FileName="TestSources/bib2.xml" Creator="spec-authors">
+<description last-mod="2003-03-25">Bibliography example with extra comments and PIs.</description>
+</source>
+<source ID="emptydoc" FileName="TestSources/emptydoc.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Contains just a "doc" element, no comments/text/PIs.</description>
+</source>
+<source ID="fsx" FileName="TestSources/fsx.xml" Creator="Mike Rorke">
+<description last-mod="2003-03-25">Data about a filesystem represented in XML.</description>
+</source>
+<source ID="fsx_NS" FileName="TestSources/fsx_NS.xml" Creator="Mike Rorke">
+<description last-mod="2003-03-25">Data about a filesystem represented in XML with namespace-qualified names.</description>
+</source>
+<source ID="MixNS" FileName="TestSources/MixNS.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Small tree with element names in mixed namespaces.</description>
+<note>Use @index to identify elements precisely.</note>
+</source>
+<source ID="nw_Customers" FileName="TestSources/nw_Customers.xml" Creator="Kuen Siew">
+<description last-mod="2003-03-25">Customer name/address file with some non-ASCII characters.</description>
+</source>
+<source ID="TopMany" FileName="TestSources/TopMany.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Like TreeCompass, but with comments and PIs off the root. PI targets vary.</description>
+<note>All text nodes must have non-whitespace characters.</note>
+</source>
+<source ID="Tree1Child" FileName="TestSources/Tree1Child.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has just one child, of an abnormal name, off the center node.</description>
+<note>One attribute each on west and center.</note>
+</source>
+<source ID="Tree1Text" FileName="TestSources/Tree1Text.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has just a text node and no child element off the center node.</description>
+</source>
+<source ID="TreeCompass" FileName="TestSources/TreeCompass.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A tree intended to allow many kinds of path expressions.</description>
+<note>Need multiple attributes on center, west, and south, plus @mark scattered around.</note>
+<note>Mix of text and element children in many places, but east should have only a text node.</note>
+<note>All text nodes must have non-whitespace characters.</note>
+<note>Top element is far-north.</note>
+</source>
+<source ID="TreeEmpty" FileName="TestSources/TreeEmpty.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has just one "south" element at the top, bearing one "mark" attribute.</description>
+</source>
+<source ID="TreeRepeat" FileName="TestSources/TreeRepeat.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has center elements off the real center node.</description>
+<note>Use @mark to distinguish center elements.</note>
+<note>"Real" center must have multiple element children, some with duplicate names (south-east).</note>
+<note>Repeating attribute names used, including same name on elements of the same name.</note>
+<note>Comments and text nodes are strewn about. All text nodes must have non-whitespace characters.</note>
+</source>
+<source ID="TreeStack" FileName="TestSources/TreeStack.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has several "south" elements, some stacked within each other.</description>
+<note>Use "mark" attributes at several levels and on all south elements.</note>
+</source>
+<source ID="TreeTrunc" FileName="TestSources/TreeTrunc.xml" Creator="David Marston">
+<description last-mod="2003-03-25">A "compass" tree that has no content at all in center or west, no attributes anywhere.</description>
+</source>
+<source ID="xq311A" FileName="TestSources/xq311A.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Data that fits first example in XQuery 3.11.</description>
+</source>
+<source ID="xq311B" FileName="TestSources/xq311B.xml" Creator="David Marston">
+<description last-mod="2003-03-25">Data that fits later examples in XQuery 3.11.</description>
+</source>
+<source ID="DupNode" FileName="TestSources/DupNode.xml" Creator="Andreas Behm">
+<description last-mod="2005-04-26">Simple document with all node kinds</description>
+</source>
+<source ID="inscope" FileName="TestSources/inscope.xml" Creator="Andreas Behm">
+<description last-mod="2005-08-26">Simple document with namespaces</description>
+</source>
+<source ID="nsmode" FileName="TestSources/nsmode.xml" Creator="Andreas Behm">
+<description last-mod="2005-04-26">Source document for namespace copy modes</description>
+</source>
+<source ID="works" FileName="TestSources/works.xml" Creator="Carmelo Montanez">
+<description last-mod="2005-03-04">Data for various NIST tests</description>
+</source>
+<source ID="examples" FileName="TestSources/examples.xml" Creator="Carmelo Montanez" schema="examplesxsd">
+<description last-mod="2006-05-19">Data for fn-data-1 test.</description>
+</source>
+<source ID="works-mod" FileName="TestSources/works-mod.xml" Creator="Carmelo Montanez">
+<description last-mod="2005-03-04">Data for various NIST tests (abbreviated, unabbreviated syntax)</description>
+</source>
+<source ID="lang" FileName="TestSources/lang.xml" Creator="Carmelo Montanez">
+<description last-mod="2005-10-19">Data for fn:lang tests.</description>
+</source>
+<source ID="staff" FileName="TestSources/staff.xml" Creator="Carmelo Montanez">
+<description last-mod="2005-03-04">Data for various NIST tests</description>
+</source>
+<source ID="acme_corp" FileName="TestSources/acme_corp.xml" Creator="Ravindranath Chennoju">
+<description last-mod="2005-08-30">Source document for Function Declaration tests</description>
+</source>
+<source ID="bib" FileName="TestSources/bib.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+</source>
+<source ID="reviews" FileName="TestSources/reviews.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+</source>
+<source ID="books" FileName="TestSources/books.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+</source>
+<source ID="prices" FileName="TestSources/prices.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+</source>
+<source ID="book" FileName="TestSources/book.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query TREE use cases</description>
+</source>
+<source ID="report1" FileName="TestSources/report1.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query SEQ use cases</description>
+</source>
+<source ID="items" FileName="TestSources/items.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+</source>
+<source ID="bids" FileName="TestSources/bids.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+</source>
+<source ID="users" FileName="TestSources/users.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+</source>
+<source ID="string" FileName="TestSources/string.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query STRING use cases</description>
+</source>
+<source ID="company-data" FileName="TestSources/company-data.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query STRING use cases</description>
+</source>
+<source ID="auction" FileName="TestSources/auction.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query NS use cases</description>
+</source>
+<source ID="partlist" FileName="TestSources/partlist.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query PARTS use cases</description>
+</source>
+<source ID="sgml" FileName="TestSources/sgml.xml" Creator="XML Query WG">
+<description last-mod="2005-02-11">Data for the the XML Query SGML use cases</description>
+</source>
+<source ID="atomic" FileName="TestSources/atomic.xml" Creator="Carmelo Montanez" schema="atomicxsd">
+<description last-mod="2005-03-08">A Schema validated xml file, that contains values for data types. Can be used by any test.</description>
+</source>
+<source ID="id-idref-dtd" FileName="TestSources/iddtd.xml" Creator="Carmelo Montanez">
+<description last-mod="2006-06-28">A DTD validated xml file, that contains data for the ID/IDREF function tests.</description>
+</source>
+<source ID="atomicns" FileName="TestSources/atomicns.xml" Creator="Carmelo Montanez">
+<description last-mod="2006-03-15">A non schema validated xml file, that contains values for data types. Can be used by any test.</description>
+</source>
+<source ID="orderData" FileName="TestSources/orderData.xml" Creator="Carmelo Montanez" schema="orderDataxsd">
+<description last-mod="2005-06-01">A Schema validated xml file, that contains values for some of the order by tests generated by NIST.</description>
+</source>
+<source ID="id-idref" FileName="TestSources/id.xml" Creator="Carmelo Montanez" schema="idxsd">
+<description last-mod="2006-05-12">Data for id and idref related functions (schema-based).</description>
+</source>
+<source ID="id-idref2" FileName="TestSources/id2.xml" Creator="Michael Kay" schema="idxsd">
+<description last-mod="2009-03-06">More data for id and idref related functions (schema-based).</description>
+</source>
+<source ID="SpecialTypes" FileName="TestSources/SpecialTypes.xml" Creator="Mike Rorke" schema="SpecialTypesXSD">
+<description last-mod="2005-06-01">A Schema validated XML file containing certain special types e.g. interleave types, union types, anySimpleType</description>
+</source>
+<source ID="QNameSource" FileName="TestSources/QName-source.xml" Creator="Mike Rorke" schema="QNameSourceXSD">
+<description last-mod="2005-09-28">A schema validated XML file containing QName and QName derived types.</description>
+</source>
+<source ID="notation" FileName="TestSources/notation.xml" Creator="Andreas Behm" schema="notationschema">
+<description last-mod="2005-10-10">A Scehma validated xml file with NOTATION elements</description>
+</source>
+<source ID="textWithSpaces" FileName="TestSources/textWithSpaces.xml" Creator="Joanne Tong">
+<description last-mod="2005-09-29">Data for normalize-space functions</description>
+</source>
+<source ID="XMarkAuction" FileName="TestSources/XMarkAuction.xml" Creator="Frans Englich">
+<description last-mod="2007-03-09">Source file generated XML Benchmark Project's xmlgen utility. See http://www.xml-benchmark.org/.</description>
+</source>
+<source ID="CPPGlobals" FileName="TestSources/CPPGlobals.xml" Creator="Frans Englich">
+<description last-mod="2007-06-27">The declarations of a C++ file described in XML.</description>
+</source>
+<source ID="MainWindow" FileName="TestSources/MainWindow.ui" Creator="Frans Englich">
+<description last-mod="2007-07-09">A description of an graphical user interface.</description>
+</source>
+<source ID="ComplexWhitespace" FileName="TestSources/ComplexWhitespace.xml" Creator="Frans Englich">
+<description last-mod="2007-07-09">A file containing different forms of whitespace.</description>
+</source>
+<source ID="SpaceBracket" FileName="TestSources/SpaceBracket.xml" Creator="Frans Englich">
+<description last-mod="2007-12-20">A file containing ' ]' as a text node.</description>
+</source>
+<source ID="HighUnicode" FileName="TestSources/HighUnicode.xml" Creator="Frans Englich">
+<description last-mod="2007-12-20">Corner case unicode codepoints.</description>
+</source>
+<source ID="HighUnicode2" FileName="TestSources/HighUnicode2.xml" Creator="Frans Englich">
+<description last-mod="2007-12-21">Corner case unicode codepoints, second case.</description>
+</source>
+<source ID="BCIsInvalid" FileName="TestSources/BCisInvalid.xml" Creator="Frans Englich">
+<description last-mod="2007-12-21">An element name containing 0xBC.</description>
+</source>
+<source ID="InvalidUmlaut" FileName="TestSources/InvalidUmlaut.xml" Creator="Frans Englich">
+<description last-mod="2007-12-27">Contains the codepoint 188 in an NCName.</description>
+</source>
+<source ID="NamespaceSuppliedInternally" FileName="TestSources/NamespaceSuppliedInternally.xml" Creator="Frans Englich">
+<description last-mod="2007-12-27">A namespace declared with a namespace declaration, as well as in the internal subset.</description>
+</source>
+<source ID="XMLIdDuplicated" FileName="TestSources/XMLIdDuplicated.xml" Creator="Frans Englich">
+<description last-mod="2008-01-15">An XML file which has two xml:id attributes with the same value.</description>
+</source>
+<source ID="InvalidXMLId" FileName="TestSources/InvalidXMLId.xml" Creator="Frans Englich">
+<description last-mod="2008-01-15">An XML file which has an invalid xml:id attribute.</description>
+</source>
+<source ID="UsingXMLId" FileName="TestSources/UsingXMLId.xml" Creator="Frans Englich">
+<description last-mod="2008-01-15">An XML file which has xml:id attributes.</description>
+</source>
+<source ID="Books2" FileName="TestSources/Books2.xml" Creator="Frans Englich">
+<description last-mod="2008-01-17">An XML which is in ISO-8859-1 encoding.</description>
+</source>
+<source ID="QObject" FileName="TestSources/QObject.xml" Creator="Frans Englich">
+<description last-mod="2008-02-19"/>
+</source>
+<source ID="Char010D" FileName="TestSources/0x010D.xml" Creator="Frans Englich">
+<description last-mod="2008-02-28"/>
+</source>
+<source ID="SmallTree" FileName="TestSources/SmallTree.xml" Creator="Frans Englich">
+<description last-mod="2008-04-03"/>
+</source>
+<source ID="AttributesAndElements" FileName="TestSources/AttributesAndElements.xml" Creator="Frans Englich">
+<description last-mod="2008-04-03"/>
+</source>
+<source ID="functx_prices" FileName="TestSources/functx_prices.xml" Creator="Frans Englich">
+<description last-mod="2008-05-16"/>
+</source>
+<source ID="functx_order" FileName="TestSources/functx_order.xml" Creator="Frans Englich">
+<description last-mod="2008-05-16"/>
+</source>
+<source ID="functx_cats" FileName="TestSources/functx_cats.xml" Creator="Frans Englich">
+<description last-mod="2008-05-16"/>
+</source>
+<source ID="functx_catalog" FileName="TestSources/functx_catalog.xml" Creator="Frans Englich">
+<description last-mod="2008-05-16"/>
+</source>
+<source ID="functx_book" FileName="TestSources/functx_book.xml" Creator="Frans Englich">
+<description last-mod="2008-06-25"/>
+</source>
+<source ID="badxml" FileName="TestSources/badxml.xml" Creator="Frans Englich">
+<description last-mod="2008-05-19"/>
+</source>
+<source ID="builtinEntities" FileName="TestSources/builtinEntities.xml" Creator="Frans Englich">
+<description last-mod="2008-05-26"/>
+</source>
+<source ID="XMLIdWhitespace" FileName="TestSources/XMLIdWhitespace.xml" Creator="Frans Englich">
+<description last-mod="2008-05-27"/>
+</source>
+<source ID="XMLIDMany" FileName="TestSources/XMLIDMany.xml" Creator="Frans Englich">
+<description last-mod="2008-10-24"/>
+</source>
+<source ID="OneTopElement" FileName="TestSources/OneTopElement.xml" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01"/>
+</source>
+<source ID="namespace-sensitive" FileName="TestSources/namespace-sensitive.xml" schema="namespace-sensitive-schema" Creator="Oliver Hallam">
+<description last-mod="2007-02-26">Document containing namespace-sensitive constructs.</description>
+</source>
+<source ID="dm-e005" FileName="TestSources/dm-e005.xml" schema="dm-e005-schema" Creator="Norm Walsh">
+<description last-mod="2010-03-10">Document to test erratum DM.E05.</description>
+</source>
+<source ID="extendedTypes" FileName="TestSources/extendedTypes.xml" schema="extendedTypes-schema" Creator="Oliver Hallam">
+<description last-mod="2010-03-17">Document containing elements with various restricted and extended types.</description>
+</source>
+<source ID="mixed" FileName="TestSources/mixed.xml" schema="mixedcontent" Creator="Oliver Hallam">
+<description last-mod="2010-03-17">Document containing an element with mixed content but statically could have element only content.</description>
+</source>
+<schema ID="XQTSCatalogxsd" uri="http://www.w3.org/2005/02/query-test-XQTSCatalog" FileName="XQTSCatalog.xsd">
+<description last-mod="2005-04-14">Schema for XQTSCatalog</description>
+</schema>
+<schema ID="atomicxsd" uri="http://www.w3.org/XQueryTest" FileName="TestSources/atomic.xsd">
+<description last-mod="2005-03-08">A Schema for atomic.xml</description>
+</schema>
+<schema ID="orderDataxsd" uri="http://www.w3.org/XQueryTestOrderBy" FileName="TestSources/orderData.xsd">
+<description last-mod="2005-06-01">A Schema for orderData.xml</description>
+</schema>
+<schema ID="SpecialTypesXSD" uri="http://www.example.com/typedecl" FileName="TestSources/SpecialTypes.xsd">
+<description last-mod="2005-06-01">A Schema containing certain special types e.g. interleave types, union types, anySimpleType</description>
+</schema>
+<schema ID="QNameSourceXSD" uri="http://www.example.com/QNameXSD" FileName="TestSources/QName-schema.xsd">
+<description last-mod="2005-09-28">A schema containing QName and QName derived types</description>
+</schema>
+<schema ID="notationschema" uri="http://www.example.com/notation" FileName="TestSources/notationschema.xsd">
+<description last-mod="2005-10-10">A Schema for NOTATION data</description>
+</schema>
+<schema ID="idxsd" uri="http://www.w3.org/XQueryTest/ididrefs" FileName="TestSources/id.xsd">
+<description last-mod="2009-03-06">A schema for the id/idref functions tests</description>
+</schema>
+<schema ID="simplexsd" uri="http://www.w3.org/XQueryTest/simple" FileName="TestSources/simple.xsd">
+<description last-mod="2005-12-07">A schema for simple context tests</description>
+</schema>
+<schema ID="examplesxsd" uri="http://www.w3.org/XQueryTest/someExamples" FileName="TestSources/examples.xsd">
+<description last-mod="2006-05-19">A schema for examples.xml.</description>
+</schema>
+<schema ID="userdefined" uri="http://www.w3.org/XQueryTest/userDefinedTypes" FileName="TestSources/userdefined.xsd">
+<description last-mod="2006-04-03">A schema user defined types and constructor tests</description>
+</schema>
+<schema ID="listunion" uri="http://www.w3.org/XQueryTest/ListUnionTypes" FileName="TestSources/listunion.xsd">
+<description last-mod="2006-06-07">A schema defining a list of unions.</description>
+</schema>
+<schema ID="examples2xsd" uri="http://www.w3.org/XQueryTest/someExamples2" FileName="TestSources/examples2.xsd">
+<description last-mod="2009-10-01">Test schema for Errata XQ.E6.</description>
+</schema>
+<schema ID="attribute" uri="http://www.w3.org/XQueryTest/sample" FileName="TestSources/attribute.xsd">
+<description last-mod="2009-04-01">Test schema that contains an attribute declaration.</description>
+</schema>
+<schema ID="mixedcontent" uri="http://www.w3.org/XQueryTest/mixedcontent" FileName="TestSources/mixedcontent.xsd">
+<description last-mod="2009-04-01">Test schema that contains two complex types, one of them with a mixed content.</description>
+</schema>
+<schema ID="simpleContent" uri="http://www.w3.org/query-test/complexSimple" FileName="TestSources/simpleContent.xsd">
+<description last-mod="2009-11-20">Schema for complex types with
+         simple content</description>
+</schema>
+<schema ID="namespace-sensitive-schema" uri="http://www.example.com/test/namespace-sensitive" FileName="TestSources/namespace-sensitive.xsd">
+<description last-mod="2007-02-26">Schema illustrating various namespace-sensitive constructs.</description>
+</schema>
+<schema ID="dm-e005-schema" uri="http://www.example.com/ns/test" FileName="TestSources/dm-e005.xsd">
+<description last-mod="2010-03-10">Schema to test erratum DM.E05.</description>
+</schema>
+<schema ID="xq-e18-schema" uri="http://www.example.com/ns/test/xq-e18" FileName="TestSources/xq-e18.xsd">
+<description last-mod="2010-03-11">Schema to test erratum XQ.E18.</description>
+</schema>
+<schema ID="extendedTypes-schema" uri="http://www.example.com/XQueryTest/extendedTypes" FileName="TestSources/extendedTypes.xsd">
+<description last-mod="2010-03-17">Schema containing extended and restricted types.</description>
+</schema>
+<schema ID="constraints" uri="http://www.w3.org/constraints" FileName="TestSources/constraints.xsd">
+<description last-mod="2010-06-10">Schema with unique/id/idref constraints.</description>
+</schema>
+<collection ID="collection1" Creator="Andrew Eisenberg">
+<description last-mod="2006-06-07">A simple collection of documents.</description>
+<input-document>bib</input-document>
+<input-document>reviews</input-document>
+</collection>
+<collection ID="collection2" Creator="Andrew Eisenberg">
+<description last-mod="2006-06-07">A simple collection of documents.</description>
+<input-document>bib</input-document>
+<input-document>reviews</input-document>
+<input-document>books</input-document>
+</collection>
+<module ID="module1-lib" FileName="TestSources/module1-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-07-13">Library module for "modules-18" query</description>
+</module>
+<module ID="module2-lib" FileName="TestSources/module2-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-07-13">Library module for "modules-18" query</description>
+</module>
+<module ID="empty-lib" FileName="TestSources/empty-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module for "modules-none" query</description>
+</module>
+<module ID="emptyns-lib" FileName="TestSources/emptyns-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with empty namespace</description>
+</module>
+<module ID="test1-lib" FileName="TestSources/test1-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Simple library module</description>
+</module>
+<module ID="test2-lib" FileName="TestSources/test2-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-01-19">Library module with namespace URI set to empty string.</description>
+</module>
+<module ID="test1a-lib" FileName="TestSources/test1a-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Simple library module</description>
+</module>
+<module ID="test1collide1-lib" FileName="TestSources/test1collide1-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with colliding definitions</description>
+</module>
+<module ID="test1collide2-lib" FileName="TestSources/test1collide2-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with colliding definitions</description>
+</module>
+<module ID="test1c1-lib" FileName="TestSources/test1c1-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with circular includes</description>
+</module>
+<module ID="test2c1-lib" FileName="TestSources/test2c1-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with circular includes</description>
+</module>
+<module ID="context-lib" FileName="TestSources/context-lib" Creator="Mary Holstege">
+<description last-mod="2005-12-05">Library module with interesting context</description>
+</module>
+<module ID="module-defs" FileName="TestSources/moduleDefs-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-01-06">Library module with definitions for various NIST tests.</description>
+</module>
+<module ID="modulewrongprefix-lib" FileName="TestSources/moduleDefs-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-03-21">Library module with invalid namespace prefix ("xml")</description>
+</module>
+<module ID="modulesdiffns" FileName="TestSources/modulesdiffns-lib" Creator="Carmelo Montanez">
+<description last-mod="2006-04-11">Library module with variable on different namespace than target.</description>
+</module>
+<module ID="errata6-module1" FileName="TestSources/errata6-module1" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module2" FileName="TestSources/errata6-module2" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module4" FileName="TestSources/errata6-module4" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module5" FileName="TestSources/errata6-module5" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module6" FileName="TestSources/errata6-module6" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata6-module7" FileName="TestSources/errata6-module7" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+</module>
+<module ID="errata8-module1a" FileName="TestSources/errata8-module1a" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a variable from it, testing circular dependencies.</description>
+</module>
+<module ID="errata8-module1b" FileName="TestSources/errata8-module1b" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a function from it, testing circular dependencies.</description>
+</module>
+<module ID="errata8-module2a" FileName="TestSources/errata8-module2a" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a variable from it, testing circular dependencies.</description>
+</module>
+<module ID="errata8-module2b" FileName="TestSources/errata8-module2b" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a function from it, testing circular dependencies.</description>
+</module>
+<module ID="errata8-module3a" FileName="TestSources/errata8-module3a" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a variable from it, testing circular dependencies pass case.</description>
+</module>
+<module ID="errata8-module3b" FileName="TestSources/errata8-module3b" Creator="John Snelson">
+<description last-mod="2009-10-01">Module that imports another module and uses a function from it, testing circular dependencies pass case.</description>
+</module>
+<module ID="module3-lib" FileName="TestSources/module3-lib" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01">Module with simple and schema-element() types, used for functions'parameters and return results.</description>
+</module>
+<module ID="module4-lib" FileName="TestSources/module4-lib" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01">Module with schema-attribute() types, used for functions' parameters and return results.</description>
+</module>
+<module ID="modules-recursive1" FileName="TestSources/modules-recursive1" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01">Module with cyclic recursive imports.</description>
+</module>
+<module ID="modules-recursive2" FileName="TestSources/modules-recursive2" Creator="Nicolae Brinza">
+<description last-mod="2009-04-01">Module with cyclic recursive imports.</description>
+</module>
+<module ID="module-pub-priv" FileName="TestSources/module-pub-priv" Creator="Michael Kay">
+<description last-mod="2009-10-01">Module that contains both private and public function declarations (XQuery 1.1).</description>
+</module>
+</sources>
+<implementation-defined-items>
+<implementation-defined-item name="expressionUnicode" spec="XQuery">
+<description last-mod="2005-04-04">The version of Unicode that is used to construct expressions.</description>
+</implementation-defined-item>
+<implementation-defined-item name="collations" spec="XQuery">
+<description last-mod="2005-04-04">The statically-known collations.</description>
+</implementation-defined-item>
+<implementation-defined-item name="implicitTimezone" spec="XQuery">
+<description last-mod="2005-04-04">The implicit timezone.</description>
+</implementation-defined-item>
+<implementation-defined-item name="warningsMethod" spec="XQuery">
+<description last-mod="2005-04-04">The circumstances in which warnings are raised, and the ways in which warnings are handled.</description>
+</implementation-defined-item>
+<implementation-defined-item name="errorsMethod" spec="XQuery">
+<description last-mod="2005-04-04">The method by which errors are reported to the external processing environment.</description>
+</implementation-defined-item>
+<implementation-defined-item name="XMLVersion" spec="XQuery">
+<description last-mod="2005-10-10">Whether the implementation is based on the rules of [XML 1.0] and [XML Names] or the rules of [XML 1.1] and [XML Names 1.1]. One of these sets of rules must be applied consistently by all aspects of the implementation.</description>
+</implementation-defined-item>
+<implementation-defined-item name="overwrittenContextComponents" spec="XQuery">
+<description last-mod="2005-04-04">Any components of the static context or dynamic context that are overwritten or augmented by the implementation.</description>
+</implementation-defined-item>
+<implementation-defined-item name="axes" spec="XQuery">
+<description last-mod="2005-04-04">Which of the optional axes are supported by the implementation, if the Full-Axis Feature is not supported.</description>
+</implementation-defined-item>
+<implementation-defined-item name="defaultOrderEmpty" spec="XQuery">
+<description last-mod="2005-04-04">The default handling of empty sequences returned by an ordering key (sortspec) in an order by clause (empty least or empty greatest).</description>
+</implementation-defined-item>
+<implementation-defined-item name="pragmas" spec="XQuery">
+<description last-mod="2005-04-04">The names and semantics of any extension expressions (pragmas) recognized by the implementation.</description>
+</implementation-defined-item>
+<implementation-defined-item name="optionDeclarations" spec="XQuery">
+<description last-mod="2005-04-04">The names and semantics of any option declarations recognized by the implementation.</description>
+</implementation-defined-item>
+<implementation-defined-item name="externalFunctionProtocols" spec="XQuery">
+<description last-mod="2005-04-04">Protocols (if any) by which parameters can be passed to an external function, and the result of the function can returned to the invoking query.</description>
+</implementation-defined-item>
+<implementation-defined-item name="moduleLocationHints" spec="XQuery">
+<description last-mod="2005-11-01">The process by which the specific modules to be imported by a module import are identified, if the Module Feature is supported (includes processing of location hints, if any.)</description>
+</implementation-defined-item>
+<implementation-defined-item name="staticTypingExtensions" spec="XQuery">
+<description last-mod="2005-04-04">Any static typing extensions supported by the implementation, if the Static Typing Feature is supported.</description>
+</implementation-defined-item>
+<implementation-defined-item name="serializationInvocation" spec="XQuery">
+<description last-mod="2005-04-04">The means by which serialization is invoked, if the Serialization Feature is supported.</description>
+</implementation-defined-item>
+<implementation-defined-item name="serializationDefaults" spec="XQuery">
+<description last-mod="2005-10-10">The default values for the byte-order-mark, encoding, media-type, normalization-form, omit-xml-declaration, standalone, and version parameters, if the Serialization Feature is supported.</description>
+</implementation-defined-item>
+<implementation-defined-item name="externalFunctionCall" spec="XQuery">
+<description last-mod="2006-08-09">The result of an unsuccessful call to an external function (for example, if the function implementation cannot be found or does not return a value of the declared type).</description>
+</implementation-defined-item>
+<implementation-defined-item name="limits" spec="XQuery">
+<description last-mod="2005-11-01">Limits on ranges of values for various data types, as enumerated in 5.3 Data Model Conformance.</description>
+</implementation-defined-item>
+<implementation-defined-item name="traceDestination" spec="FuncOps">
+<description last-mod="2005-10-10">The destination of the trace output is implementation-defined. See 4 The Trace Function.</description>
+</implementation-defined-item>
+<implementation-defined-item name="integerOperations" spec="FuncOps">
+<description last-mod="2005-10-10">For xs:integer operations, implementations that support limited-precision integer operations must either raise an error [err:FOAR0002] or provide an implementation-defined mechanism that allows users to choose between raising an error and returning a result that is modulo the largest representable integer value. See 6.2 Operators on Numeric Values.</description>
+</implementation-defined-item>
+<implementation-defined-item name="decimalDigits" spec="FuncOps">
+<description last-mod="2005-11-01">For xs:decimal values the number of digits of precision returned by the numeric operators is implementation-defined. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer.</description>
+</implementation-defined-item>
+<implementation-defined-item name="roundOrTruncate" spec="FuncOps">
+<description last-mod="2005-10-10">If the number of digits in the result exceeds the number of digits that the implementation supports, the result is truncated or rounded in an implementation-defined manner. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer.</description>
+</implementation-defined-item>
+<implementation-defined-item name="Unicode" spec="FuncOps">
+<description last-mod="2005-11-01">It is implementation-defined which version of Unicode is supported by the features defined in this specification, but it is recommended that the most recent version of Unicode be used. See 7.1 String Types.</description>
+</implementation-defined-item>
+<implementation-defined-item name="normalizationForms" spec="FuncOps">
+<description last-mod="2005-10-10">For 7.4.6 fn:normalize-unicode, conforming implementations must support normalization form "NFC" and may support normalization forms "NFD", "NFKC", "NFKD", "FULLY-NORMALIZED". They may also support other normalization forms with implementation-defined semantics.</description>
+</implementation-defined-item>
+<implementation-defined-item name="collationUnits" spec="FuncOps">
+<description last-mod="2005-10-10">The ability to decompose strings into collation units suitable for substring matching is an implementation-defined property of a collation. See 7.5 Functions Based on Substring Matching.</description>
+</implementation-defined-item>
+<implementation-defined-item name="secondsDigits" spec="FuncOps">
+<description last-mod="2005-10-10">All minimally conforming processors must support year values with a minimum of 4 digits (i.e., YYYY) and a minimum fractional second precision of 1 millisecond or three digits (i.e., s.sss). However, conforming processors may set larger implementation-defined limits on the maximum number of digits they support in these two situations. See 10.1.1 Limits and Precision.</description>
+</implementation-defined-item>
+<implementation-defined-item name="stringToDecimal" spec="FuncOps">
+<description last-mod="2006-08-09">The result of casting a string to xs:decimal, when the resulting value is not too large or too small but nevertheless has too many decimal digits to be accurately represented, is implementation-defined. See 17.1.1 Casting from xs:string and xs:untypedAtomic.</description>
+</implementation-defined-item>
+<implementation-defined-item name="docProcessing" spec="FuncOps">
+<description last-mod="2005-10-10">Various aspects of the processing provided by 15.5.4 fn:doc are implementation-defined. Implementations may provide external configuration options that allow any aspect of the processing to be controlled by the user.</description>
+</implementation-defined-item>
+<implementation-defined-item name="weakenStable" spec="FuncOps">
+<description last-mod="2006-08-09">The manner in which implementations provide options to weaken the stable characteristic of 15.5.6 fn:collection and 15.5.4 fn:doc are implementation-defined.</description>
+</implementation-defined-item>
+<implementation-defined-item name="additionalTypes" spec="DataModel">
+<description last-mod="2005-04-04">Support for additional user-defined or implementation-defined types is implementation-defined. (See 2.6.1 Representation of Types)</description>
+</implementation-defined-item>
+<implementation-defined-item name="undefinedProperties" spec="DataModel">
+<description last-mod="2005-04-04">Some typed values in the data model are undefined. Attempting to access an undefined property is always an error. Behavior in these cases is implementation-defined and the host language is responsible for determining the result. (See 5 Accessors)</description>
+</implementation-defined-item>
+<implementation-defined-item name="sequenceNormalization" spec="Serialization">
+<description last-mod="2005-04-04">For any implementation-defined output method, it is implementation-defined whether sequence normalization process takes place. (See 2 Sequence Normalization)</description>
+</implementation-defined-item>
+<implementation-defined-item name="outputMethods" spec="Serialization">
+<description last-mod="2005-04-04">If the namespace URI is non-null for the method serialization parameter, then the parameter specifies an implementation-defined output method. (See 3 Serialization Parameters)</description>
+</implementation-defined-item>
+<implementation-defined-item name="normalizationFormBehavior" spec="Serialization">
+<description last-mod="2005-04-04">If the value of the normalization-form form parameter is not NFC, NFD, NFKC, NFKD, fully-normalized, or none then the meaning of the value and it's effect is implementation-defined. (See 4 Phases of Serialization)</description>
+</implementation-defined-item>
+<implementation-defined-item name="additionalParams" spec="Serialization">
+<description last-mod="2005-11-01">The effect of additional serialization parameters on the output of the serializer, where the name of such a parameter must be namespace-qualified, is implementation-defined or implementation-dependent. The extent of this effect on the output must not override the provisions of this specification. (See 3 Serialization Parameters)</description>
+</implementation-defined-item>
+<implementation-defined-item name="encodingPhase" spec="Serialization">
+<description last-mod="2005-04-04">The effect of providing an option that allows the encoding phase to be skipped, so that the result of serialization is a stream of Unicode characters, is implementation-defined. The serializer is not required to support such an option. (See 4 Phases of Serialization)</description>
+</implementation-defined-item>
+<implementation-defined-item name="CDATASerialization" spec="Serialization">
+<description last-mod="2005-04-04">An serializer may provide an implementation-defined mechanism to place CDATA sections in the result tree. (See 5.1.4 XML Output Method: the cdata-section-elements Parameter)</description>
+</implementation-defined-item>
+</implementation-defined-items>
+<features>
+<feature name="Minimal Conformance"/>
+<feature name="Schema Import"/>
+<feature name="Schema Validation"/>
+<feature name="Static Typing"/>
+<feature name="Static Typing Extensions"/>
+<feature name="Full Axis"/>
+<feature name="Module"/>
+<feature name="Serialization"/>
+</features>
+<context-properties>
+<context-property name="Statically known namespaces" context-type="static"/>
+<context-property name="Default element/type namespace" context-type="static"/>
+<context-property name="Default function namespace" context-type="static"/>
+<context-property name="In-scope schema types" context-type="static"/>
+<context-property name="In-scope element declarations" context-type="static"/>
+<context-property name="In-scope attribute declarations" context-type="static"/>
+<context-property name="In-scope variables" context-type="static"/>
+<context-property name="Context item static type" context-type="static"/>
+<context-property name="Function signatures" context-type="static"/>
+<context-property name="Statically known collations" context-type="static"/>
+<context-property name="Default collation" context-type="static"/>
+<context-property name="Construction mode" context-type="static"/>
+<context-property name="Ordering mode" context-type="static"/>
+<context-property name="Default order for empty sequences" context-type="static"/>
+<context-property name="Boundary-space policy" context-type="static"/>
+<context-property name="Copy-namespaces mode" context-type="static"/>
+<context-property name="Base URI" context-type="static"/>
+<context-property name="Statically known documents" context-type="static"/>
+<context-property name="Statically known collections" context-type="static"/>
+<context-property name="Statically known default collection type" context-type="static"/>
+<context-property name="Context item" context-type="dynamic"/>
+<context-property name="Context position" context-type="dynamic"/>
+<context-property name="Context size" context-type="dynamic"/>
+<context-property name="Variable values" context-type="dynamic"/>
+<context-property name="Function implementations" context-type="dynamic"/>
+<context-property name="Current dateTime" context-type="dynamic"/>
+<context-property name="Implicit timezone" context-type="dynamic"/>
+<context-property name="Available documents" context-type="dynamic"/>
+<context-property name="Available collections" context-type="dynamic"/>
+<context-property name="Default collection" context-type="dynamic"/>
+</context-properties>
+<test-group name="MinimalConformance" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Minimal Conformance</title>
+<description/>
+</GroupInfo>
+<test-group name="OptionalFeatureErrors" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Optional Feature Errors</title>
+<description/>
+</GroupInfo>
+<test-group name="CombinedErrorCodes" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Single error code for extra features</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="Basics">
+<GroupInfo>
+<title>XQuery Basics</title>
+<description/>
+</GroupInfo>
+<test-group name="StaticContext">
+<GroupInfo>
+<title>Static Context Evaluation</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="Types">
+<GroupInfo>
+<title>Query Types</title>
+<description/>
+</GroupInfo>
+<test-group name="SequenceTypeSyntax" featureOwner="NIST">
+<GroupInfo>
+<title>XQuery Sequence Type Syntax</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+</test-group>
+<test-group name="Expressions" featureOwner="Frans Englich">
+<GroupInfo>
+<title>XQuery Expressions</title>
+<description/>
+</GroupInfo>
+<test-group name="PrimaryExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Primary Expressions</title>
+<description/>
+</GroupInfo>
+<test-group name="Literals" featureOwner="Microsoft and Frans Englich">
+<GroupInfo>
+<title>Literals</title>
+<description>
+                     Test string and numeric literals in XQuery.
+                  </description>
+</GroupInfo>
+</test-group>
+<test-group name="ParenExpr" featureOwner="IBM and Frans Englich">
+<GroupInfo>
+<title>Parenthesized Expressions</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="ContextExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Context Item Expressions</title>
+<description/>
+</GroupInfo>
+<test-group name="ExternalContextExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>External Context Item Expressions</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="InternalContextExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Internal Context Item Expressions</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="FunctionCallExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Function Calls</title>
+<description>Contains tests verifying the function calling mechanism; not a particular function implementation.</description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="PathExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Path Expressions</title>
+<description/>
+</GroupInfo>
+<test-group name="PathExpressions">
+<GroupInfo>
+<title>General Path Expression Tests</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="Steps" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Steps</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="Axes" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Axes</title>
+<description>Tests in this group focus on the axes named in XQuery 3.2.1.1 and the / and // step operators of 3.2.1. Abbreviated versions (@ vs. attribute::) are included. NodeTests are typically *, node(), or a name.</description>
+</GroupInfo>
+</test-group>
+<test-group name="NodeTestSection" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Node Tests</title>
+<description>Tests in this group take the axes as a given and focus on the NodeTest syntax in XQuery 3.2.1.2. Includes explicit names, *, and the various kind tests that look like functions.</description>
+</GroupInfo>
+<test-group name="NodeTest" featureOwner="Frans Englich">
+<GroupInfo>
+<title>NodeTest</title>
+<description>Tests in this group take the axes as a given and focus on the NodeTest syntax in XQuery 3.2.1.2. Includes explicit names, *, and the various kind tests that look like functions.</description>
+</GroupInfo>
+</test-group>
+<test-group name="NameTest" featureOwner="Frans Englich">
+<GroupInfo>
+<title>NameTest</title>
+<description>Tests in this group take the axes as a given and focus on the NodeTest syntax in XQuery 3.2.1.2. Includes explicit names, *, and the various kind tests that look like functions.</description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="Predicates" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Predicates</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="UnabbrAxes" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Unabbreviated Syntax</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="AbbrAxes" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Abbreviated Syntax</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="SeqExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Sequence Expressions</title>
+<description/>
+</GroupInfo>
+<test-group name="ConstructSeq" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Constructing Sequences</title>
+<description>Tests that construct sequences</description>
+</GroupInfo>
+<test-group name="commaOp" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Comma Operator</title>
+<description>Tests that construct sequences using the comma operator</description>
+</GroupInfo>
+</test-group>
+<test-group name="RangeExpr" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Range Expression</title>
+<description>Tests that construct sequences using the RangeExpr</description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="FilterExpr" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Filter Expressions</title>
+<description>Simple tests to evaluate filter sequence expressions.</description>
+</GroupInfo>
+</test-group>
+<test-group name="CombNodeSeq" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Combining Node Sequences</title>
+<description>Tests for combining Sequences</description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="Operators" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Operators</title>
+<description/>
+</GroupInfo>
+<test-group name="ArithExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Arithmetic Operators</title>
+<description/>
+</GroupInfo>
+<test-group name="NumericOpr" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>Arithmetic Operators on Numeric Values</title>
+<description/>
+</GroupInfo>
+<test-group name="NumericAdd" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-add</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NumericSubtract" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-subtract</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NumericMultiply" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-multiply</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NumericDivide" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-divide</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NumericIntegerDivide" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-integer-divide</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NumericMod" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-mod</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NumericUnaryPlus" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-unary-plus</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NumericUnaryMinus" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-unary-minus</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="DurationArith" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Arithmetic Operators on Duration Values</title>
+<description/>
+</GroupInfo>
+<test-group name="YearMonthDurationAdd" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:add-yearMonthDurations</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="YearMonthDurationSubtract" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-yearMonthDurations</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="YearMonthDurationMultiply" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:multiply-yearMonthDuration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="YearMonthDurationDivide" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:divide-yearMonthDuration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="YearMonthDurationDivideYMD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:divide-yearMonthDuration-by-yearMonthDuration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DayTimeDurationAdd" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:add-dayTimeDurations</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DayTimeDurationSubtract" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-dayTimeDurations</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DayTimeDurationMultiply" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:multiply-dayTimeDuration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DayTimeDurationDivide" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:divide-dayTimeDuration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DayTimeDurationDivideDTD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:divide-dayTimeDuration-by-dayTimeDuration</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="DurationDateTimeArith" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Arithmetic Operators on Duration and Date Time Values</title>
+<description/>
+</GroupInfo>
+<test-group name="dateTimesSubtract" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-dateTimes-yielding-dayTimeDuration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DatesSubtract" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-dates-yielding-dayTimeDuration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="TimeSubtract" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-times</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="YearMonthDurationAddDT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:add-yearMonthDuration-to-dateTime</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateTimeAddDTD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:add-dayTimeDuration-to-dateTime</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateTimeSubtractYMD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-yearMonthDuration-from-dateTime</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateTimeSubtractDTD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-dayTimeDuration-from-dateTime</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateAddYMD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:add-yearMonthDuration-to-date</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateAddDTD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:add-dayTimeDuration-to-date</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateSubtractYMD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-yearMonthDuration-from-date</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateSubtractDTD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-dayTimeDuration-from-date</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="TimeAddDTD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:add-dayTimeDuration-to-time</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="TimeSubtractDTD" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:subtract-dayTimeDuration-from-time</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+</test-group>
+<test-group name="CompExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Comparison Operators</title>
+<description/>
+</GroupInfo>
+<test-group name="ValComp" featureOwner="IBM and Frans Englich">
+<GroupInfo>
+<title>Value Comparison</title>
+<description/>
+</GroupInfo>
+<test-group name="NumericComp" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Comparison of Numeric Values</title>
+<description/>
+</GroupInfo>
+<test-group name="NumericEqual" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NumericLT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-less-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NumericGT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:numeric-greater-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="BooleanOp" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>Comparison Operators on Boolean Values</title>
+<description/>
+</GroupInfo>
+<test-group name="BooleanEqual" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:boolean-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="BooleanLT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:boolean-less-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="BooleanGT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:boolean-greater-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="DurationDateTimeOp" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Comparisons of Duration, Date Time Values</title>
+<description/>
+</GroupInfo>
+<test-group name="YearMonthDurationLT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:yearMonthDuration-less-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="YearMonthDurationGT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:yearMonthDuration-greater-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DayTimeDurationLT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:dayTimeDuration-less-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DayTimeDurationGT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:dayTimeDuration-greater-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DurationEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:duration equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateTimeEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:dateTime-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateTimeLT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:dateTime-less-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateTimeGT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:dateTime-greater-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:date-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateLT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:date-less-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DateGT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:date-greater-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="TimeEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:time-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="TimeLT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:time-less-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="TimeGT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:time-greater-than</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="gYearMonthEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:gYearMonth-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="gYearEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:gYear-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="gMonthDayEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:gMonthDay-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="gMonthEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:gMonth-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="gDayEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:gDay-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="YearMonthDurationEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:yearMonthDuration-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="DayTimeDurationEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:dayTimeDuration-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="QNameOp" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Comparison Operators on QName Values</title>
+<description/>
+</GroupInfo>
+<test-group name="QNameEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:QName-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="PrefixFromQName" featureOwner="Frans Englich">
+<GroupInfo>
+<title>fn:prefix-from-QName</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="BinaryOp" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Comparison Operators on base64Binary and hexBinary Types</title>
+<description/>
+</GroupInfo>
+<test-group name="HexBinaryEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:hexBinary-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="Base64BinaryEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:base64Binary-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="NotationOp" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Comparison Operators on NOTATION Types</title>
+<description/>
+</GroupInfo>
+<test-group name="NotationEQ" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:NOTATION-equal</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="ValCompTypeChecking" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Type Checking and Error Handling</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="StringComp" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Comparison of String Values</title>
+<description/>
+</GroupInfo>
+<test-group name="StringEqual" featureOwner="Frans Englich">
+<GroupInfo>
+<title>xs:string eq/ne xs:string</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="StringGT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>xs:string gt/ge xs:string</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="StringLT" featureOwner="Frans Englich">
+<GroupInfo>
+<title>xs:string lt/le xs:string</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="AnyURIComp" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Comparison of AnyURI Values</title>
+<description/>
+</GroupInfo>
+<test-group name="AnyURIEqual" featureOwner="Frans Englich">
+<GroupInfo>
+<title>xs:anyURI eq/ne xs:anyURI</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="AnyURILtGt">
+<GroupInfo>
+<title>xs:anyURI lt/gt xs:anyURI</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="AnyURILeGe">
+<GroupInfo>
+<title>xs:anyURI le/ge xs:anyURI</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+</test-group>
+<test-group name="GenComprsn" featureOwner="Frans Englich">
+<GroupInfo>
+<title>General Comparisons</title>
+<description/>
+</GroupInfo>
+<test-group name="GenCompEq" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>The "=" operator for general comparisons</title>
+<description>The general comparison operator"="</description>
+</GroupInfo>
+</test-group>
+<test-group name="GenCompNE" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>The "!=" operator for general comparisons</title>
+<description>The general comparison operator"!="</description>
+</GroupInfo>
+</test-group>
+<test-group name="GenCompLT" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>The "&lt; (less than)" operator for general comparisons</title>
+<description>The general comparison operator "less than (&lt;)"</description>
+</GroupInfo>
+</test-group>
+<test-group name="GenCompLTEQ" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>The "&lt;= (less than or equal)" operator for general comparisons</title>
+<description>The general comparison operator "less than or equal (&lt;=)"</description>
+</GroupInfo>
+</test-group>
+<test-group name="GenCompGT" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>The "&gt; (greater than)" operator for general comparisons</title>
+<description>The general comparison operator "greater than (&gt;)"</description>
+</GroupInfo>
+</test-group>
+<test-group name="GenCompGTEQ" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>The "&gt;= (greater than or equal)" operator for general comparisons</title>
+<description>The general comparison operator "greater than or equal (&gt;=)"</description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="NodeComp" featureOwner="IBM and Frans Englich">
+<GroupInfo>
+<title>Node Comparisons</title>
+<description/>
+</GroupInfo>
+<test-group name="NodeSame" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:is-same-node</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NodeBefore" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:node-before</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="NodeAfter" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:node-after</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+</test-group>
+<test-group name="SeqOp" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>Operators on Sequences</title>
+<description/>
+</GroupInfo>
+<test-group name="SeqUnion" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:union</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="SeqIntersect" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:intersect</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="SeqExcept" featureOwner="Frans Englich">
+<GroupInfo>
+<title>op:except</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+</test-group>
+<test-group name="LogicExpr" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>Logical Expressions</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="Construct" featureOwner="IBM and Frans Englich">
+<GroupInfo>
+<title>Constructors</title>
+<description/>
+</GroupInfo>
+<test-group is-XPath2="false" name="DirectConElem" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Direct Element Constructors</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="DirectConElemAttr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Attributes</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="DirectConElemNamespace" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Namespace Declaration Attributes</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="DirectConElemContent" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Content</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="DirectConElemWhitespace" featureOwner="Frans Englich">
+<GroupInfo>
+<title>White Space Element Content</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="DirectConOther" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Other Direct Constructors</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="XMLEdition" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Conformance to the XML 1.0 3-5th edition and XML 1.1</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ComputeCon" featureOwner="IBM and Frans Englich">
+<GroupInfo>
+<title>Computed Constructors</title>
+<description/>
+</GroupInfo>
+<test-group is-XPath2="false" name="ComputeConElem" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Computed Element Constructors</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ComputeConAttr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Computed Attribute Constructors</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ConDocNode" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Document Node Constructors</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ConText" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Text Node Constructors</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ComputeConPI" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Computed Processing-instruction Constructors</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ComputeConComment" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Computed Comment Constructors</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group is-XPath2="false" name="ConInScopeNamespace" featureOwner="Frans Englich">
+<GroupInfo>
+<title>In-scope Namespaces of a Constructed Element</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="FLWORExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Tests of For-Let-Where-OrderBy-Return Expressions</title>
+<description>Tests in this group focus on the FLWOR expressions in XQuery 3.8.</description>
+</GroupInfo>
+<test-group name="ForExpr" featureOwner="Microsoft and Frans Englich">
+<GroupInfo>
+<title>FOR Clause</title>
+<description>Tests for the FOR part of the FLWOR expression syntax</description>
+</GroupInfo>
+<test-group name="ForExprWithout" featureOwner="Frans Englich">
+<GroupInfo>
+<title>FOR Clause without TypeDeclaration</title>
+<description>Tests for the FOR part of the FLWOR expression syntax</description>
+</GroupInfo>
+</test-group>
+<test-group name="ForExprWith" featureOwner="Frans Englich">
+<GroupInfo>
+<title>FOR Clause with TypeDeclaration</title>
+<description>Tests for the FOR part of the FLWOR expression syntax</description>
+</GroupInfo>
+</test-group>
+<test-group name="ForExprPositionalVar" featureOwner="Frans Englich">
+<GroupInfo>
+<title>FOR Clause with a Positional Variable</title>
+<description>Tests for the 'at' variable in FLWOR expression.</description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group is-XPath2="false" name="LetExpr" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>LET Clause</title>
+<description>Tests for the LET part of the FLWOR expression syntax</description>
+</GroupInfo>
+<test-group is-XPath2="false" name="LetExprWithout" featureOwner="Frans Englich">
+<GroupInfo>
+<title>LET Clause without TypeDeclaration</title>
+<description>Tests for the LET part of the FLWOR expression syntax</description>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="LetExprWith" featureOwner="Frans Englich">
+<GroupInfo>
+<title>LET Clause with TypeDeclaration</title>
+<description>Tests for the LET part of the FLWOR expression syntax</description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group is-XPath2="false" name="WhereExpr" featureOwner="Microsoft and Frans Englich">
+<GroupInfo>
+<title>WHERE Clause</title>
+<description>Tests for the WHERE part of the FLWOR expression syntax</description>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="OrderbyExpr" featureOwner="Microsoft and Frans Englich">
+<GroupInfo>
+<title>ORDER BY Clause</title>
+<description>Tests for the ORDER BY part of the FLWOR expression syntax</description>
+</GroupInfo>
+<test-group is-XPath2="false" name="OrderbyExprWith" featureOwner="Frans Englich">
+<GroupInfo>
+<title>ORDER BY Clause with OrderModifier</title>
+<description>Tests for the ORDER BY part of the FLWOR expression syntax</description>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="OrderbyExprWithout" featureOwner="Frans Englich">
+<GroupInfo>
+<title>ORDER BY Clause without OrderModifier</title>
+<description>Tests for the ORDER BY part of the FLWOR expression syntax</description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="ReturnExpr" featureOwner="Microsoft and Frans Englich">
+<GroupInfo>
+<title>RETURN Clause</title>
+<description>Tests for the RETURN part of the FLWOR expression syntax</description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group is-XPath2="false" name="OrderExpr" featureOwner="IBM and Frans Englich">
+<GroupInfo>
+<title>Ordered and Unordered Expressions</title>
+<description>Tests involving "Ordered" and/or "unordered"</description>
+</GroupInfo>
+</test-group>
+<test-group name="CondExpr" featureOwner="Microsoft and Frans Englich">
+<GroupInfo>
+<title>Conditional Expressions</title>
+<description>Tests in this group focus on the conditional expressions in XQuery 3.10.</description>
+</GroupInfo>
+</test-group>
+<test-group name="QuantExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Quantified Expressions</title>
+<description/>
+</GroupInfo>
+<test-group name="QuantExprWithout" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Quantified Expressions Without TypeDeclaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="QuantExprWith" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Quantified Expressions With TypeDeclaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="exprSeqTypes" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Expressions on Sequence Types</title>
+<description/>
+</GroupInfo>
+<test-group name="SeqExprInstanceOf" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Instance Of</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="sequenceExprTypeswitch" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Typeswitch</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="SeqExprCastToDerived" featureOwner="NIST">
+<GroupInfo>
+<title>Cast from Derived types</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="SeqExprCastToDerivedParents" featureOwner="NIST">
+<GroupInfo>
+<title>Cast from Derived types To Parents</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="SeqExprCastWithinBranch" featureOwner="NIST">
+<GroupInfo>
+<title>Casting within a branch of the type hierarchy</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="SeqExprCast" featureOwner="IBM/XSLT and Frans Englich">
+<GroupInfo>
+<title>Cast</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="SeqExprCastable" featureOwner="IBM/XSLT and Frans Englich">
+<GroupInfo>
+<title>Castable</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group name="SeqExprTreat" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Treat</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group is-XPath2="false" name="PrologExpr" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Modules and Prologs</title>
+<description/>
+</GroupInfo>
+<test-group is-XPath2="false" name="VersionProlog" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>Version Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="BoundarySpaceProlog" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>Boundary-space Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="CollationProlog" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Default Collation Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="CopyNamespacesProlog" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Copy Namespaces Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="BaseURIProlog" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Base URI Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ConstructionProlog" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Construction Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="DefaultNamespaceProlog" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>Default Namespace Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="DefaultOrderingProlog" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Ordering Mode Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="EmptyOrderProlog" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Empty Order Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="NamespaceProlog" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Namespace Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="VariableProlog" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>Variable Declaration</title>
+<description/>
+</GroupInfo>
+<test-group is-XPath2="false" name="ExternalVariablesWithout" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>External Variable References without TypeDeclaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ExternalVariablesWith" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>External Variable References with TypeDeclatation</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="InternalVariablesWithout" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Internal Variable References without TypeDeclaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="InternalVariablesWith" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Internal Variable References with TypeDeclatation</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group is-XPath2="false" name="FunctionProlog" featureOwner="Oracle and Frans Englich">
+<GroupInfo>
+<title>Function Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="OptionDeclarationProlog" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Option Declaration Declaration</title>
+<description/>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="XQueryComment" featureOwner="Microsoft and Frans Englich">
+<GroupInfo>
+<title>XQuery Comments</title>
+<description>Tests for the XQuery comment syntax</description>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ExtensionExpression" featureOwner="NIST and Frans Englich">
+<GroupInfo>
+<title>Extension Expression</title>
+<description/>
+</GroupInfo>
+</test-group>
+<test-group is-XPath2="false" name="ImplicitContext" featureOwner="Frans Englich">
+<GroupInfo>
+<title>Implicit Context</title>
+<description>
+                  Implementations are allowed to define an implicit context for their queries. What this means
+                  is that an XQuery expression can use the '.' or '/' axes without specifying any explicit
+                  context to bind these to. The binding of the implicit context to some input document is an
+                  implementation specific detail and should be handled by the individual test harness.
+               </description>
+</GroupInfo>
+</test-group>
+</test-group>
+<test-group name="Functions" feat

<TRUNCATED>

[04/50] [abbrv] git commit: Preparing for local speed up tests.

Posted by pr...@apache.org.
Preparing for local speed up tests.

I removed the queries that are currently not working. Also fixed a bug referencing files directly in the query instead of through the data links. Removed some debug code.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/c10a8e9e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/c10a8e9e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/c10a8e9e

Branch: refs/heads/prestonc/hash_join
Commit: c10a8e9e81becf4bd44e842352cfd05f9918cfad
Parents: fda0991
Author: Preston Carman <pr...@apache.org>
Authored: Thu Feb 27 14:21:00 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 .../noaa-ghcn-daily/scripts/weather_benchmark.py    | 16 +++++++---------
 .../noaa-ghcn-daily/scripts/weather_example.xml     |  2 ++
 2 files changed, 9 insertions(+), 9 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c10a8e9e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index 6d9301e..f0d93f8 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -35,8 +35,9 @@ class WeatherBenchmark:
 
     QUERY_REPLACEMENT_KEY = "/tmp/1.0_partition_ghcnd_all_xml/"
     QUERY_MASTER_FOLDER = "../queries/"
-    QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq", "q04.xq", "q05.xq"] 
-    BENCHMARK_LOCAL_TESTS = ["local_speed_up"] 
+    QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq"] 
+#     QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq", "q04.xq", "q05.xq"] 
+    BENCHMARK_LOCAL_TESTS = ["local_speed_up", "local_batch_scale_out"] 
     BENCHMARK_CLUSTER_TESTS = ["speed_up", "batch_scale_out"] 
     QUERY_COLLECTIONS = ["sensors", "stations"]
 
@@ -68,12 +69,8 @@ class WeatherBenchmark:
             # Match link paths to real data paths.
             offset = 0
             group_size = len(data_paths) / len(link_base_paths)
-            print "g " + str(group_size)
-            print link_base_paths
-            print data_paths
             for link_index, link_path in enumerate(link_base_paths):
                 for data_index, data_path in  enumerate(data_paths):
-                    print index, offset, group_size, link_index, data_index
                     if offset <= data_index and data_index < offset + group_size:
                         self.add_collection_links_for(data_path, link_path, data_index)
                 offset += group_size
@@ -161,8 +158,8 @@ class WeatherBenchmark:
                 os.makedirs(query_path)
         
             # Copy query files.
-            node_partitions = get_partition_paths(partitions, self.base_paths, "data_links/" + test + "/" + str(i) + "nodes")
-            self.copy_and_replace_query(query_path, node_partitions)
+            partition_paths = get_partition_paths(partitions, self.base_paths, "data_links/" + test + "/" + str(i) + "nodes")
+            self.copy_and_replace_query(query_path, partition_paths)
 
     def copy_local_query_files(self, test):
         for i in self.partitions:
@@ -172,7 +169,8 @@ class WeatherBenchmark:
                 os.makedirs(query_path)
     
             # Copy query files.
-            self.copy_and_replace_query(query_path, get_partition_paths(i, self.base_paths))
+            partition_paths = get_partition_paths(i, self.base_paths, "data_links/" + test)
+            self.copy_and_replace_query(query_path, partition_paths)
 
     def copy_and_replace_query(self, query_path, replacement_list):
         '''Copy the query files over to the query_path and replace the path

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c10a8e9e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
index 4f31dff..daf8f20 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
@@ -35,6 +35,8 @@
         <name>small</name>
         <test>local_speed_up</test>
         <save_path>/data</save_path>
+        <partitions_per_path>1</partitions_per_path>
+        <partitions_per_path>2</partitions_per_path>
         <partitions_per_path>4</partitions_per_path>
         <partitions_per_path>8</partitions_per_path>
     </dataset>


[14/50] [abbrv] git commit: Enabling hash based join.

Posted by pr...@apache.org.
Enabling hash based join.

The changes involve two new rules that allow switching between Algebricks Builtin Identifiers and VXQuery equivalent expressions. One more rewrite rule was included to move expressions out of the inner join to allow for hash join to be enabled on variables. Other changes connect these rules to allow for complete hash join implementation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/5771ac4e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/5771ac4e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/5771ac4e

Branch: refs/heads/prestonc/hash_join
Commit: 5771ac4e82a05d5668d0d8e348110be9c42fba3b
Parents: 80c9654
Author: Preston Carman <pr...@apache.org>
Authored: Wed Mar 12 13:10:34 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../VXQueryComparatorFactoryProvider.java       |  36 +++++-
 .../compiler/rewriter/RewriteRuleset.java       |  38 ++++--
 .../ConvertFromAlgebricksExpressionsRule.java   |  94 ++++++++++++++
 .../ConvertToAlgebricksExpressionsRule.java     | 101 +++++++++++++++
 .../rules/PushFunctionsOntoEqJoinBranches.java  | 122 +++++++++++++++++++
 .../RemoveRedundantBooleanExpressionsRule.java  |  69 +++++++++++
 .../rewriter/rules/util/ExpressionToolbox.java  |  16 ++-
 .../metadata/VXQueryMetadataProvider.java       |  12 +-
 .../bool/FnBooleanScalarEvaluatorFactory.java   |   2 +-
 .../runtime/functions/util/FunctionHelper.java  |   1 +
 ...VXQueryBinaryHashFunctionFamilyProvider.java |  36 ++++++
 .../xmlquery/query/XMLQueryCompiler.java        |   6 +-
 12 files changed, 512 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
index 5a0e2df..b473d69 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
@@ -16,7 +16,9 @@
  */
 package org.apache.vxquery.compiler.algebricks;
 
+import org.apache.vxquery.datamodel.accessors.SequencePointable;
 import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
+import org.apache.vxquery.datamodel.values.ValueTag;
 
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.data.IBinaryComparatorFactoryProvider;
@@ -43,12 +45,44 @@ public class VXQueryComparatorFactoryProvider implements IBinaryComparatorFactor
         public IBinaryComparator createBinaryComparator() {
             final TaggedValuePointable tvp1 = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
             final TaggedValuePointable tvp2 = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
+            final SequencePointable sp1 = (SequencePointable) SequencePointable.FACTORY.createPointable();
+            final SequencePointable sp2 = (SequencePointable) SequencePointable.FACTORY.createPointable();
             return new IBinaryComparator() {
                 @Override
                 public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
                     tvp1.set(b1, s1, l1);
                     tvp2.set(b2, s2, l2);
-                    return 0;
+                    if (tvp1.getTag() != tvp2.getTag()) {
+                        return tvp1.getTag() - tvp2.getTag();
+                    }
+                    // Empty sequences do not match. Supports hash based join.
+                    switch (tvp1.getTag()) {
+                        case ValueTag.SEQUENCE_TAG:
+                            tvp1.getValue(sp1);
+                            if (sp1.getEntryCount() == 0) {
+                                return -1;
+                            }
+
+                            switch (tvp2.getTag()) {
+                                case ValueTag.SEQUENCE_TAG:
+                                    tvp2.getValue(sp2);
+                                    if (sp2.getEntryCount() == 0) {
+                                        return 1;
+                                    }
+                                    break;
+                                default:
+                            }
+
+                            break;
+                        default:
+                    }
+                    // Do a binary compare between byte arrays.
+                    for (int i = 0; i < b1.length && i < b2.length; i++) {
+                        if (b1[i] != b2[i]) {
+                            return b1[i] - b2[i];
+                        }
+                    }
+                    return b1.length - b2.length;
                 }
             };
         }

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
index 16c44b8..ab0d535 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
@@ -20,6 +20,8 @@ import java.util.LinkedList;
 import java.util.List;
 
 import org.apache.vxquery.compiler.rewriter.rules.ConsolidateAssignAggregateRule;
+import org.apache.vxquery.compiler.rewriter.rules.ConvertFromAlgebricksExpressionsRule;
+import org.apache.vxquery.compiler.rewriter.rules.ConvertToAlgebricksExpressionsRule;
 import org.apache.vxquery.compiler.rewriter.rules.InlineNestedVariablesRule;
 import org.apache.vxquery.compiler.rewriter.rules.PushChildIntoDataScanRule;
 import org.apache.vxquery.compiler.rewriter.rules.ConsolidateUnnestsRule;
@@ -30,7 +32,9 @@ import org.apache.vxquery.compiler.rewriter.rules.EliminateUnnestAggregateSequen
 import org.apache.vxquery.compiler.rewriter.rules.EliminateUnnestAggregateSubplanRule;
 import org.apache.vxquery.compiler.rewriter.rules.IntroduceCollectionRule;
 import org.apache.vxquery.compiler.rewriter.rules.IntroduceTwoStepAggregateRule;
+import org.apache.vxquery.compiler.rewriter.rules.PushFunctionsOntoEqJoinBranches;
 import org.apache.vxquery.compiler.rewriter.rules.PushMapOperatorDownThroughProductRule;
+import org.apache.vxquery.compiler.rewriter.rules.RemoveRedundantBooleanExpressionsRule;
 import org.apache.vxquery.compiler.rewriter.rules.RemoveRedundantCastExpressionsRule;
 import org.apache.vxquery.compiler.rewriter.rules.RemoveRedundantDataExpressionsRule;
 import org.apache.vxquery.compiler.rewriter.rules.RemoveRedundantPromoteExpressionsRule;
@@ -147,14 +151,32 @@ public class RewriteRuleset {
     }
 
     /**
+     * Remove expressions known to be redundant.
+     */
+    public final static List<IAlgebraicRewriteRule> buildRedundantExpressionNormalizationRuleCollection() {
+        List<IAlgebraicRewriteRule> normalization = new LinkedList<IAlgebraicRewriteRule>();
+        normalization.add(new InlineNestedVariablesRule());
+        normalization.add(new RemoveRedundantTreatExpressionsRule());
+        normalization.add(new RemoveRedundantDataExpressionsRule());
+        normalization.add(new RemoveRedundantPromoteExpressionsRule());
+        normalization.add(new RemoveRedundantCastExpressionsRule());
+        normalization.add(new ConvertToAlgebricksExpressionsRule());
+        normalization.add(new RemoveRedundantBooleanExpressionsRule());
+        // Clean up
+        normalization.add(new RemoveRedundantVariablesRule());
+        normalization.add(new RemoveUnusedAssignAndAggregateRule());
+        return normalization;
+    }
+
+    /**
      * When a nested data sources exist, convert the plan to use the join operator.
      */
     public final static List<IAlgebraicRewriteRule> buildNestedDataSourceRuleCollection() {
         List<IAlgebraicRewriteRule> xquery = new LinkedList<IAlgebraicRewriteRule>();
+        xquery.add(new BreakSelectIntoConjunctsRule());
         xquery.add(new SimpleUnnestToProductRule());
         xquery.add(new PushMapOperatorDownThroughProductRule());
         xquery.add(new PushSubplanWithAggregateDownThroughProductRule());
-        xquery.add(new InlineNestedVariablesRule());
         xquery.add(new PushSelectDownRule());
         xquery.add(new PushSelectIntoJoinRule());
         // Clean up
@@ -163,18 +185,6 @@ public class RewriteRuleset {
         return xquery;
     }
 
-    public final static List<IAlgebraicRewriteRule> buildRedundantExpressionNormalizationRuleCollection() {
-        List<IAlgebraicRewriteRule> normalization = new LinkedList<IAlgebraicRewriteRule>();
-        normalization.add(new RemoveRedundantTreatExpressionsRule());
-        normalization.add(new RemoveRedundantDataExpressionsRule());
-        normalization.add(new RemoveRedundantPromoteExpressionsRule());
-        normalization.add(new RemoveRedundantCastExpressionsRule());
-        // Clean up
-        normalization.add(new RemoveRedundantVariablesRule());
-        normalization.add(new RemoveUnusedAssignAndAggregateRule());
-        return normalization;
-    }
-
     public final static List<IAlgebraicRewriteRule> buildTypeInferenceRuleCollection() {
         List<IAlgebraicRewriteRule> typeInfer = new LinkedList<IAlgebraicRewriteRule>();
         typeInfer.add(new InferTypesRule());
@@ -239,6 +249,7 @@ public class RewriteRuleset {
     public final static List<IAlgebraicRewriteRule> buildPhysicalRewritesAllLevelsRuleCollection() {
         List<IAlgebraicRewriteRule> physicalPlanRewrites = new LinkedList<IAlgebraicRewriteRule>();
         physicalPlanRewrites.add(new PullSelectOutOfEqJoin());
+        physicalPlanRewrites.add(new PushFunctionsOntoEqJoinBranches());
         physicalPlanRewrites.add(new SetAlgebricksPhysicalOperatorsRule());
         physicalPlanRewrites.add(new EnforceStructuralPropertiesRule());
         physicalPlanRewrites.add(new PushProjectDownRule());
@@ -254,6 +265,7 @@ public class RewriteRuleset {
 
     public final static List<IAlgebraicRewriteRule> prepareForJobGenRuleCollection() {
         List<IAlgebraicRewriteRule> prepareForJobGenRewrites = new LinkedList<IAlgebraicRewriteRule>();
+        prepareForJobGenRewrites.add(new ConvertFromAlgebricksExpressionsRule());
         prepareForJobGenRewrites.add(new IsolateHyracksOperatorsRule(
                 HeuristicOptimizer.hyraxOperatorsBelowWhichJobGenIsDisabled));
         prepareForJobGenRewrites.add(new ExtractCommonOperatorsRule());

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertFromAlgebricksExpressionsRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertFromAlgebricksExpressionsRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertFromAlgebricksExpressionsRule.java
new file mode 100644
index 0000000..482f05d
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertFromAlgebricksExpressionsRule.java
@@ -0,0 +1,94 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.compiler.rewriter.rules;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.mutable.Mutable;
+import org.apache.commons.lang3.mutable.MutableObject;
+import org.apache.vxquery.compiler.rewriter.rules.util.ExpressionToolbox;
+import org.apache.vxquery.compiler.rewriter.rules.util.OperatorToolbox;
+import org.apache.vxquery.functions.BuiltinFunctions;
+import org.apache.vxquery.functions.BuiltinOperators;
+
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalOperator;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.IOptimizationContext;
+import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.ScalarFunctionCallExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.AlgebricksBuiltinFunctions;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.IFunctionInfo;
+import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
+
+public class ConvertFromAlgebricksExpressionsRule implements IAlgebraicRewriteRule {
+    final List<Mutable<ILogicalExpression>> functionList = new ArrayList<Mutable<ILogicalExpression>>();
+
+    final Map<FunctionIdentifier, IFunctionInfo> ALGEBRICKS_MAP = new HashMap<FunctionIdentifier, IFunctionInfo>();
+
+    public ConvertFromAlgebricksExpressionsRule() {
+        ALGEBRICKS_MAP.put(AlgebricksBuiltinFunctions.AND, BuiltinOperators.AND);
+        ALGEBRICKS_MAP.put(AlgebricksBuiltinFunctions.OR, BuiltinOperators.OR);
+        ALGEBRICKS_MAP.put(AlgebricksBuiltinFunctions.NOT, BuiltinFunctions.FN_NOT_1);
+        ALGEBRICKS_MAP.put(AlgebricksBuiltinFunctions.EQ, BuiltinOperators.VALUE_EQ);
+        ALGEBRICKS_MAP.put(AlgebricksBuiltinFunctions.NEQ, BuiltinOperators.VALUE_NE);
+        ALGEBRICKS_MAP.put(AlgebricksBuiltinFunctions.LT, BuiltinOperators.VALUE_LT);
+        ALGEBRICKS_MAP.put(AlgebricksBuiltinFunctions.LE, BuiltinOperators.VALUE_LE);
+        ALGEBRICKS_MAP.put(AlgebricksBuiltinFunctions.GT, BuiltinOperators.VALUE_GT);
+        ALGEBRICKS_MAP.put(AlgebricksBuiltinFunctions.GE, BuiltinOperators.VALUE_GE);
+    }
+
+    @Override
+    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context) throws AlgebricksException {
+        return false;
+    }
+
+    @Override
+    public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
+            throws AlgebricksException {
+        boolean modified = false;
+        List<Mutable<ILogicalExpression>> expressions = OperatorToolbox.getExpressions(opRef);
+        for (Mutable<ILogicalExpression> expression : expressions) {
+            if (processExpression(opRef, expression)) {
+                modified = true;
+            }
+        }
+        return modified;
+    }
+
+    private boolean processExpression(Mutable<ILogicalOperator> opRef, Mutable<ILogicalExpression> search) {
+        boolean modified = false;
+        for (FunctionIdentifier fid : ALGEBRICKS_MAP.keySet()) {
+            functionList.clear();
+            ExpressionToolbox.findAllFunctionExpressions(search, fid, functionList);
+            for (Mutable<ILogicalExpression> searchM : functionList) {
+                AbstractFunctionCallExpression searchFunction = (AbstractFunctionCallExpression) searchM.getValue();
+                searchFunction.setFunctionInfo(ALGEBRICKS_MAP.get(fid));
+                // Add boolean function before vxquery expression.
+                ScalarFunctionCallExpression booleanExp = new ScalarFunctionCallExpression(BuiltinFunctions.FN_BOOLEAN_1, new MutableObject<ILogicalExpression>(searchM.getValue()));
+                searchM.setValue(booleanExp);
+                modified = true;
+            }
+        }
+        return modified;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertToAlgebricksExpressionsRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertToAlgebricksExpressionsRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertToAlgebricksExpressionsRule.java
new file mode 100644
index 0000000..ebe265e
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertToAlgebricksExpressionsRule.java
@@ -0,0 +1,101 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.compiler.rewriter.rules;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import org.apache.commons.lang3.mutable.Mutable;
+import org.apache.vxquery.compiler.rewriter.rules.util.ExpressionToolbox;
+import org.apache.vxquery.compiler.rewriter.rules.util.OperatorToolbox;
+import org.apache.vxquery.functions.BuiltinFunctions;
+import org.apache.vxquery.functions.BuiltinOperators;
+
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalOperator;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.IOptimizationContext;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalExpressionTag;
+import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.AlgebricksBuiltinFunctions;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.IFunctionInfo;
+import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
+
+public class ConvertToAlgebricksExpressionsRule implements IAlgebraicRewriteRule {
+    final List<Mutable<ILogicalExpression>> functionList = new ArrayList<Mutable<ILogicalExpression>>();
+
+    final Map<FunctionIdentifier, FunctionIdentifier> ALGEBRICKS_MAP = new HashMap<FunctionIdentifier, FunctionIdentifier>();
+
+    public ConvertToAlgebricksExpressionsRule() {
+        ALGEBRICKS_MAP.put(BuiltinOperators.AND.getFunctionIdentifier(), AlgebricksBuiltinFunctions.AND);
+        ALGEBRICKS_MAP.put(BuiltinOperators.OR.getFunctionIdentifier(), AlgebricksBuiltinFunctions.OR);
+        ALGEBRICKS_MAP.put(BuiltinFunctions.FN_NOT_1.getFunctionIdentifier(), AlgebricksBuiltinFunctions.NOT);
+        ALGEBRICKS_MAP.put(BuiltinOperators.VALUE_EQ.getFunctionIdentifier(), AlgebricksBuiltinFunctions.EQ);
+        ALGEBRICKS_MAP.put(BuiltinOperators.VALUE_NE.getFunctionIdentifier(), AlgebricksBuiltinFunctions.NEQ);
+        ALGEBRICKS_MAP.put(BuiltinOperators.VALUE_LT.getFunctionIdentifier(), AlgebricksBuiltinFunctions.LT);
+        ALGEBRICKS_MAP.put(BuiltinOperators.VALUE_LE.getFunctionIdentifier(), AlgebricksBuiltinFunctions.LE);
+        ALGEBRICKS_MAP.put(BuiltinOperators.VALUE_GT.getFunctionIdentifier(), AlgebricksBuiltinFunctions.GT);
+        ALGEBRICKS_MAP.put(BuiltinOperators.VALUE_GE.getFunctionIdentifier(), AlgebricksBuiltinFunctions.GE);
+    }
+
+    @Override
+    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context) throws AlgebricksException {
+        return false;
+    }
+
+    @Override
+    public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
+            throws AlgebricksException {
+        boolean modified = false;
+        List<Mutable<ILogicalExpression>> expressions = OperatorToolbox.getExpressions(opRef);
+        for (Mutable<ILogicalExpression> expression : expressions) {
+            if (processExpression(opRef, expression, context)) {
+                modified = true;
+            }
+        }
+        return modified;
+    }
+
+    private boolean processExpression(Mutable<ILogicalOperator> opRef, Mutable<ILogicalExpression> search,
+            IOptimizationContext context) {
+        boolean modified = false;
+        functionList.clear();
+        ExpressionToolbox.findAllFunctionExpressions(search, BuiltinFunctions.FN_BOOLEAN_1.getFunctionIdentifier(),
+                functionList);
+        for (Mutable<ILogicalExpression> searchM : functionList) {
+            // Get input function
+            AbstractFunctionCallExpression searchFunction = (AbstractFunctionCallExpression) searchM.getValue();
+            ILogicalExpression argFirst = searchFunction.getArguments().get(0).getValue();
+            if (argFirst.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
+                continue;
+            }
+            AbstractFunctionCallExpression functionCall = (AbstractFunctionCallExpression) argFirst;
+            if (ALGEBRICKS_MAP.containsKey(functionCall.getFunctionIdentifier())) {
+                FunctionIdentifier algebricksFid = ALGEBRICKS_MAP.get(functionCall.getFunctionIdentifier());
+                IFunctionInfo algebricksFunction = context.getMetadataProvider().lookupFunction(algebricksFid);
+                functionCall.setFunctionInfo(algebricksFunction);
+                searchM.setValue(argFirst);
+                modified = true;
+            }
+        }
+        return modified;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/PushFunctionsOntoEqJoinBranches.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/PushFunctionsOntoEqJoinBranches.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/PushFunctionsOntoEqJoinBranches.java
new file mode 100644
index 0000000..96b36a5
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/PushFunctionsOntoEqJoinBranches.java
@@ -0,0 +1,122 @@
+/*
+ * Copyright 2009-2013 by The Regents of the University of California
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * you may obtain a copy of the License from
+ * 
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ * 
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.compiler.rewriter.rules;
+
+import java.util.ArrayList;
+import java.util.Collection;
+import java.util.List;
+
+import org.apache.commons.lang3.mutable.Mutable;
+import org.apache.commons.lang3.mutable.MutableObject;
+import org.apache.vxquery.compiler.rewriter.rules.util.ExpressionToolbox;
+
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalOperator;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.IOptimizationContext;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalExpressionTag;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalOperatorTag;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalVariable;
+import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.AlgebricksBuiltinFunctions;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractBinaryJoinOperator;
+import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
+import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AssignOperator;
+import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.visitors.VariableUtilities;
+import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
+
+public class PushFunctionsOntoEqJoinBranches implements IAlgebraicRewriteRule {
+
+    @Override
+    public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context) throws AlgebricksException {
+        return false;
+    }
+
+    @Override
+    public boolean rewritePost(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
+            throws AlgebricksException {
+        AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();
+
+        if (op.getOperatorTag() != LogicalOperatorTag.INNERJOIN) {
+            return false;
+        }
+        AbstractBinaryJoinOperator join = (AbstractBinaryJoinOperator) op;
+
+        ILogicalExpression expr = join.getCondition().getValue();
+        if (expr.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
+            return false;
+        }
+        AbstractFunctionCallExpression fexp = (AbstractFunctionCallExpression) expr;
+        FunctionIdentifier fi = fexp.getFunctionIdentifier();
+        if (!(fi.equals(AlgebricksBuiltinFunctions.AND) || fi.equals(AlgebricksBuiltinFunctions.EQ))) {
+            return false;
+        }
+        boolean modified = false;
+        List<Mutable<ILogicalExpression>> functionList = new ArrayList<Mutable<ILogicalExpression>>();
+        List<Mutable<ILogicalExpression>> variableList = new ArrayList<Mutable<ILogicalExpression>>();
+        functionList.clear();
+        ExpressionToolbox.findAllFunctionExpressions(join.getCondition(), AlgebricksBuiltinFunctions.EQ, functionList);
+        Collection<LogicalVariable> producedVariables = new ArrayList<LogicalVariable>();
+        for (Mutable<ILogicalExpression> searchM : functionList) {
+            ILogicalExpression search = searchM.getValue();
+            if (search.getExpressionTag() != LogicalExpressionTag.FUNCTION_CALL) {
+                continue;
+            }
+            AbstractFunctionCallExpression searchExp = (AbstractFunctionCallExpression) search;
+            // Go through all argument for EQ.
+            for (Mutable<ILogicalExpression> expressionM : searchExp.getArguments()) {
+                // Push on to branch when possible.
+                for (Mutable<ILogicalOperator> branch : join.getInputs()) {
+                    producedVariables.clear();
+                    getProducedVariablesInDescendantsAndSelf(branch.getValue(), producedVariables);
+                    variableList.clear();
+                    ExpressionToolbox.findVariableExpressions(expressionM, variableList);
+                    boolean found = true;
+                    for (Mutable<ILogicalExpression> searchVariableM : variableList) {
+                        VariableReferenceExpression vre = (VariableReferenceExpression) searchVariableM.getValue();
+                        if (!producedVariables.contains(vre.getVariableReference())) {
+                            found = false;
+                        }
+                    }
+                    if (found) {
+                        // push down
+                        LogicalVariable assignVariable = context.newVar();
+                        AssignOperator aOp = new AssignOperator(assignVariable, new MutableObject<ILogicalExpression>(expressionM.getValue()));
+                        aOp.getInputs().add(new MutableObject<ILogicalOperator>(branch.getValue()));
+                        branch.setValue(aOp);
+                        aOp.recomputeSchema();
+                        
+                        expressionM.setValue(new VariableReferenceExpression(assignVariable));
+                        modified = true;
+                    }
+                }
+            }
+        }
+        return modified;
+    }
+
+    public static void getProducedVariablesInDescendantsAndSelf(ILogicalOperator op, Collection<LogicalVariable> vars)
+            throws AlgebricksException {
+        // DFS traversal
+        VariableUtilities.getProducedVariables(op, vars);
+        for (Mutable<ILogicalOperator> c : op.getInputs()) {
+            getProducedVariablesInDescendantsAndSelf(c.getValue(), vars);
+        }
+    }
+
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/RemoveRedundantBooleanExpressionsRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/RemoveRedundantBooleanExpressionsRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/RemoveRedundantBooleanExpressionsRule.java
new file mode 100644
index 0000000..ba129c0
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/RemoveRedundantBooleanExpressionsRule.java
@@ -0,0 +1,69 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.compiler.rewriter.rules;
+
+import org.apache.vxquery.functions.BuiltinFunctions;
+import org.apache.vxquery.runtime.functions.type.SequenceTypeMatcher;
+import org.apache.vxquery.types.BuiltinTypeRegistry;
+import org.apache.vxquery.types.Quantifier;
+import org.apache.vxquery.types.SequenceType;
+
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+
+/**
+ * The rule searches for where the xquery boolean function is used. When the
+ * expressions input is already a boolean value, remove the boolean function.
+ * 
+ * <pre>
+ * Before
+ * 
+ *   plan__parent
+ *   %OPERATOR( $v1 : boolean( \@input_expression ) )
+ *   plan__child
+ *   
+ *   Where treat \@input_expression is known to be a boolean value.
+ *   
+ * After 
+ * 
+ *   plan__parent
+ *   %OPERATOR( $v1 : \@input_expression )
+ *   plan__child
+ * </pre>
+ * 
+ * @author prestonc
+ */
+
+public class RemoveRedundantBooleanExpressionsRule extends AbstractRemoveRedundantTypeExpressionsRule {
+    final SequenceTypeMatcher stm = new SequenceTypeMatcher();
+
+    protected FunctionIdentifier getSearchFunction() {
+        return BuiltinFunctions.FN_BOOLEAN_1.getFunctionIdentifier();
+    }
+
+    @Override
+    public boolean hasTypeArgument() {
+        return false;
+    }
+
+    public boolean matchesAllInstancesOf(SequenceType sTypeArg, SequenceType sTypeOutput) {
+        stm.setSequenceType(SequenceType.create(BuiltinTypeRegistry.XS_BOOLEAN, Quantifier.QUANT_ONE));
+        if (sTypeOutput != null && stm.matchesAllInstances(sTypeOutput)) {
+            return true;
+        }
+        return false;
+    }
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
index dc9e0d3..78ceeb7 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
@@ -78,6 +78,18 @@ public class ExpressionToolbox {
         return null;
     }
 
+    public static void findVariableExpressions(Mutable<ILogicalExpression> mutableLe, List<Mutable<ILogicalExpression>> finds) {
+        ILogicalExpression le = mutableLe.getValue();
+        if (le.getExpressionTag() == LogicalExpressionTag.VARIABLE) {
+            finds.add(mutableLe);
+        } else if (le.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
+            AbstractFunctionCallExpression afce = (AbstractFunctionCallExpression) le;
+            for (Mutable<ILogicalExpression> argExp : afce.getArguments()) {
+                findVariableExpressions(argExp, finds);
+            }
+        }
+    }
+
     public static Mutable<ILogicalExpression> findLastFunctionExpression(Mutable<ILogicalExpression> mutableLe) {
         ILogicalExpression le = mutableLe.getValue();
         if (le.getExpressionTag() == LogicalExpressionTag.VARIABLE) {
@@ -180,12 +192,12 @@ public class ExpressionToolbox {
     }
 
     public static SequenceType getOutputSequenceType(Mutable<ILogicalOperator> opRef,
-            Mutable<ILogicalExpression> argFirstM, StaticContextImpl dCtx) {
+            Mutable<ILogicalExpression> argFirstM, StaticContext dCtx) {
         ILogicalExpression argFirstLe = argFirstM.getValue();
         switch (argFirstLe.getExpressionTag()) {
             case FUNCTION_CALL:
                 // Only process defined functions.
-                Function function = ExpressionToolbox.getBuiltIn(argFirstM);
+                Function function = ExpressionToolbox.getBuiltIn(argFirstM, dCtx);
                 if (function == null) {
                     return null;
                 } else if (function.getFunctionIdentifier().equals(BuiltinOperators.CAST.getFunctionIdentifier())) {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryMetadataProvider.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryMetadataProvider.java b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryMetadataProvider.java
index cd323d9..71963be 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryMetadataProvider.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryMetadataProvider.java
@@ -146,8 +146,16 @@ public class VXQueryMetadataProvider implements IMetadataProvider<String, String
     }
 
     @Override
-    public IFunctionInfo lookupFunction(FunctionIdentifier fid) {
-        return null;
+    public IFunctionInfo lookupFunction(final FunctionIdentifier fid) {
+        return new IFunctionInfo() {
+            @Override
+            public FunctionIdentifier getFunctionIdentifier() {
+                return fid;
+            }
+            public boolean isFunctional() {
+                return true;
+            }
+        };
     }
 
     @Override

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/bool/FnBooleanScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/bool/FnBooleanScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/bool/FnBooleanScalarEvaluatorFactory.java
index a6a1d0b..b9c8c6f 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/bool/FnBooleanScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/bool/FnBooleanScalarEvaluatorFactory.java
@@ -53,7 +53,7 @@ public class FnBooleanScalarEvaluatorFactory extends AbstractTaggedValueArgument
     }
 
     private static class FnBooleanScalarEvaluator extends AbstractTaggedValueArgumentScalarEvaluator {
-        final SequencePointable seqp = new SequencePointable();
+        final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final LongPointable lp = (LongPointable) LongPointable.FACTORY.createPointable();
         final IntegerPointable ip = (IntegerPointable) IntegerPointable.FACTORY.createPointable();
         final ShortPointable sp = (ShortPointable) ShortPointable.FACTORY.createPointable();

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java
index cd8d632..a7d7186 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/util/FunctionHelper.java
@@ -1200,6 +1200,7 @@ public class FunctionHelper {
 
     public static boolean isDerivedFromString(int tid) {
         switch (tid) {
+            case ValueTag.XS_UNTYPED_ATOMIC_TAG:
             case ValueTag.XS_STRING_TAG:
             case ValueTag.XS_NORMALIZED_STRING_TAG:
             case ValueTag.XS_TOKEN_TAG:

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/runtime/provider/VXQueryBinaryHashFunctionFamilyProvider.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/provider/VXQueryBinaryHashFunctionFamilyProvider.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/provider/VXQueryBinaryHashFunctionFamilyProvider.java
new file mode 100644
index 0000000..b73cc75
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/provider/VXQueryBinaryHashFunctionFamilyProvider.java
@@ -0,0 +1,36 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.runtime.provider;
+
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.data.IBinaryHashFunctionFamilyProvider;
+import edu.uci.ics.hyracks.api.dataflow.value.IBinaryHashFunctionFamily;
+import edu.uci.ics.hyracks.data.std.accessors.MurmurHash3BinaryHashFunctionFamily;
+
+public class VXQueryBinaryHashFunctionFamilyProvider implements IBinaryHashFunctionFamilyProvider {
+
+    public static final VXQueryBinaryHashFunctionFamilyProvider INSTANCE = new VXQueryBinaryHashFunctionFamilyProvider();
+
+    private VXQueryBinaryHashFunctionFamilyProvider() {
+    }
+
+    @Override
+    public IBinaryHashFunctionFamily getBinaryHashFunctionFamily(Object type) throws AlgebricksException {
+        return MurmurHash3BinaryHashFunctionFamily.INSTANCE;
+    }
+
+}

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/5771ac4e/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java b/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java
index e6a9007..54bac7e 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/xmlquery/query/XMLQueryCompiler.java
@@ -33,6 +33,7 @@ import org.apache.vxquery.exceptions.ErrorCode;
 import org.apache.vxquery.exceptions.SystemException;
 import org.apache.vxquery.metadata.VXQueryMetadataProvider;
 import org.apache.vxquery.runtime.provider.VXQueryBinaryHashFunctionFactoryProvider;
+import org.apache.vxquery.runtime.provider.VXQueryBinaryHashFunctionFamilyProvider;
 import org.apache.vxquery.types.BuiltinTypeRegistry;
 import org.apache.vxquery.types.Quantifier;
 import org.apache.vxquery.types.SequenceType;
@@ -115,6 +116,7 @@ public class XMLQueryCompiler {
             }
         });
         builder.setHashFunctionFactoryProvider(VXQueryBinaryHashFunctionFactoryProvider.INSTANCE);
+        builder.setHashFunctionFamilyProvider(VXQueryBinaryHashFunctionFamilyProvider.INSTANCE);
         builder.setTypeTraitProvider(new ITypeTraitProvider() {
             @Override
             public ITypeTraits getTypeTrait(Object type) {
@@ -196,9 +198,9 @@ public class XMLQueryCompiler {
         defaultLogicalRewrites.add(new Pair<AbstractRuleController, List<IAlgebraicRewriteRule>>(priorityCtrl,
                 RewriteRuleset.buildXQueryNormalizationRuleCollection()));
         defaultLogicalRewrites.add(new Pair<AbstractRuleController, List<IAlgebraicRewriteRule>>(seqCtrlFullDfs,
-                RewriteRuleset.buildNestedDataSourceRuleCollection()));
-        defaultLogicalRewrites.add(new Pair<AbstractRuleController, List<IAlgebraicRewriteRule>>(seqCtrlFullDfs,
                 RewriteRuleset.buildRedundantExpressionNormalizationRuleCollection()));
+        defaultLogicalRewrites.add(new Pair<AbstractRuleController, List<IAlgebraicRewriteRule>>(priorityCtrl,
+                RewriteRuleset.buildNestedDataSourceRuleCollection()));
         defaultLogicalRewrites.add(new Pair<AbstractRuleController, List<IAlgebraicRewriteRule>>(seqOnceCtrl,
                 RewriteRuleset.buildTypeInferenceRuleCollection()));
         defaultLogicalRewrites.add(new Pair<AbstractRuleController, List<IAlgebraicRewriteRule>>(seqCtrlFullDfs,


[19/50] [abbrv] git commit: Added join for all stations.

Posted by pr...@apache.org.
Added join for all stations.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/94aa026a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/94aa026a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/94aa026a

Branch: refs/heads/prestonc/hash_join
Commit: 94aa026aa3ced0aea8a9e5902a5c553ded67b1b8
Parents: 491e591
Author: Preston Carman <pr...@apache.org>
Authored: Fri Mar 14 11:36:09 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../resources/noaa-ghcn-daily/queries/q07.xq    | 22 +++++++++-----------
 1 file changed, 10 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/94aa026a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
index 412285c..c4e186d 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
@@ -1,15 +1,13 @@
 (: XQuery Join Aggregate Query :)
-(: Find the lowest recorded temperature (TMIN) for each station 2001.         :)
+(: Find the lowest recorded temperature (TMIN) for each station on 2000-01-01.:)
 let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
-for $s in collection($station_collection)/stationCollection/stations
+for $s in collection($station_collection)/stationCollection/station
 
-return fn:min(
-    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-    for $r in collection($sensor_collection)/dataCollection/data
-    
-    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
-    where $s/id eq $r/station
-        and $r/dataType eq "TMIN" 
-        and fn:year-from-date($date) eq 2001
-    return $r/value
-) div 10
\ No newline at end of file
+let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r in collection($sensor_collection)/dataCollection/data
+
+let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
+where $s/id eq $r/station
+    and $r/dataType eq "TMAX" 
+    and $date eq xs:date("2000-01-01")
+return ($s/displayName, $r/value)
\ No newline at end of file


[03/50] [abbrv] git commit: Adding options to build out symbolic links to partitioned data for specific benchmark tests. Also have a method to copy queries over and change the collection references to the symbolic links.

Posted by pr...@apache.org.
Adding options to build out symbolic links to partitioned data for specific benchmark tests. Also have a method to copy queries over and change the collection references to the symbolic links.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/b43fe330
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/b43fe330
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/b43fe330

Branch: refs/heads/prestonc/hash_join
Commit: b43fe330fdbda9701374e786e2c82f85a3898065
Parents: a09d1f5
Author: Preston Carman <pr...@apache.org>
Authored: Sun Feb 23 17:38:13 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 .../scripts/weather_benchmark.py                | 269 +++++++++++++++++++
 .../noaa-ghcn-daily/scripts/weather_cli.py      |  28 +-
 .../noaa-ghcn-daily/scripts/weather_config.py   |  23 +-
 .../scripts/weather_data_files.py               |   7 +-
 .../noaa-ghcn-daily/scripts/weather_example.xml |   2 +
 .../scripts/weather_example_cluster.xml         |  56 ++++
 6 files changed, 364 insertions(+), 21 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/b43fe330/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
new file mode 100644
index 0000000..68c93b3
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -0,0 +1,269 @@
+#!/usr/bin/env python
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#     http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+import glob
+import os.path
+import linecache
+import distutils.core
+import fileinput
+import socket
+
+from weather_config import *
+from weather_data_files import *
+from collections import OrderedDict
+
+# Weather data files created to manage the conversion process.
+# Allows partition and picking up where you left off.
+#
+# benchmark_name/
+#   data/
+#   queries/
+#   logs/
+class WeatherBenchmark:
+
+    QUERY_REPLACEMENT_KEY = "/tmp/1.0_partition_ghcnd_all_xml/"
+    QUERY_MASTER_FOLDER = "../queries/"
+    QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq", "q04.xq", "q05.xq"] 
+    BENCHMARK_LOCAL_TESTS = ["local_speed_up"] 
+    BENCHMARK_CLUSTER_TESTS = ["speed_up", "batch_scale_out"] 
+    QUERY_COLLECTIONS = ["sensors", "stations"]
+
+    SEPERATOR = "|"
+    
+    def __init__(self, base_paths, partitions, dataset, nodes):
+        self.base_paths = base_paths
+        self.partitions = partitions
+        self.dataset = dataset
+        self.nodes = nodes
+        
+    def build_data_links(self, xml_save_path):
+        if (len(self.base_paths) == 0):
+            return
+        for test in self.dataset.get_tests():
+            if test in self.BENCHMARK_LOCAL_TESTS:
+                self.build_local_data_links(test, xml_save_path)
+            elif test in self.BENCHMARK_CLUSTER_TESTS:
+                self.build_cluster_data_links(test, xml_save_path)
+            else:
+                print "Unknown test."
+                exit()
+            
+    def build_local_data_links(self, test, xml_save_path):
+        virtual_partitions = get_local_virtual_partitions(self.partitions)
+        data_paths = get_partition_paths(virtual_partitions, self.base_paths)
+        for i in self.partitions:
+            link_base_paths = get_partition_paths(i, self.base_paths, "data_links/" + test)
+            # Match link paths to real data paths.
+            offset = 0
+            group_size = len(data_paths) / len(link_base_paths)
+            print "g " + str(group_size)
+            print link_base_paths
+            print data_paths
+            for link_index, link_path in enumerate(link_base_paths):
+                for data_index, data_path in  enumerate(data_paths):
+                    print index, offset, group_size, link_index, data_index
+                    if offset <= data_index and data_index < offset + group_size:
+                        self.add_collection_links_for(data_path, link_path, data_index)
+                offset += group_size
+    
+    def build_cluster_data_links(self, test, xml_save_path):
+        node_index = self.get_current_node_index()
+        if node_index == -1:
+            print "Unknown host."
+            return 
+        
+        virtual_partitions = get_cluster_virtual_partitions(self.nodes, self.partitions)
+        data_paths = get_partition_paths(virtual_partitions, self.base_paths)
+        link_base_paths = get_cluster_link_paths(len(self.nodes), self.base_paths, "data_links/" + test)
+
+        # Match link paths to real data paths.
+        link_base_paths.sort()
+        for link_index, link_path in enumerate(link_base_paths):
+            if os.path.isdir(link_path):
+                shutil.rmtree(link_path)
+            # Prep
+            link_offset = link_index % len(self.nodes)
+            disk_offset = link_index // len(self.nodes)
+            if test == "speed_up":
+                group_size = len(data_paths) / (link_offset + 1) / (len(self.base_paths))
+            elif test == "batch_scale_out":
+                group_size = len(data_paths) / len(self.nodes) / (len(self.base_paths))
+            else:
+                print "Unknown test."
+                return
+            node_offset = group_size * node_index
+            for j in range(disk_offset):
+                node_offset += len(data_paths) / (len(self.base_paths))
+            has_data = True
+            if link_offset < node_index:
+                has_data = False
+                    
+            # Make links
+            data_paths.sort()
+            for data_index, data_path in enumerate(data_paths):
+                if has_data and node_offset <= data_index and data_index < node_offset + group_size:
+                    self.add_collection_links_for(data_path, link_path, data_index)
+            self.add_collection_links_for("", link_path, -1)
+    
+    def get_current_node_index(self):
+        found = False
+        node_index = 0
+        for machine in self.nodes:
+            if socket.gethostname() == machine.get_node_name():
+                found = True
+                break
+            node_index += 1
+    
+        if found:
+            return node_index
+        else:
+            return -1
+    
+    def add_collection_links_for(self, real_path, link_path, index):
+        for collection in self.QUERY_COLLECTIONS:
+            collection_path = link_path + "/" + collection
+            if not os.path.isdir(collection_path):
+                os.makedirs(collection_path)
+            if index >= 0:
+                os.symlink(real_path + "/" + collection, collection_path + "/index" + str(index))
+            
+    def get_partition_folders(self, base_path):
+        glob.glob(base_path + "partitions/d*_p*_i*")
+            
+#         test_data_path = self.base_path + "/" + self.test + "/data"
+#         if not os.path.isdir(test_data_path):
+#             os.makedirs(test_data_path)
+#     
+#         if self.test == "local_speed_up":
+#             for i in range(virtual_partitions):
+#                 # one virtual partition per disk
+#                 split = 0
+#                 for j in range(len(base_paths)):
+#                     # for each disk look at each partition
+#                     for index, path in enumerate(partition_list):
+#                         offset = partitions * j
+#                         group = partitions / (i + 1)
+#                         
+#                         if (group) * split + offset <= index and index < (group) * (split + 1) + offset:
+#                             split += 1
+#                         
+#                         test_partition_path = test_data_path + "/p" + str(i + 1) + ".i" + str(split) + ".d" + str(j + 1)
+#                         if not os.path.isdir(test_partition_path):
+#                             os.makedirs(test_partition_path)
+#                         os.symlink(path, test_partition_path + "/index" + str(index))
+        
+
+    def copy_query_files(self):
+        for test in self.dataset.get_tests():
+            if test in self.BENCHMARK_LOCAL_TESTS:
+                self.copy_local_query_files(test)
+            elif test in self.BENCHMARK_CLUSTER_TESTS:
+                self.copy_cluster_query_files(test)
+            else:
+                print "Unknown test."
+                exit()
+            
+    def copy_cluster_query_files(self, test):
+        partitions = self.dataset.get_partitions()[0]
+        for i in range(len(self.nodes)):
+            query_path = get_cluster_query_path(self.base_paths, test, i)
+        
+            if not os.path.isdir(query_path):
+                os.makedirs(query_path)
+        
+            # Copy query files.
+            node_partitions = get_partition_paths(partitions, self.base_paths, "data_links/" + test + "/" + str(i) + "nodes")
+            self.copy_and_replace_query(query_path, node_partitions)
+
+    def copy_local_query_files(self, test):
+        for i in self.partitions:
+            query_path = get_local_query_path(self.base_paths, test, i)
+        
+            if not os.path.isdir(query_path):
+                os.makedirs(query_path)
+    
+            # Copy query files.
+            self.copy_and_replace_query(query_path, get_partition_paths(i, self.base_paths))
+
+    def copy_and_replace_query(self, query_path, replacement_list):
+        '''Copy the query files over to the query_path and replace the path
+        for the where the collection data is located.'''
+        for query_file in self.QUERY_FILE_LIST:
+            shutil.copyfile(self.QUERY_MASTER_FOLDER + query_file, query_path + query_file)
+        
+            # Make a search replace for each collection.
+            for collection in self.QUERY_COLLECTIONS:
+                replacement_list_with_type = []
+                for replace in replacement_list:
+                    replacement_list_with_type.append(replace + collection)
+
+                replace_string = self.SEPERATOR.join(replacement_list_with_type)
+                for line in fileinput.input(query_path + query_file, True):
+                    sys.stdout.write(line.replace(self.QUERY_REPLACEMENT_KEY + collection, replace_string))
+                    
+    def get_number_of_slices(self):
+        print self.dataset
+        if len(self.dataset.get_tests()) == 0:
+            print "No test has been defined in config file."
+        else:
+            for test in self.dataset.get_tests():
+                print "test = " + test
+                if test in self.BENCHMARK_LOCAL_TESTS:
+                    return get_local_virtual_partitions(self.partitions)
+                elif test in self.BENCHMARK_CLUSTER_TESTS:
+                    return get_cluster_virtual_partitions(self.nodes, self.partitions)
+                else:
+                    print "Unknown test."
+                    exit()
+
+
+def get_cluster_link_paths(nodes, base_paths, key="partitions"):        
+    link_paths = []
+    for i in range(0, nodes):
+        for j in range(0, len(base_paths)):
+            new_link_path = base_paths[j] + key + "/" + str(i) + "nodes/"
+            link_paths.append(new_link_path)
+    return link_paths
+
+
+
+def get_local_query_path(base_paths, test, partition):        
+    return base_paths[0] + "queries/" + test + "/" + get_local_query_folder(len(base_paths), partition) + "/"
+
+def get_local_query_folder(disks, partitions):        
+    return "d" + str(disks) + "_p" + str(partitions)
+
+def get_cluster_query_path(base_paths, test, nodes):        
+    return base_paths[0] + "queries/" + test + "/" + str(nodes) + "nodes/"
+
+def get_cluster_virtual_partitions(nodes, partitions):
+    if len(partitions) != 1:
+        print "Cluster configurations must only have one partition."
+        exit()
+    return calculate_partitions(range(len(nodes), 0, -1))
+
+def get_local_virtual_partitions(partitions):
+    return calculate_partitions(partitions)
+
+def calculate_partitions(list):
+    x = 1
+    for i in list:
+        if x % i != 0:
+            if i % x == 0:
+                x = i
+            else:
+                x *= i
+    return x

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/b43fe330/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
index c69133e..92145a2 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
@@ -21,6 +21,7 @@ from weather_data_files import *
 from weather_download_files import *
 from weather_convert_to_xml import *
 from weather_config import *
+from weather_benchmark import *
 
 DEBUG_OUTPUT = False
 COMPRESSED = False
@@ -78,7 +79,7 @@ def main(argv):
                 print 'Error: Argument must be a file name for --file (-f).'
                 sys.exit()
         elif opt in ('-l', "--locality"):
-            if arg in ("download", "progress_file", "sensor_build", "station_build", "partition", "test_links", "statistics"):
+            if arg in ("download", "progress_file", "sensor_build", "station_build", "partition", "test_links",  "queries", "statistics"):
                 section = arg
             else:
                 print 'Error: Argument must be a string for --locality (-l) and a valid locality.'
@@ -205,26 +206,27 @@ def main(argv):
         dataset_folder = "/dataset-" + dataset.get_name()
         progress_file = config.get_save_path() + dataset_folder + "/_data_progress.csv"
         data = WeatherDataFiles(ghcnd_data_dly_path, progress_file)
+
         base_paths = []
         for paths in dataset.get_save_paths():
             base_paths.append(paths + dataset_folder + "/")
-
+        benchmark = WeatherBenchmark(base_paths, dataset.get_partitions(), dataset, config.get_node_machine_list())
+        
         if section in ("all", "partition"):
-            for partition in dataset.get_partitions():
-                print 'Processing the partition section (' + dataset.get_name() + ':d' + str(len(base_paths)) + ':p' + str(partition) + ').'
-                data.reset()
-                data.copy_to_n_partitions(xml_data_save_path, partition, base_paths)
+            slices = benchmark.get_number_of_slices()
+            print 'Processing the partition section (' + dataset.get_name() + ':d' + str(len(base_paths)) + ':s' + str(slices) + ').'
+            data.reset()
+            data.copy_to_n_partitions(xml_data_save_path, slices, base_paths)
     
         if section in ("all", "test_links"):
             # TODO determine current node 
-            if test and partitions > 0 and virtual_partitions > 0 and nodes > -1:
-                print 'Processing the test links section.'
-                data.reset()
-                data.create_test_links(config.get_save_path(), xml_data_save_path, test, nodes, partitions, virtual_partitions, base_paths)
-            else:
-                print 'Error: Not enough information for this section.'
-                sys.exit()
+            print 'Processing the test links section (' + dataset.get_name() + ').'
+            benchmark.build_data_links(xml_data_save_path)
 
+        if section in ("all", "queries"):
+            print 'Processing the queries section (' + dataset.get_name() + ').'
+            benchmark.copy_query_files()
+    
 #     if section in ("statistics"):
 #         print 'Processing the statistics section.'
 #         data.print_progress_file_stats(convert)

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/b43fe330/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py
index fa12342..9d2e289 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py
@@ -42,7 +42,8 @@ class WeatherConfig:
             name = self.get_dataset_name(node)
             save_paths = self.get_dataset_save_paths(node)
             partitions = self.get_dataset_partitions(node)
-            nodes.append(Dataset(name, save_paths, partitions))
+            tests = self.get_dataset_tests(node)
+            nodes.append(Dataset(name, save_paths, partitions, tests))
         return nodes
 
 
@@ -64,16 +65,22 @@ class WeatherConfig:
 
     def get_dataset_save_paths(self, node):
         paths = []
-        for node in node.getElementsByTagName("save_path"):
-            paths.append(self.get_text(node))
+        for item in node.getElementsByTagName("save_path"):
+            paths.append(self.get_text(item))
         return paths
 
     def get_dataset_partitions(self, node):
         paths = []
-        for node in node.getElementsByTagName("partitions_per_path"):
-            paths.append(int(self.get_text(node)))
+        for item in node.getElementsByTagName("partitions_per_path"):
+            paths.append(int(self.get_text(item)))
         return paths
 
+    def get_dataset_tests(self, node):
+        tests = []
+        for item in node.getElementsByTagName("test"):
+            tests.append(self.get_text(item))
+        return tests
+
     def get_text(self, xml_node):
         rc = []
         for node in xml_node.childNodes:
@@ -96,10 +103,11 @@ class Machine:
         return self.id + "(" + self.ip + ")"
     
 class Dataset:
-    def __init__(self, name, save_paths, partitions):
+    def __init__(self, name, save_paths, partitions, tests):
         self.name = name
         self.save_paths = save_paths
         self.partitions = partitions
+        self.tests = tests
     
     def get_name(self):
         return self.name
@@ -110,6 +118,9 @@ class Dataset:
     def get_partitions(self):
         return self.partitions
     
+    def get_tests(self):
+        return self.tests
+    
     def __repr__(self):
         return self.name + ":" + str(self.save_paths) + ":" + str(self.partitions)
     

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/b43fe330/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
index be85c69..42dea81 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
@@ -347,12 +347,15 @@ class WeatherDataFiles:
                 break
         return columns[self.INDEX_DATA_FILE_NAME]
     
-def get_partition_paths(partitions, base_paths):        
+def get_partition_paths(partitions, base_paths, key = "partitions"):        
     partition_paths = []
     for i in range(0, partitions):
         for j in range(0, len(base_paths)):
-            new_partition_path = base_paths[j] + "partitions/" + str(len(base_paths)) + "disk/d" + str(j) +"_p" + str(partitions) + "_i" + str(i) + "/"
+            new_partition_path = base_paths[j] + key + "/" + get_partition_folder(j, partitions, i) + "/"
             partition_paths.append(new_partition_path)
     return partition_paths
 
+def get_partition_folder(disks, partitions, index):        
+    return "d" + str(disks) +"_p" + str(partitions) + "_i" + str(index)
+
 

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/b43fe330/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
index b8e60fd..7af1e9d 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
@@ -24,6 +24,7 @@
     </node>
     <dataset>
         <name>tiny</name>
+        <test>local_speed_up</test>
         <save_path>/data</save_path>
         <partitions_per_path>1</partitions_per_path>
         <partitions_per_path>2</partitions_per_path>
@@ -32,6 +33,7 @@
     </dataset>
     <dataset>
         <name>small</name>
+        <test>local_speed_up</test>
         <save_path>/data</save_path>
         <partitions_per_path>4</partitions_per_path>
         <partitions_per_path>8</partitions_per_path>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/b43fe330/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
new file mode 100644
index 0000000..34be0df
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
@@ -0,0 +1,56 @@
+<!--
+  Licensed to the Apache Software Foundation (ASF) under one or more
+  contributor license agreements.  See the NOTICE file distributed with
+  this work for additional information regarding copyright ownership.
+  The ASF licenses this file to You under the Apache License, Version 2.0
+  (the "License"); you may not use this file except in compliance with
+  the License.  You may obtain a copy of the License at
+
+      http://www.apache.org/licenses/LICENSE-2.0
+
+  Unless required by applicable law or agreed to in writing, software
+  distributed under the License is distributed on an "AS IS" BASIS,
+  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+  See the License for the specific language governing permissions and
+  limitations under the License.
+-->
+<data xmlns="data">
+    <name>Cluster Example</name>
+    <save_path>/data</save_path>
+    <package>all</package>
+    <node>
+        <name>machine1</name>
+        <ip_address>127.0.0.1</ip_address>
+    </node>
+    <node>
+        <name>machine2</name>
+        <ip_address>127.0.0.2</ip_address>
+    </node>
+    <node>
+        <name>machine3</name>
+        <ip_address>127.0.0.3</ip_address>
+    </node>
+    <node>
+        <name>machine4</name>
+        <ip_address>127.0.0.4</ip_address>
+    </node>
+    <node>
+        <name>machine5</name>
+        <ip_address>127.0.0.5</ip_address>
+    </node>
+    <dataset>
+        <name>tiny-1drive</name>
+        <test>speed_up</test>
+        <test>batch_scale_out</test>
+        <save_path>/data</save_path>
+        <partitions_per_path>4</partitions_per_path>
+    </dataset>
+    <dataset>
+        <name>small-2drives</name>
+        <test>speed_up</test>
+        <test>batch_scale_out</test>
+        <save_path>/data</save_path>
+        <save_path>/data2</save_path>
+        <partitions_per_path>2</partitions_per_path>
+    </dataset>
+</data>


[09/50] [abbrv] git commit: Added support for unnest in expression toolbox sequence matching.

Posted by pr...@apache.org.
Added support for unnest in expression toolbox sequence matching.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/735140b0
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/735140b0
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/735140b0

Branch: refs/heads/prestonc/hash_join
Commit: 735140b058d7f4dcc35595ba21c0bd164ea6b225
Parents: 9f14f92
Author: Preston Carman <pr...@apache.org>
Authored: Tue Mar 4 17:27:21 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 ...stractRemoveRedundantTypeExpressionsRule.java |  3 ++-
 .../rewriter/rules/util/ExpressionToolbox.java   | 19 ++++++++++++-------
 2 files changed, 14 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/735140b0/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/AbstractRemoveRedundantTypeExpressionsRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/AbstractRemoveRedundantTypeExpressionsRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/AbstractRemoveRedundantTypeExpressionsRule.java
index 5298f2a..5d83be7 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/AbstractRemoveRedundantTypeExpressionsRule.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/AbstractRemoveRedundantTypeExpressionsRule.java
@@ -63,6 +63,7 @@ public abstract class AbstractRemoveRedundantTypeExpressionsRule implements IAlg
     private boolean processTypeExpression(Mutable<ILogicalOperator> opRef, Mutable<ILogicalExpression> search) {
         boolean modified = false;
         SequenceType inputSequenceType;
+        SequenceType sTypeArg;
         functionList.clear();
         ExpressionToolbox.findAllFunctionExpressions(search, getSearchFunction(), functionList);
         for (Mutable<ILogicalExpression> searchM : functionList) {
@@ -74,7 +75,7 @@ public abstract class AbstractRemoveRedundantTypeExpressionsRule implements IAlg
             inputSequenceType = ExpressionToolbox.getOutputSequenceType(opRef, argFirstM, dCtx);
 
             // Find the argument type.
-            SequenceType sTypeArg = null;
+            sTypeArg = null;
             if (hasTypeArgument()) {
                 sTypeArg = ExpressionToolbox.getTypeExpressionTypeArgument(searchM, dCtx);
             }

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/735140b0/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
index 7794ed0..dc9e0d3 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
@@ -20,7 +20,6 @@ import java.util.List;
 
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.vxquery.compiler.algebricks.VXQueryConstantValue;
-import org.apache.vxquery.context.RootStaticContextImpl;
 import org.apache.vxquery.context.StaticContextImpl;
 import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
 import org.apache.vxquery.functions.BuiltinFunctions;
@@ -33,13 +32,13 @@ import org.apache.vxquery.types.SequenceType;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalOperator;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalExpressionTag;
-import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalOperatorTag;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalVariable;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.ConstantExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.VariableReferenceExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
+import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.UnnestOperator;
 import edu.uci.ics.hyracks.data.std.primitive.IntegerPointable;
 
 public class ExpressionToolbox {
@@ -171,8 +170,7 @@ public class ExpressionToolbox {
         return pTypeCode.getInteger();
     }
 
-    public static SequenceType getTypeExpressionTypeArgument(Mutable<ILogicalExpression> searchM,
-            StaticContextImpl dCtx) {
+    public static SequenceType getTypeExpressionTypeArgument(Mutable<ILogicalExpression> searchM, StaticContextImpl dCtx) {
         int typeId = getTypeExpressionTypeArgument(searchM);
         if (typeId > 0) {
             return dCtx.lookupSequenceType(typeId);
@@ -209,10 +207,17 @@ public class ExpressionToolbox {
                     return null;
                 }
                 AbstractLogicalOperator variableOp = (AbstractLogicalOperator) variableProducer.getValue();
-                if (variableOp.getOperatorTag() == LogicalOperatorTag.DATASOURCESCAN) {
-                    return SequenceType.create(AnyNodeType.INSTANCE, Quantifier.QUANT_ONE);
+                switch (variableOp.getOperatorTag()) {
+                    case DATASOURCESCAN:
+                        return SequenceType.create(AnyNodeType.INSTANCE, Quantifier.QUANT_ONE);
+                    case UNNEST:
+                        UnnestOperator unnest = (UnnestOperator) variableOp;
+                        return getOutputSequenceType(variableProducer, unnest.getExpressionRef(), dCtx);
+                    default:
+                        // TODO Consider support for other operators. i.e. Assign.
+                        break;
                 }
-                // TODO Consider support for other operators. i.e. Assign.
+
         }
         return null;
     }


[25/50] [abbrv] git commit: Updated the job specifications print out to use the JSON printer.

Posted by pr...@apache.org.
Updated the job specifications print out to use the JSON printer.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/59e536a6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/59e536a6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/59e536a6

Branch: refs/heads/prestonc/hash_join
Commit: 59e536a699624f5a1c7e77bafb8a09758f4733ba
Parents: a74fd60
Author: Preston Carman <pr...@apache.org>
Authored: Thu Mar 20 16:28:26 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../src/main/java/org/apache/vxquery/cli/VXQuery.java        | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/59e536a6/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
----------------------------------------------------------------------
diff --git a/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java b/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
index de1f52f..3f0975a 100644
--- a/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
+++ b/vxquery-cli/src/main/java/org/apache/vxquery/cli/VXQuery.java
@@ -41,6 +41,7 @@ import org.apache.vxquery.xmlquery.ast.ModuleNode;
 import org.apache.vxquery.xmlquery.query.Module;
 import org.apache.vxquery.xmlquery.query.XMLQueryCompiler;
 import org.apache.vxquery.xmlquery.query.XQueryCompilationListener;
+import org.json.JSONException;
 import org.kohsuke.args4j.Argument;
 import org.kohsuke.args4j.CmdLineParser;
 import org.kohsuke.args4j.Option;
@@ -187,7 +188,12 @@ public class VXQuery {
                 public void notifyCodegenResult(Module module) {
                     if (opts.showRP) {
                         JobSpecification jobSpec = module.getHyracksJobSpecification();
-                        System.err.println(jobSpec.toString());
+                        try {
+                            System.err.println(jobSpec.toJSON().toString(2));
+                        } catch (JSONException e) {
+                            e.printStackTrace();
+                            System.err.println(jobSpec.toString());
+                        }
                     }
                 }
 


[41/50] [abbrv] git commit: The if statement did not match the assignment order.

Posted by pr...@apache.org.
The if statement did not match the assignment order.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/deabbf73
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/deabbf73
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/deabbf73

Branch: refs/heads/prestonc/hash_join
Commit: deabbf7307f5612e4f8a0c0c3efb03c5c290f2bf
Parents: 3d64ae3
Author: Preston Carman <pr...@apache.org>
Authored: Tue Apr 1 17:08:38 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:26 2014 -0700

----------------------------------------------------------------------
 .../vxquery/datamodel/accessors/atomic/XSDecimalPointable.java   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/deabbf73/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
index 0ebcd29..8aca4a0 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/accessors/atomic/XSDecimalPointable.java
@@ -70,9 +70,9 @@ public class XSDecimalPointable extends AbstractPointable implements IHashable,
         // TODO double check that precision is not being lost.
         int diff = p - op;
         if (diff > 0) {
-            v = Math.round(v / Math.pow(10, diff));
-        } else if (diff < 0) {
             ov = Math.round(ov / Math.pow(10, diff));
+        } else if (diff < 0) {
+            v = Math.round(v / Math.pow(10, diff));
         }
 
         return v < ov ? -1 : (v > ov ? 1 : 0);


[35/50] [abbrv] git commit: Added

Posted by pr...@apache.org.
Added


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/99a4555a
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/99a4555a
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/99a4555a

Branch: refs/heads/prestonc/hash_join
Commit: 99a4555a505c21b767aa0476ef448f58ecc6581e
Parents: 32f6b97
Author: Preston Carman <pr...@apache.org>
Authored: Mon Mar 17 18:10:42 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../rules/IntroduceTwoStepAggregateRule.java    |  58 +++++----
 .../vxquery/functions/builtin-operators.xml     |  14 +++
 .../AvgGlobalAggregateEvaluatorFactory.java     | 117 +++++++++++++++++++
 .../AvgLocalAggregateEvaluatorFactory.java      | 104 +++++++++++++++++
 4 files changed, 263 insertions(+), 30 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/99a4555a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceTwoStepAggregateRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceTwoStepAggregateRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceTwoStepAggregateRule.java
index 29cf34f..d6f302c 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceTwoStepAggregateRule.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/IntroduceTwoStepAggregateRule.java
@@ -16,10 +16,15 @@
  */
 package org.apache.vxquery.compiler.rewriter.rules;
 
+import java.util.HashMap;
+import java.util.Map;
+
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.vxquery.functions.BuiltinFunctions;
+import org.apache.vxquery.functions.BuiltinOperators;
 
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.common.utils.Pair;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalOperator;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.IOptimizationContext;
@@ -27,6 +32,8 @@ import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalExpressionTag;
 import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalOperatorTag;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
 import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AggregateFunctionCallExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
+import edu.uci.ics.hyracks.algebricks.core.algebra.functions.IFunctionInfo;
 import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
 import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AggregateOperator;
 import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
@@ -50,6 +57,9 @@ import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
  *   if (af1 == count) aggregate operating settings:
  *     Step 1: count
  *     Step 2: sum
+ *   if (af1 == avg) aggregate operating settings:
+ *     Step 1: avg-local
+ *     Step 2: avg-global
  *   if (af1 in (max, min, sum)) aggregate operating settings:
  *     Step 1: af1
  *     Step 2: af1
@@ -58,6 +68,21 @@ import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
  * @author prestonc
  */
 public class IntroduceTwoStepAggregateRule implements IAlgebraicRewriteRule {
+    final Map<FunctionIdentifier, Pair<IFunctionInfo, IFunctionInfo>> AGGREGATE_MAP = new HashMap<FunctionIdentifier, Pair<IFunctionInfo, IFunctionInfo>>();
+
+    public IntroduceTwoStepAggregateRule() {
+        AGGREGATE_MAP.put(BuiltinFunctions.FN_AVG_1.getFunctionIdentifier(), new Pair<IFunctionInfo, IFunctionInfo>(
+                BuiltinOperators.AVG_LOCAL, BuiltinOperators.AVG_GLOBAL));
+        AGGREGATE_MAP.put(BuiltinFunctions.FN_COUNT_1.getFunctionIdentifier(), new Pair<IFunctionInfo, IFunctionInfo>(
+                BuiltinFunctions.FN_COUNT_1, BuiltinFunctions.FN_SUM_1));
+        AGGREGATE_MAP.put(BuiltinFunctions.FN_MAX_1.getFunctionIdentifier(), new Pair<IFunctionInfo, IFunctionInfo>(
+                BuiltinFunctions.FN_MAX_1, BuiltinFunctions.FN_MAX_1));
+        AGGREGATE_MAP.put(BuiltinFunctions.FN_MIN_1.getFunctionIdentifier(), new Pair<IFunctionInfo, IFunctionInfo>(
+                BuiltinFunctions.FN_MIN_1, BuiltinFunctions.FN_MIN_1));
+        AGGREGATE_MAP.put(BuiltinFunctions.FN_SUM_1.getFunctionIdentifier(), new Pair<IFunctionInfo, IFunctionInfo>(
+                BuiltinFunctions.FN_SUM_1, BuiltinFunctions.FN_SUM_1));
+    }
+
     @Override
     public boolean rewritePre(Mutable<ILogicalOperator> opRef, IOptimizationContext context) throws AlgebricksException {
         // Check if aggregate function.
@@ -74,41 +99,14 @@ public class IntroduceTwoStepAggregateRule implements IAlgebraicRewriteRule {
         }
         AbstractFunctionCallExpression functionCall = (AbstractFunctionCallExpression) logicalExpression;
 
-        if (functionCall.getFunctionIdentifier().equals(BuiltinFunctions.FN_COUNT_1.getFunctionIdentifier())) {
-            AggregateFunctionCallExpression aggregateFunctionCall = (AggregateFunctionCallExpression) functionCall;
-            if (aggregateFunctionCall.isTwoStep()) {
-                return false;
-            }
-            aggregateFunctionCall.setTwoStep(true);
-            aggregateFunctionCall.setStepOneAggregate(BuiltinFunctions.FN_COUNT_1);
-            aggregateFunctionCall.setStepTwoAggregate(BuiltinFunctions.FN_SUM_1);
-            return true;
-        } else if (functionCall.getFunctionIdentifier().equals(BuiltinFunctions.FN_MAX_1.getFunctionIdentifier())) {
-            AggregateFunctionCallExpression aggregateFunctionCall = (AggregateFunctionCallExpression) functionCall;
-            if (aggregateFunctionCall.isTwoStep()) {
-                return false;
-            }
-            aggregateFunctionCall.setTwoStep(true);
-            aggregateFunctionCall.setStepOneAggregate(BuiltinFunctions.FN_MAX_1);
-            aggregateFunctionCall.setStepTwoAggregate(BuiltinFunctions.FN_MAX_1);
-            return true;
-        } else if (functionCall.getFunctionIdentifier().equals(BuiltinFunctions.FN_MIN_1.getFunctionIdentifier())) {
-            AggregateFunctionCallExpression aggregateFunctionCall = (AggregateFunctionCallExpression) functionCall;
-            if (aggregateFunctionCall.isTwoStep()) {
-                return false;
-            }
-            aggregateFunctionCall.setTwoStep(true);
-            aggregateFunctionCall.setStepOneAggregate(BuiltinFunctions.FN_MIN_1);
-            aggregateFunctionCall.setStepTwoAggregate(BuiltinFunctions.FN_MIN_1);
-            return true;
-        } else if (functionCall.getFunctionIdentifier().equals(BuiltinFunctions.FN_SUM_1.getFunctionIdentifier())) {
+        if (AGGREGATE_MAP.containsKey(functionCall.getFunctionIdentifier())) {
             AggregateFunctionCallExpression aggregateFunctionCall = (AggregateFunctionCallExpression) functionCall;
             if (aggregateFunctionCall.isTwoStep()) {
                 return false;
             }
             aggregateFunctionCall.setTwoStep(true);
-            aggregateFunctionCall.setStepOneAggregate(BuiltinFunctions.FN_SUM_1);
-            aggregateFunctionCall.setStepTwoAggregate(BuiltinFunctions.FN_SUM_1);
+            aggregateFunctionCall.setStepOneAggregate(AGGREGATE_MAP.get(functionCall.getFunctionIdentifier()).first);
+            aggregateFunctionCall.setStepTwoAggregate(AGGREGATE_MAP.get(functionCall.getFunctionIdentifier()).second);
             return true;
         }
         return false;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/99a4555a/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml b/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml
index 6a6c28d..ecf7542 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml
+++ b/vxquery-core/src/main/java/org/apache/vxquery/functions/builtin-operators.xml
@@ -515,6 +515,20 @@
         <return type="xs:boolean"/>
     </operator>
 
+    <!-- fn:avg-local($arg as xs:anyAtomicType*) as xs:anyAtomicType? -->
+    <operator name="opext:avg-local">
+        <param name="arg" type="xs:anyAtomicType*"/>
+        <return type="xs:anyAtomicType?"/>
+        <runtime type="aggregate" class="org.apache.vxquery.runtime.functions.aggregate.AvgLocalAggregateEvaluatorFactory"/>
+    </operator>
+
+    <!-- fn:avg-global($arg as xs:anyAtomicType*) as xs:anyAtomicType? -->
+    <operator name="opext:avg-global">
+        <param name="arg" type="xs:anyAtomicType*"/>
+        <return type="xs:anyAtomicType?"/>
+        <runtime type="aggregate" class="org.apache.vxquery.runtime.functions.aggregate.AvgGlobalAggregateEvaluatorFactory"/>
+    </operator>
+
     <!-- opext:ordered($arg as item()*) as item()* -->
     <operator name="opext:ordered">
         <param name="arg" type="item()*"/>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/99a4555a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgGlobalAggregateEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgGlobalAggregateEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgGlobalAggregateEvaluatorFactory.java
new file mode 100644
index 0000000..61ae69e
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgGlobalAggregateEvaluatorFactory.java
@@ -0,0 +1,117 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.runtime.functions.aggregate;
+
+import java.io.DataOutput;
+
+import org.apache.vxquery.datamodel.accessors.SequencePointable;
+import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
+import org.apache.vxquery.datamodel.values.ValueTag;
+import org.apache.vxquery.datamodel.values.XDMConstants;
+import org.apache.vxquery.exceptions.ErrorCode;
+import org.apache.vxquery.exceptions.SystemException;
+import org.apache.vxquery.runtime.functions.arithmetic.AddOperation;
+import org.apache.vxquery.runtime.functions.arithmetic.DivideOperation;
+import org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentAggregateEvaluator;
+import org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentAggregateEvaluatorFactory;
+import org.apache.vxquery.runtime.functions.util.FunctionHelper;
+
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import edu.uci.ics.hyracks.algebricks.runtime.base.IScalarEvaluator;
+import edu.uci.ics.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import edu.uci.ics.hyracks.data.std.api.IPointable;
+import edu.uci.ics.hyracks.data.std.primitive.LongPointable;
+import edu.uci.ics.hyracks.data.std.util.ArrayBackedValueStorage;
+
+public class AvgGlobalAggregateEvaluatorFactory extends AbstractTaggedValueArgumentAggregateEvaluatorFactory {
+    private static final long serialVersionUID = 1L;
+
+    public AvgGlobalAggregateEvaluatorFactory(IScalarEvaluatorFactory[] args) {
+        super(args);
+    }
+
+    @Override
+    protected IAggregateEvaluator createEvaluator(IScalarEvaluator[] args) throws AlgebricksException {
+        final ArrayBackedValueStorage abvsCount = new ArrayBackedValueStorage();
+        final DataOutput dOutCount = abvsCount.getDataOutput();
+        final ArrayBackedValueStorage abvsSum = new ArrayBackedValueStorage();
+        final DataOutput dOutSum = abvsSum.getDataOutput();
+        final AddOperation aOp = new AddOperation();
+        final DivideOperation aOpDivide = new DivideOperation();
+        final LongPointable longp = (LongPointable) LongPointable.FACTORY.createPointable();
+        final SequencePointable seq = (SequencePointable) SequencePointable.FACTORY.createPointable();
+        final TaggedValuePointable tvpArg = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
+
+        return new AbstractTaggedValueArgumentAggregateEvaluator(args) {
+            TaggedValuePointable tvpSum = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
+            TaggedValuePointable tvpCount = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
+
+            @Override
+            public void init() throws AlgebricksException {
+                try {
+                    abvsCount.reset();
+                    dOutCount.write(ValueTag.XS_INTEGER_TAG);
+                    dOutCount.writeLong(0);
+                    tvpCount.set(abvsCount);
+                    abvsSum.reset();
+                    dOutSum.write(ValueTag.XS_INTEGER_TAG);
+                    dOutSum.writeLong(0);
+                    tvpSum.set(abvsSum);
+                } catch (Exception e) {
+                    throw new AlgebricksException(e);
+                }
+            }
+
+            @Override
+            public void finish(IPointable result) throws AlgebricksException {
+                tvpCount.getValue(longp);
+                if (longp.getLong() == 0) {
+                    XDMConstants.setEmptySequence(result);
+                } else {
+                    // Set count as a TaggedValuePointable.
+                    try {
+                        FunctionHelper.arithmeticOperation(aOpDivide, dCtx, tvpSum, tvpCount, tvpSum);
+                        result.set(tvpSum);
+                    } catch (Exception e) {
+                        throw new AlgebricksException(e);
+                    }
+                }
+            }
+
+            @Override
+            protected void step(TaggedValuePointable[] args) throws SystemException {
+                TaggedValuePointable tvp = args[0];
+                if (tvp.getTag() == ValueTag.SEQUENCE_TAG) {
+                    tvp.getValue(seq);
+                    int seqLen = seq.getEntryCount();
+                    if (seqLen == 0) {
+                        // No results from nodes.
+                        return;
+                    } else if (seqLen == 2) {
+                        seq.getEntry(0, tvpArg);
+                        FunctionHelper.arithmeticOperation(aOp, dCtx, tvpArg, tvpCount, tvpCount);
+                        seq.getEntry(1, tvpArg);
+                        FunctionHelper.arithmeticOperation(aOp, dCtx, tvpArg, tvpSum, tvpSum);
+                    } else {
+                        throw new SystemException(ErrorCode.SYSE0001);
+                    }
+                }
+            }
+        };
+    }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/99a4555a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgLocalAggregateEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgLocalAggregateEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgLocalAggregateEvaluatorFactory.java
new file mode 100644
index 0000000..91657c6
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AvgLocalAggregateEvaluatorFactory.java
@@ -0,0 +1,104 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.runtime.functions.aggregate;
+
+import java.io.DataOutput;
+import java.io.IOException;
+
+import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
+import org.apache.vxquery.datamodel.builders.sequence.SequenceBuilder;
+import org.apache.vxquery.datamodel.values.ValueTag;
+import org.apache.vxquery.datamodel.values.XDMConstants;
+import org.apache.vxquery.exceptions.ErrorCode;
+import org.apache.vxquery.exceptions.SystemException;
+import org.apache.vxquery.runtime.functions.arithmetic.AddOperation;
+import org.apache.vxquery.runtime.functions.arithmetic.DivideOperation;
+import org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentAggregateEvaluator;
+import org.apache.vxquery.runtime.functions.base.AbstractTaggedValueArgumentAggregateEvaluatorFactory;
+import org.apache.vxquery.runtime.functions.util.FunctionHelper;
+
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.runtime.base.IAggregateEvaluator;
+import edu.uci.ics.hyracks.algebricks.runtime.base.IScalarEvaluator;
+import edu.uci.ics.hyracks.algebricks.runtime.base.IScalarEvaluatorFactory;
+import edu.uci.ics.hyracks.data.std.api.IPointable;
+import edu.uci.ics.hyracks.data.std.util.ArrayBackedValueStorage;
+
+public class AvgLocalAggregateEvaluatorFactory extends AbstractTaggedValueArgumentAggregateEvaluatorFactory {
+    private static final long serialVersionUID = 1L;
+
+    public AvgLocalAggregateEvaluatorFactory(IScalarEvaluatorFactory[] args) {
+        super(args);
+    }
+
+    @Override
+    protected IAggregateEvaluator createEvaluator(IScalarEvaluator[] args) throws AlgebricksException {
+        final TaggedValuePointable tvpCount = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
+        final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
+        final ArrayBackedValueStorage abvsSeq = new ArrayBackedValueStorage();
+        final SequenceBuilder sb = new SequenceBuilder();
+        final DataOutput dOut = abvs.getDataOutput();
+        final AddOperation aOp = new AddOperation();
+
+        return new AbstractTaggedValueArgumentAggregateEvaluator(args) {
+            long count;
+            TaggedValuePointable tvpSum = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
+
+            @Override
+            public void init() throws AlgebricksException {
+                count = 0;
+            }
+
+            @Override
+            public void finish(IPointable result) throws AlgebricksException {
+                if (count == 0) {
+                    XDMConstants.setEmptySequence(result);
+                } else {
+                    // Set count as a TaggedValuePointable.
+                    try {
+                        abvs.reset();
+                        dOut.write(ValueTag.XS_INTEGER_TAG);
+                        dOut.writeLong(count);
+                        tvpCount.set(abvs);
+
+                        // Save intermediate result.
+                        abvsSeq.reset();
+                        sb.reset(abvsSeq);
+                        sb.addItem(tvpCount);
+                        sb.addItem(tvpSum);
+                        sb.finish();
+                        result.set(abvsSeq);
+                    } catch (Exception e) {
+                        throw new AlgebricksException(e);
+                    }
+                }
+            }
+
+            @Override
+            protected void step(TaggedValuePointable[] args) throws SystemException {
+                TaggedValuePointable tvp = args[0];
+                if (count == 0) {
+                    // Init.
+                    tvpSum.set(tvp);
+                } else {
+                    FunctionHelper.arithmeticOperation(aOp, dCtx, tvp, tvpSum, tvpSum);
+                }
+                count++;
+            }
+        };
+    }
+}
\ No newline at end of file


[02/50] [abbrv] git commit: A few clean up items when cleaning up and standardizing the benchmark config file to look similar the server config file.

Posted by pr...@apache.org.
A few clean up items when cleaning up and standardizing the benchmark config file to look similar the server config file.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/fda09916
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/fda09916
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/fda09916

Branch: refs/heads/prestonc/hash_join
Commit: fda0991687db8719a4a105b9db20337fa58a03ec
Parents: b43fe33
Author: Preston Carman <pr...@apache.org>
Authored: Mon Feb 24 14:02:29 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 .../scripts/weather_benchmark.py                | 26 --------------
 .../noaa-ghcn-daily/scripts/weather_cli.py      | 11 ++----
 .../noaa-ghcn-daily/scripts/weather_config.py   |  4 +--
 .../scripts/weather_data_files.py               | 36 ++------------------
 .../scripts/weather_download_files.py           |  2 +-
 .../noaa-ghcn-daily/scripts/weather_example.xml |  6 ++--
 .../scripts/weather_example_cluster.xml         | 22 ++++++------
 .../src/main/resources/scripts/cluster_cli.py   |  2 +-
 8 files changed, 22 insertions(+), 87 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/fda09916/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index 68c93b3..6d9301e 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -23,7 +23,6 @@ import socket
 
 from weather_config import *
 from weather_data_files import *
-from collections import OrderedDict
 
 # Weather data files created to manage the conversion process.
 # Allows partition and picking up where you left off.
@@ -143,29 +142,6 @@ class WeatherBenchmark:
     def get_partition_folders(self, base_path):
         glob.glob(base_path + "partitions/d*_p*_i*")
             
-#         test_data_path = self.base_path + "/" + self.test + "/data"
-#         if not os.path.isdir(test_data_path):
-#             os.makedirs(test_data_path)
-#     
-#         if self.test == "local_speed_up":
-#             for i in range(virtual_partitions):
-#                 # one virtual partition per disk
-#                 split = 0
-#                 for j in range(len(base_paths)):
-#                     # for each disk look at each partition
-#                     for index, path in enumerate(partition_list):
-#                         offset = partitions * j
-#                         group = partitions / (i + 1)
-#                         
-#                         if (group) * split + offset <= index and index < (group) * (split + 1) + offset:
-#                             split += 1
-#                         
-#                         test_partition_path = test_data_path + "/p" + str(i + 1) + ".i" + str(split) + ".d" + str(j + 1)
-#                         if not os.path.isdir(test_partition_path):
-#                             os.makedirs(test_partition_path)
-#                         os.symlink(path, test_partition_path + "/index" + str(index))
-        
-
     def copy_query_files(self):
         for test in self.dataset.get_tests():
             if test in self.BENCHMARK_LOCAL_TESTS:
@@ -215,12 +191,10 @@ class WeatherBenchmark:
                     sys.stdout.write(line.replace(self.QUERY_REPLACEMENT_KEY + collection, replace_string))
                     
     def get_number_of_slices(self):
-        print self.dataset
         if len(self.dataset.get_tests()) == 0:
             print "No test has been defined in config file."
         else:
             for test in self.dataset.get_tests():
-                print "test = " + test
                 if test in self.BENCHMARK_LOCAL_TESTS:
                     return get_local_virtual_partitions(self.partitions)
                 elif test in self.BENCHMARK_CLUSTER_TESTS:

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/fda09916/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
index 92145a2..0f529f2 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
@@ -34,7 +34,6 @@ COMPRESSED = False
 def main(argv):
     append = False
     max_records = 0
-    package = "ghcnd_gsn"
     process_file_name = ""
     reset = False
     section = "all"
@@ -79,7 +78,7 @@ def main(argv):
                 print 'Error: Argument must be a file name for --file (-f).'
                 sys.exit()
         elif opt in ('-l', "--locality"):
-            if arg in ("download", "progress_file", "sensor_build", "station_build", "partition", "test_links",  "queries", "statistics"):
+            if arg in ("download", "progress_file", "sensor_build", "station_build", "partition", "test_links", "queries", "statistics"):
                 section = arg
             else:
                 print 'Error: Argument must be a string for --locality (-l) and a valid locality.'
@@ -90,12 +89,6 @@ def main(argv):
             else:
                 print 'Error: Argument must be an integer for --max_station_files (-m).'
                 sys.exit()
-        elif opt in ('-p', "--package"):
-            if arg in ("all", "gsn", "hcn"):
-                package = "ghcnd_" + arg
-            else:
-                print 'Error: Argument must be an string for one of the known weather packages: "all", "gsn", "hcn"'
-                sys.exit()
         elif opt == '-r':
             reset = True
         elif opt == '-u':
@@ -137,7 +130,7 @@ def main(argv):
         download.download_all_files(reset)
 
         # Unzip the required file.
-        download.unzip_package(package, reset)
+        download.unzip_package(config.get_package(), reset)
 
 
     # Create some basic paths for save files and references.

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/fda09916/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py
index 9d2e289..a6513c2 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config.py
@@ -51,10 +51,10 @@ class WeatherConfig:
     # Node Specific Functions
     # --------------------------------------------------------------------------
     def get_node_ip(self, node):
-        return self.get_text(node.getElementsByTagName("ip_address")[0])
+        return self.get_text(node.getElementsByTagName("cluster_ip")[0])
 
     def get_node_name(self, node):
-        return self.get_text(node.getElementsByTagName("name")[0])
+        return self.get_text(node.getElementsByTagName("id")[0])
 
     
     # --------------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/fda09916/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
index 42dea81..64b86d6 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
@@ -92,38 +92,6 @@ class WeatherDataFiles:
             self.close_progress_data(True)
         self.reset()
         
-    def create_test_links(self, save_path, xml_save_path, test, node, partitions, virtual_partitions, base_paths=[]):
-        if (len(base_paths) == 0):
-            base_paths.append(os.path.dirname(save_path))
-        partition_list = sorted(get_partition_paths(partitions, base_paths))
-        
-        test_path = save_path + "/" + test
-        if not os.path.isdir(test_path):
-            os.makedirs(test_path)
-        for i in range(virtual_partitions):
-            # one virtual partition per disk
-            for j in range(len(base_paths)):
-                for index, path in enumerate(partition_list):
-                    offset = partitions * j
-                    test_partition_path = test_path + "/partition" + str(i + 1) + "_disk" + str(j + 1)
-                    if not os.path.isdir(test_partition_path):
-                        os.makedirs(test_partition_path)
-                    if (node <= i):
-                        if test == "speed_up":
-                            group = partitions / (i + 1)
-                        elif test == "batch_scale_up":
-                            group = partitions / virtual_partitions
-                        else:
-                            group = -1
-                        # link
-                        if (group) * node + offset <= index and index < (group) * (node + 1) + offset:
-                            os.symlink(path, test_partition_path + "/index" + str(index))
-                    else:
-                        # fake directories
-                        os.makedirs(test_partition_path + "/sensors")
-                        os.makedirs(test_partition_path + "/stations")
-            
-        
     # Once the initial data has been generated, the data can be copied into a set number of partitions. 
     def copy_to_n_partitions(self, save_path, partitions, base_paths=[]):
         if (len(base_paths) == 0):
@@ -347,7 +315,7 @@ class WeatherDataFiles:
                 break
         return columns[self.INDEX_DATA_FILE_NAME]
     
-def get_partition_paths(partitions, base_paths, key = "partitions"):        
+def get_partition_paths(partitions, base_paths, key="partitions"):        
     partition_paths = []
     for i in range(0, partitions):
         for j in range(0, len(base_paths)):
@@ -356,6 +324,6 @@ def get_partition_paths(partitions, base_paths, key = "partitions"):
     return partition_paths
 
 def get_partition_folder(disks, partitions, index):        
-    return "d" + str(disks) +"_p" + str(partitions) + "_i" + str(index)
+    return "d" + str(disks) + "_p" + str(partitions) + "_i" + str(index)
 
 

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/fda09916/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_download_files.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_download_files.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_download_files.py
index 72f66bb..87adb11 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_download_files.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_download_files.py
@@ -65,7 +65,7 @@ def report_download_status(count, block, size):
     line_size = 50
     erase = "\b" * line_size
     sys.stdout.write(erase)
-    report = get_report_line( (float(count) * block / size), line_size)
+    report = get_report_line((float(count) * block / size), line_size)
     sys.stdout.write(report)
 
 # Creates a string to be used in reporting the percentage done.

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/fda09916/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
index 7af1e9d..4f31dff 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
@@ -17,10 +17,10 @@
 <data xmlns="data">
     <name>Local Example</name>
     <save_path>/data</save_path>
-    <package>all</package>
+    <package>ghcnd_all</package>
     <node>
-        <name>localhost</name>
-        <ip_address>127.0.0.1</ip_address>
+        <id>localhost</id>
+        <cluster_ip>127.0.0.1</cluster_ip>
     </node>
     <dataset>
         <name>tiny</name>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/fda09916/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
index 34be0df..87be4e3 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
@@ -17,26 +17,26 @@
 <data xmlns="data">
     <name>Cluster Example</name>
     <save_path>/data</save_path>
-    <package>all</package>
+    <package>ghcnd_all</package>
     <node>
-        <name>machine1</name>
-        <ip_address>127.0.0.1</ip_address>
+        <id>machine1</id>
+        <cluster_ip>127.0.0.1</cluster_ip>
     </node>
     <node>
-        <name>machine2</name>
-        <ip_address>127.0.0.2</ip_address>
+        <id>machine2</id>
+        <cluster_ip>127.0.0.2</cluster_ip>
     </node>
     <node>
-        <name>machine3</name>
-        <ip_address>127.0.0.3</ip_address>
+        <id>machine3</id>
+        <cluster_ip>127.0.0.3</cluster_ip>
     </node>
     <node>
-        <name>machine4</name>
-        <ip_address>127.0.0.4</ip_address>
+        <id>machine4</id>
+        <cluster_ip>127.0.0.4</cluster_ip>
     </node>
     <node>
-        <name>machine5</name>
-        <ip_address>127.0.0.5</ip_address>
+        <id>machine5</id>
+        <cluster_ip>127.0.0.5</cluster_ip>
     </node>
     <dataset>
         <name>tiny-1drive</name>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/fda09916/vxquery-server/src/main/resources/scripts/cluster_cli.py
----------------------------------------------------------------------
diff --git a/vxquery-server/src/main/resources/scripts/cluster_cli.py b/vxquery-server/src/main/resources/scripts/cluster_cli.py
index 370e77f..089ad08 100644
--- a/vxquery-server/src/main/resources/scripts/cluster_cli.py
+++ b/vxquery-server/src/main/resources/scripts/cluster_cli.py
@@ -59,7 +59,7 @@ def main(argv):
                 else:
                     deploy_path = arg
             else:
-                print 'Error: Argument must be a file name for --folder (-f).'
+                print 'Error: Argument must be a file name for --deploy_folder (-d).'
                 sys.exit()
 
     # Required fields to run the script.


[31/50] [abbrv] git commit: Switched q06 and q07 to order by number of records in the join.

Posted by pr...@apache.org.
Switched q06 and q07 to order by number of records in the join.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/c3a7ce20
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/c3a7ce20
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/c3a7ce20

Branch: refs/heads/prestonc/hash_join
Commit: c3a7ce204b34d222becf37ff4966278efad86b44
Parents: ef2f36a
Author: Preston Carman <pr...@apache.org>
Authored: Mon Mar 31 09:18:07 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../resources/noaa-ghcn-daily/queries/q06.xq    | 29 +++++++++-----------
 .../noaa-ghcn-daily/queries/q06_sensor.xq       | 10 +++++++
 .../noaa-ghcn-daily/queries/q06_station.xq      |  7 +++++
 .../noaa-ghcn-daily/queries/q06_tmax.xq         |  9 ------
 .../noaa-ghcn-daily/queries/q06_tmin.xq         |  9 ------
 .../resources/noaa-ghcn-daily/queries/q07.xq    | 29 +++++++++++---------
 .../noaa-ghcn-daily/queries/q07_sensor.xq       | 10 -------
 .../noaa-ghcn-daily/queries/q07_station.xq      |  7 -----
 .../noaa-ghcn-daily/queries/q07_tmax.xq         |  9 ++++++
 .../noaa-ghcn-daily/queries/q07_tmin.xq         |  9 ++++++
 10 files changed, 64 insertions(+), 64 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
index d8eb815..573a3a3 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
@@ -1,16 +1,13 @@
-(: XQuery Self Join Query :)
-(: Self join with all stations finding the difference in min and max       :)
-(: temperature and get the average.                                        :)
-fn:avg(
-    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-    for $r_min in collection($sensor_collection_min)/dataCollection/data
-    
-    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-    for $r_max in collection($sensor_collection_max)/dataCollection/data
-    
-    where $r_min/station eq $r_max/station
-        and $r_min/date eq $r_max/date
-        and $r_min/dataType eq "TMIN"
-        and $r_max/dataType eq "TMAX"
-    return $r_max/value - $r_min/value
-) div 10
\ No newline at end of file
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station for each     :)
+(: day over the year 2000.                                                    :)
+let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+for $s in collection($station_collection)/stationCollection/station
+
+let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r in collection($sensor_collection)/dataCollection/data
+
+where $s/id eq $r/station
+    and $r/dataType eq "TMAX" 
+    and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
new file mode 100644
index 0000000..e8eb64a
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
@@ -0,0 +1,10 @@
+(: XQuery Join Query :)
+(: Count max temperature (TMAX) readings for 2000-01-01.                          :)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $r/dataType eq "TMAX" 
+    	and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
+    return $r
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_station.xq
new file mode 100644
index 0000000..6212016
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_station.xq
@@ -0,0 +1,7 @@
+(: XQuery Join Query :)
+(: Count all the stations.                                         :)
+count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)/stationCollection/station
+    return $s
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq
deleted file mode 100644
index 43694ea..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq
+++ /dev/null
@@ -1,9 +0,0 @@
-(: XQuery Join Query :)
-(: Find the all the records for TMAX.                                         :)
-count(
-    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-    for $r_max in collection($sensor_collection_max)/dataCollection/data
-    
-    where $r_max/dataType eq "TMAX"
-    return $r_max
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq
deleted file mode 100644
index 51db7c3..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq
+++ /dev/null
@@ -1,9 +0,0 @@
-(: XQuery Join Query :)
-(: Find the all the records for TMIN.                                         :)
-count(
-    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-    for $r_min in collection($sensor_collection_min)/dataCollection/data
-    
-    where $r_min/dataType eq "TMIN"
-    return $r_min
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
index 573a3a3..d8eb815 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
@@ -1,13 +1,16 @@
-(: XQuery Join Query :)
-(: Find the highest recorded temperature (TMAX) for each station for each     :)
-(: day over the year 2000.                                                    :)
-let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
-for $s in collection($station_collection)/stationCollection/station
-
-let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-for $r in collection($sensor_collection)/dataCollection/data
-
-where $s/id eq $r/station
-    and $r/dataType eq "TMAX" 
-    and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
-return ($s/displayName, $r/date, $r/value)
\ No newline at end of file
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
deleted file mode 100644
index e8eb64a..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
+++ /dev/null
@@ -1,10 +0,0 @@
-(: XQuery Join Query :)
-(: Count max temperature (TMAX) readings for 2000-01-01.                          :)
-count(
-    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-    for $r in collection($sensor_collection)/dataCollection/data
-    
-    where $r/dataType eq "TMAX" 
-    	and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
-    return $r
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq
deleted file mode 100644
index 6212016..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq
+++ /dev/null
@@ -1,7 +0,0 @@
-(: XQuery Join Query :)
-(: Count all the stations.                                         :)
-count(
-    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
-    for $s in collection($station_collection)/stationCollection/station
-    return $s
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmax.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmax.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmax.xq
new file mode 100644
index 0000000..43694ea
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmax.xq
@@ -0,0 +1,9 @@
+(: XQuery Join Query :)
+(: Find the all the records for TMAX.                                         :)
+count(
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_max/dataType eq "TMAX"
+    return $r_max
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c3a7ce20/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmin.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmin.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmin.xq
new file mode 100644
index 0000000..51db7c3
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_tmin.xq
@@ -0,0 +1,9 @@
+(: XQuery Join Query :)
+(: Find the all the records for TMIN.                                         :)
+count(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    where $r_min/dataType eq "TMIN"
+    return $r_min
+)
\ No newline at end of file


[22/50] [abbrv] git commit: Improve search for functions based on things I learned from join.

Posted by pr...@apache.org.
Improve search for functions based on things I learned from join.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/6d0b66bb
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/6d0b66bb
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/6d0b66bb

Branch: refs/heads/prestonc/hash_join
Commit: 6d0b66bbd70fee58e2c9777878f9a913f6c42ef2
Parents: 5059420
Author: Preston Carman <pr...@apache.org>
Authored: Wed Mar 12 13:12:27 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../rewriter/rules/util/ExpressionToolbox.java   | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/6d0b66bb/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
index 78ceeb7..d674f76 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
@@ -18,8 +18,11 @@ package org.apache.vxquery.compiler.rewriter.rules.util;
 
 import java.util.List;
 
+import javax.xml.namespace.QName;
+
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.vxquery.compiler.algebricks.VXQueryConstantValue;
+import org.apache.vxquery.context.StaticContext;
 import org.apache.vxquery.context.StaticContextImpl;
 import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
 import org.apache.vxquery.functions.BuiltinFunctions;
@@ -78,7 +81,8 @@ public class ExpressionToolbox {
         return null;
     }
 
-    public static void findVariableExpressions(Mutable<ILogicalExpression> mutableLe, List<Mutable<ILogicalExpression>> finds) {
+    public static void findVariableExpressions(Mutable<ILogicalExpression> mutableLe,
+            List<Mutable<ILogicalExpression>> finds) {
         ILogicalExpression le = mutableLe.getValue();
         if (le.getExpressionTag() == LogicalExpressionTag.VARIABLE) {
             finds.add(mutableLe);
@@ -144,14 +148,15 @@ public class ExpressionToolbox {
         }
     }
 
-    public static Function getBuiltIn(Mutable<ILogicalExpression> mutableLe) {
+    public static Function getBuiltIn(Mutable<ILogicalExpression> mutableLe, StaticContext rootContext) {
         ILogicalExpression le = mutableLe.getValue();
         if (le.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
             AbstractFunctionCallExpression afce = (AbstractFunctionCallExpression) le;
-            for (Function function : BuiltinFunctions.FUNCTION_COLLECTION) {
-                if (function.getFunctionIdentifier().equals(afce.getFunctionIdentifier())) {
-                    return function;
-                }
+            FunctionIdentifier fid = afce.getFunctionIdentifier();
+            QName functionName = new QName(fid.getNamespace(), fid.getName());
+            Function found = rootContext.lookupFunction(functionName, fid.getArity());
+            if (found != null) {
+                return found;
             }
             for (Function function : BuiltinOperators.OPERATOR_COLLECTION) {
                 if (function.getFunctionIdentifier().equals(afce.getFunctionIdentifier())) {
@@ -182,7 +187,7 @@ public class ExpressionToolbox {
         return pTypeCode.getInteger();
     }
 
-    public static SequenceType getTypeExpressionTypeArgument(Mutable<ILogicalExpression> searchM, StaticContextImpl dCtx) {
+    public static SequenceType getTypeExpressionTypeArgument(Mutable<ILogicalExpression> searchM, StaticContext dCtx) {
         int typeId = getTypeExpressionTypeArgument(searchM);
         if (typeId > 0) {
             return dCtx.lookupSequenceType(typeId);


[43/50] [abbrv] New weather benchmark test suite that includes tests for 1, 2, and 4 partitions of data.

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/cat/GhcndPartition1Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndPartition1Queries.xml b/vxquery-xtest/tests/cat/GhcndPartition1Queries.xml
new file mode 100644
index 0000000..1237971
--- /dev/null
+++ b/vxquery-xtest/tests/cat/GhcndPartition1Queries.xml
@@ -0,0 +1,54 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="GhcndPartition1Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>GHCND Partition 1</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="ghcnd-partition-1-q00" FilePath="Ghcnd/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q00 from the weather benchmark with 1 partition.</description>
+      <query name="q00" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q00.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-1-q01" FilePath="Ghcnd/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q01 from the weather benchmark with 1 partition.</description>
+      <query name="q01" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q01.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-1-q02" FilePath="Ghcnd/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q02 from the weather benchmark with 1 partition.</description>
+      <query name="q02" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-1-q03" FilePath="Ghcnd/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q03 from the weather benchmark with 1 partition.</description>
+      <query name="q03" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-1-q04" FilePath="Ghcnd/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q04 from the weather benchmark with 1 partition.</description>
+      <query name="q04" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q04.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-1-q05" FilePath="Ghcnd/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q05 from the weather benchmark with 1 partition.</description>
+      <query name="q05" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-1-q06" FilePath="Ghcnd/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q06 from the weather benchmark with 1 partition.</description>
+      <query name="q06" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q06.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-1-q07" FilePath="Ghcnd/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q07 from the weather benchmark with 1 partition.</description>
+      <query name="q07" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/cat/GhcndPartition2Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndPartition2Queries.xml b/vxquery-xtest/tests/cat/GhcndPartition2Queries.xml
new file mode 100644
index 0000000..3f2d6ea
--- /dev/null
+++ b/vxquery-xtest/tests/cat/GhcndPartition2Queries.xml
@@ -0,0 +1,54 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="GhcndPartition1Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>GHCND Partition 1</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q00" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q00 from the weather benchmark with 2 partitions.</description>
+      <query name="q00" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q00.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q01" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q01 from the weather benchmark with 2 partitions.</description>
+      <query name="q01" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q01.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q02" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q02 from the weather benchmark with 2 partitions.</description>
+      <query name="q02" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q03" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q03 from the weather benchmark with 2 partitions.</description>
+      <query name="q03" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q04" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q04 from the weather benchmark with 2 partitions.</description>
+      <query name="q04" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q04.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q05" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q05 from the weather benchmark with 2 partitions.</description>
+      <query name="q05" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q06" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q06 from the weather benchmark with 2 partitions.</description>
+      <query name="q06" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q06.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-2-q07" FilePath="Ghcnd/partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q07 from the weather benchmark with 2 partitions.</description>
+      <query name="q07" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/cat/GhcndPartition4Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndPartition4Queries.xml b/vxquery-xtest/tests/cat/GhcndPartition4Queries.xml
new file mode 100644
index 0000000..9c1b5ae
--- /dev/null
+++ b/vxquery-xtest/tests/cat/GhcndPartition4Queries.xml
@@ -0,0 +1,54 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="GhcndPartition4Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>GHCND Partition 4</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q00" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q00 from the weather benchmark with 4 partitions.</description>
+      <query name="q00" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q00.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q01" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q01 from the weather benchmark with 4 partitions.</description>
+      <query name="q01" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q01.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q02" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q02 from the weather benchmark with 4 partitions.</description>
+      <query name="q02" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q03" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q03 from the weather benchmark with 4 partitions.</description>
+      <query name="q03" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q04" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q04 from the weather benchmark with 4 partitions.</description>
+      <query name="q04" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q04.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q05" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q05 from the weather benchmark with 4 partitions.</description>
+      <query name="q05" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q06" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q06 from the weather benchmark with 4 partitions.</description>
+      <query name="q06" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q06.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-partition-4-q07" FilePath="Ghcnd/partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Execution of q07 from the weather benchmark with 4 partitions.</description>
+      <query name="q07" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file


[50/50] [abbrv] git commit: Merge branch 'prestonc/hash_join' of https://git-wip-us.apache.org/repos/asf/incubator-vxquery into prestonc/hash_join

Posted by pr...@apache.org.
Merge branch 'prestonc/hash_join' of https://git-wip-us.apache.org/repos/asf/incubator-vxquery into prestonc/hash_join


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/0b80d3f5
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/0b80d3f5
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/0b80d3f5

Branch: refs/heads/prestonc/hash_join
Commit: 0b80d3f56afdca149af9e21fed5805de4e2ca166
Parents: 91e801d fcb0241
Author: Preston Carman <pr...@apache.org>
Authored: Tue Apr 1 21:10:28 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 21:10:28 2014 -0700

----------------------------------------------------------------------

----------------------------------------------------------------------



[18/50] [abbrv] git commit: Added new join queries and updated queries to used xs:dateTime.

Posted by pr...@apache.org.
Added new join queries and updated queries to used xs:dateTime.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/74a22a31
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/74a22a31
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/74a22a31

Branch: refs/heads/prestonc/hash_join
Commit: 74a22a318286d801e63d247f63062a148e4b2a5a
Parents: 94aa026
Author: Preston Carman <pr...@apache.org>
Authored: Fri Mar 14 22:05:39 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../resources/noaa-ghcn-daily/queries/q00.xq    |  8 +++----
 .../resources/noaa-ghcn-daily/queries/q02.xq    |  3 +--
 .../resources/noaa-ghcn-daily/queries/q04.xq    |  3 +--
 .../resources/noaa-ghcn-daily/queries/q05.xq    |  3 +--
 .../resources/noaa-ghcn-daily/queries/q06.xq    | 24 ++++++++++----------
 .../noaa-ghcn-daily/queries/q06_sensor.xq       |  9 --------
 .../noaa-ghcn-daily/queries/q06_tmax.xq         |  9 ++++++++
 .../noaa-ghcn-daily/queries/q06_tmin.xq         |  9 ++++++++
 .../resources/noaa-ghcn-daily/queries/q07.xq    |  8 +++----
 .../noaa-ghcn-daily/queries/q07_sensor.xq       | 10 ++++++++
 .../noaa-ghcn-daily/queries/q07_station.xq      |  7 ++++++
 11 files changed, 58 insertions(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq
index 8a639dd..527fa00 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q00.xq
@@ -3,9 +3,9 @@
 (: the weather readings for December 25 over the last 10 years.               :)
 let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
 for $r in collection($collection)/dataCollection/data
-let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
+let $datetime := xs:dateTime(fn:data($r/date))
 where $r/station eq "GHCND:ASN00008113" 
-    and fn:year-from-date($date) ge 2003
-    and fn:month-from-date($date) eq 12 
-    and fn:day-from-date($date) eq 25
+    and fn:year-from-dateTime($datetime) ge 2003
+    and fn:month-from-dateTime($datetime) eq 12 
+    and fn:day-from-dateTime($datetime) eq 25
 return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq
index 534dabf..88d25f3 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q02.xq
@@ -4,9 +4,8 @@
 fn:sum(
     let $collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
     for $r in collection($collection)/dataCollection/data
-    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
     where $r/station eq "GHCND:USW00024233" 
         and $r/dataType eq "PRCP" 
-        and fn:year-from-date($date) eq 1999
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 1999
     return $r/value
 ) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
index 174a9f7..f0ff178 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
@@ -7,8 +7,7 @@ for $s in collection($station_collection)/stationCollection/station
 let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
 for $r in collection($sensor_collection)/dataCollection/data
     
-let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
 where $s/id eq $r/station 
     and (some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and fn:contains(fn:upper-case(fn:data($x/displayName)), "KING")))
-    and $date eq xs:date("1976-07-04")
+    and xs:dateTime(fn:data($r/date)) eq xs:dateTime("1976-07-04T00:00:00.000")
 return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
index 23bbaf4..366eaff 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
@@ -8,10 +8,9 @@ fn:min(
     let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
     for $r in collection($sensor_collection)/dataCollection/data
     
-    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
     where $s/id eq $r/station
         and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "OREGON"))
         and $r/dataType eq "TMIN" 
-        and fn:year-from-date($date) eq 2001
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
     return $r/value
 ) div 10
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
index 02dc9ab..0d0a4ba 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
@@ -1,14 +1,14 @@
-(: XQuery Join Aggregate Query :)
-(: Self join with all stations.                                               :)
-let $sensor_collection1 := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-for $r1 in collection($sensor_collection1)/dataCollection/data
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature.                                                            :)
+let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r_min in collection($sensor_collection_min)/dataCollection/data
 
-let $sensor_collection2 := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-for $r2 in collection($sensor_collection2)/dataCollection/data
+let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r_max in collection($sensor_collection_max)/dataCollection/data
 
-let $date1 := xs:date(fn:substring(xs:string(fn:data($r1/date)), 0, 11))
-let $date2 := xs:date(fn:substring(xs:string(fn:data($r2/date)), 0, 11))
-where $r1/station eq $r2/station
-    and fn:year-from-date($date1) gt 2000
-    and fn:year-from-date($date2) gt 2000
-return ($r1/value, $r2/value) 
\ No newline at end of file
+where $r_min/station eq $r_max/station
+    and $r_min/date eq $r_max/date
+    and $r_min/dataType eq "TMIN"
+    and $r_max/dataType eq "TMAX"
+return ($r_max/value, $r_min/value, $r_max/value - $r_min/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
deleted file mode 100644
index 7767b7c..0000000
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
+++ /dev/null
@@ -1,9 +0,0 @@
-(: XQuery Join Aggregate Query :)
-(: Count all sensor readings after 2000.                                      :)
-count(
-    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-    for $r in collection($sensor_collection)/dataCollection/data
-    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
-    where fn:year-from-date($date) gt 2000
-    return $r
-)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq
new file mode 100644
index 0000000..43694ea
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmax.xq
@@ -0,0 +1,9 @@
+(: XQuery Join Query :)
+(: Find the all the records for TMAX.                                         :)
+count(
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_max/dataType eq "TMAX"
+    return $r_max
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq
new file mode 100644
index 0000000..51db7c3
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_tmin.xq
@@ -0,0 +1,9 @@
+(: XQuery Join Query :)
+(: Find the all the records for TMIN.                                         :)
+count(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    where $r_min/dataType eq "TMIN"
+    return $r_min
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
index c4e186d..6ed194d 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
@@ -1,13 +1,13 @@
-(: XQuery Join Aggregate Query :)
-(: Find the lowest recorded temperature (TMIN) for each station on 2000-01-01.:)
+(: XQuery Join Query :)
+(: Find the highest recorded temperature (TMAX) for each station on           :)
+(: 2000-01-01.                                                                :)
 let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
 for $s in collection($station_collection)/stationCollection/station
 
 let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
 for $r in collection($sensor_collection)/dataCollection/data
 
-let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
 where $s/id eq $r/station
     and $r/dataType eq "TMAX" 
-    and $date eq xs:date("2000-01-01")
+    and xs:dateTime(fn:data($r/date)) eq xs:dateTime("2000-01-01T00:00:00.000")
 return ($s/displayName, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
new file mode 100644
index 0000000..254c879
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
@@ -0,0 +1,10 @@
+(: XQuery Join Query :)
+(: Count max temperature (TMAX) readings for 2000-01-01.                          :)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $r/dataType eq "TMAX" 
+        and xs:dateTime(fn:data($r/date)) eq xs:dateTime("2000-01-01T00:00:00.000")
+    return $r
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/74a22a31/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq
new file mode 100644
index 0000000..6212016
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_station.xq
@@ -0,0 +1,7 @@
+(: XQuery Join Query :)
+(: Count all the stations.                                         :)
+count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)/stationCollection/station
+    return $s
+)
\ No newline at end of file


[46/50] [abbrv] New weather benchmark test suite that includes tests for 1, 2, and 4 partitions of data.

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/XQTSCatalog.xsd
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/XQTSCatalog.xsd b/vxquery-xtest/tests/XQTSCatalog.xsd
new file mode 100644
index 0000000..9ccbcec
--- /dev/null
+++ b/vxquery-xtest/tests/XQTSCatalog.xsd
@@ -0,0 +1,1136 @@
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+   xmlns:test="http://www.w3.org/2005/02/query-test-XQTSCatalog"
+   targetNamespace="http://www.w3.org/2005/02/query-test-XQTSCatalog" elementFormDefault="qualified">
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- History:                                                             -->
+   <!--                                                                      -->
+   <!-- 2008-07-29 - reflects-resolution                                     -->
+   <!--                                                                      -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- test-suite - top level element                                       -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="test-suite">
+      <xs:annotation>
+         <xs:documentation>
+            This is the top level element for documents that use this schema.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:sequence>
+            <xs:element ref="test:test-suite-info"/>
+            <xs:element ref="test:citations"/>
+            <xs:element ref="test:comparisons"/>
+            <xs:element ref="test:roles"/>
+            <xs:element ref="test:scenarios"/>
+            <xs:element ref="test:sources"/>
+            <xs:element ref="test:implementation-defined-items"/>
+            <xs:element ref="test:features"/>
+            <xs:element ref="test:context-properties"/>
+            <xs:element ref="test:test-group" maxOccurs="unbounded"/>
+         </xs:sequence>
+
+         <xs:attribute name="CatalogDesignDate" type="xs:date" use="required"/>
+
+         <!-- XQTS version -->
+         <xs:attribute name="version" type="xs:string" use="required">
+            <xs:annotation>
+               <xs:documentation>
+                  XQTS version
+               </xs:documentation>
+            </xs:annotation>
+         </xs:attribute>
+
+         <!-- not used -->
+         <xs:attribute name="targetLanguage" type="test:targetLanguage" use="optional">
+            <xs:annotation>
+               <xs:documentation>
+                  not used
+               </xs:documentation>
+            </xs:annotation>
+         </xs:attribute>
+
+         <!-- offset from XQTS root to source documents and schemas -->
+         <xs:attribute name="SourceOffsetPath" type="test:SimplifiedRelativeFilePath" use="required">
+            <xs:annotation>
+               <xs:documentation>
+                  offset from XQTS root to source documents and schemas
+               </xs:documentation>
+            </xs:annotation>
+         </xs:attribute>
+
+
+         <!-- offset from XQTS root to result documents -->
+         <xs:attribute name="ResultOffsetPath" type="test:SimplifiedRelativeFilePath" use="required">
+            <xs:annotation>
+               <xs:documentation>
+                  offset from XQTS root to result documents
+               </xs:documentation>
+            </xs:annotation>
+         </xs:attribute>
+
+
+         <!-- offset from XQTS root to XQuery expression files -->
+         <xs:attribute name="XQueryQueryOffsetPath" type="test:SimplifiedRelativeFilePath"
+            use="required">
+            <xs:annotation>
+               <xs:documentation>
+                  offset from XQTS root to XQuery expression files
+               </xs:documentation>
+            </xs:annotation>
+         </xs:attribute>
+
+
+         <!-- offset from XQTS root to XQueryX documents -->
+         <xs:attribute name="XQueryXQueryOffsetPath" type="test:SimplifiedRelativeFilePath"
+            use="required">
+            <xs:annotation>
+               <xs:documentation>
+                  offset from XQTS root to XQueryX documents
+               </xs:documentation>
+            </xs:annotation>
+         </xs:attribute>
+
+
+         <!-- file extension for XQuery expression files -->
+         <xs:attribute name="XQueryFileExtension" type="xs:string" use="required">
+            <xs:annotation>
+               <xs:documentation>
+                  file extension for XQuery expression files
+               </xs:documentation>
+            </xs:annotation>
+         </xs:attribute>
+
+
+         <!-- file extension for XQueryX documents -->
+         <xs:attribute name="XQueryXFileExtension" type="xs:string" use="required">
+            <xs:annotation>
+               <xs:documentation>
+                  file extension for XQueryX documents
+               </xs:documentation>
+            </xs:annotation>
+         </xs:attribute>
+
+      </xs:complexType>
+
+      <xs:unique name="unique-test-group">
+         <xs:selector xpath=".//test:test-group"/>
+         <xs:field xpath="@name"/>
+      </xs:unique>
+
+      <xs:unique name="unique-test-case">
+         <xs:selector xpath=".//test:test-case"/>
+         <xs:field xpath="@name"/>
+      </xs:unique>
+
+
+   </xs:element>
+
+
+   <!-- targetLanguage type                                                  -->
+
+   <xs:simpleType name="targetLanguage">
+      <xs:restriction base="xs:string">
+         <xs:enumeration value="XQuery"/>
+         <xs:enumeration value="XQueryX"/>
+      </xs:restriction>
+   </xs:simpleType>
+
+
+   <!-- SimplifiedRelativeFilePath type                                      -->
+
+   <xs:simpleType name="SimplifiedRelativeFilePath">
+      <xs:restriction base="xs:anyURI">
+         <xs:pattern value="([a-zA-Z0-9\-\.]+/)+"/>
+      </xs:restriction>
+   </xs:simpleType>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- test-suite-info                                                      -->
+   <!--                                                                      -->
+   <!-- Identify the test suite.                                             -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="test-suite-info">
+      <xs:annotation>
+         <xs:documentation>
+            Identify the test suite.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:sequence>
+            <xs:element name="title" type="xs:string"/>
+            <xs:element name="description" type="xs:string" minOccurs="0"/>
+         </xs:sequence>
+      </xs:complexType>
+   </xs:element>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- citations                                                            -->
+   <!--                                                                      -->
+   <!-- Identify each of the XQuery documents.                               -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="citations">
+      <xs:annotation>
+         <xs:documentation>
+            Identify each of the XQuery documents.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:choice maxOccurs="unbounded">
+            <xs:element name="citation-spec" maxOccurs="unbounded">
+               <xs:complexType>
+                  <xs:complexContent>
+                     <xs:extension base="test:infoBase">
+                        <xs:sequence>
+                           <xs:element name="spec-URI" type="xs:anyURI"/>
+                        </xs:sequence>
+                        <xs:attribute name="name" type="test:citation-spec-enum" use="required"/>
+                     </xs:extension>
+                  </xs:complexContent>
+               </xs:complexType>
+            </xs:element>
+         </xs:choice>
+      </xs:complexType>
+
+      <xs:unique name="unique-citation-specs">
+         <xs:selector xpath=".//test:citation-spec"/>
+         <xs:field xpath="@name"/>
+      </xs:unique>
+
+   </xs:element>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- comparisons                                                          -->
+   <!--                                                                      -->
+   <!-- Identify each of the comparisons that will be used in test cases.    -->
+   <!--                                                                      -->
+   <!-- This is provided for the purpose of documentation and is not needed  -->
+   <!-- by implementors.                                                     -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="comparisons">
+      <xs:annotation>
+         <xs:documentation>
+            Identify each of the comparisons that will be used in test cases.            
+            This is provided for the purpose of documentation and is not needed by implementors.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:sequence maxOccurs="unbounded">
+            <xs:element name="comparison" maxOccurs="unbounded">
+               <xs:complexType>
+                  <xs:complexContent>
+                     <xs:extension base="test:infoBase">
+                        <xs:attribute name="name" type="test:comparison-enum" use="required"/>
+                     </xs:extension>
+                  </xs:complexContent>
+               </xs:complexType>
+            </xs:element>
+         </xs:sequence>
+      </xs:complexType>
+
+      <xs:unique name="unique-comparisons">
+         <xs:selector xpath=".//test:comparison"/>
+         <xs:field xpath="@name"/>
+      </xs:unique>
+
+   </xs:element>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- roles                                                                -->
+   <!--                                                                      -->
+   <!-- Identify each of the roles that will be used in test cases.          -->
+   <!--                                                                      -->
+   <!-- This is provided for the purpose of documentation and is not needed  -->
+   <!-- by implementors.                                                     -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="roles">
+      <xs:annotation>
+         <xs:documentation>
+            Identify each of the roles that will be used in test cases.
+            This is provided for the purpose of documentation and is not needed by implementors.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:sequence maxOccurs="unbounded">
+            <xs:element name="role">
+               <xs:complexType>
+                  <xs:complexContent>
+                     <xs:extension base="test:infoBase">
+                        <xs:attribute name="name" type="test:role-enum" use="required"/>
+                     </xs:extension>
+                  </xs:complexContent>
+               </xs:complexType>
+            </xs:element>
+         </xs:sequence>
+      </xs:complexType>
+
+      <xs:unique name="unique-roles">
+         <xs:selector xpath=".//test:role"/>
+         <xs:field xpath="@name"/>
+      </xs:unique>
+
+   </xs:element>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- scenarios                                                            -->
+   <!--                                                                      -->
+   <!-- Identify each of the scenarios that will be used in test cases.      -->
+   <!--                                                                      -->
+   <!-- This is provided for the purpose of documentation and is not needed  -->
+   <!-- by implementors.                                                     -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="scenarios">
+      <xs:annotation>
+         <xs:documentation>
+            Identify each of the scenarios that will be used in test cases.
+            This is provided for the purpose of documentation and is not needed by implementors.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:sequence maxOccurs="unbounded">
+            <xs:element name="scenario">
+               <xs:complexType>
+                  <xs:complexContent>
+                     <xs:extension base="test:infoBase">
+                        <xs:attribute name="name" type="test:scenarios-enum" use="required"/>
+                     </xs:extension>
+                  </xs:complexContent>
+               </xs:complexType>
+            </xs:element>
+         </xs:sequence>
+      </xs:complexType>
+
+      <xs:unique name="unique-scenarios">
+         <xs:selector xpath=".//test:scenario"/>
+         <xs:field xpath="@name"/>
+      </xs:unique>
+
+   </xs:element>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- sources                                                              -->
+   <!--                                                                      -->
+   <!-- Identify each of the sources that will be used in test cases.        -->
+   <!--                                                                      -->
+   <!-- Test cases will use these ID's to identify their source documents,   -->
+   <!-- collections, schemas, and modules.                                   -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="sources">
+      <xs:complexType>
+         <xs:annotation>
+            <xs:documentation>
+               Identify each of the sources that will be used in test cases.
+               Test cases will use these ID's to identify their source documents, collections, schemas, and modules.
+            </xs:documentation>
+         </xs:annotation>
+
+         <xs:sequence maxOccurs="unbounded">
+            <xs:element name="source" maxOccurs="unbounded">
+               <xs:complexType>
+                  <xs:complexContent>
+                     <xs:extension base="test:infoBase">
+                        <xs:attribute name="ID" type="xs:ID" use="required"/>
+                        <xs:attribute name="FileName" type="xs:anyURI" use="required"/>
+                        <xs:attribute name="Creator" type="xs:string" use="required"/>
+                        <xs:attribute name="schema" type="xs:IDREF" use="optional"/>
+                     </xs:extension>
+                  </xs:complexContent>
+               </xs:complexType>
+            </xs:element>
+
+            <xs:element name="schema" minOccurs="0" maxOccurs="unbounded">
+               <xs:complexType>
+                  <xs:complexContent>
+                     <xs:extension base="test:infoBase">
+                        <xs:attribute name="ID" type="xs:ID" use="required"/>
+                        <xs:attribute name="uri" type="xs:anyURI" use="required"/>
+                        <xs:attribute name="FileName" type="xs:anyURI" use="required"/>
+                     </xs:extension>
+                  </xs:complexContent>
+               </xs:complexType>
+            </xs:element>
+
+            <xs:element name="collection" minOccurs="0" maxOccurs="unbounded">
+               <xs:complexType>
+                  <xs:complexContent>
+                     <xs:extension base="test:infoBase">
+                        <xs:sequence>
+                           <xs:element name="input-document" maxOccurs="unbounded">
+                              <xs:annotation>
+                                 <xs:documentation>
+                                    One or more input files that will be used by this query.
+                                 </xs:documentation>
+                              </xs:annotation>
+                              <xs:complexType>
+                                 <xs:simpleContent>
+                                    <xs:extension base="xs:IDREF">
+                                       <!-- this attribute contains only principal-data -->
+                                    </xs:extension>
+                                 </xs:simpleContent>
+                              </xs:complexType>
+                           </xs:element>
+                        </xs:sequence>
+                        <xs:attribute name="ID" type="xs:ID" use="required"/>
+                        <xs:attribute name="Creator" type="xs:string" use="required"/>
+
+                     </xs:extension>
+                  </xs:complexContent>
+               </xs:complexType>
+            </xs:element>
+
+            <xs:element name="module" minOccurs="0" maxOccurs="unbounded">
+               <xs:complexType>
+                  <xs:complexContent>
+                     <xs:extension base="test:infoBase">
+                        <xs:attribute name="ID" type="xs:ID" use="required"/>
+                        <xs:attribute name="FileName" type="xs:anyURI" use="required"/>
+                        <xs:attribute name="Creator" type="xs:string" use="required"/>
+                     </xs:extension>
+                  </xs:complexContent>
+               </xs:complexType>
+            </xs:element>
+         </xs:sequence>
+      </xs:complexType>
+   </xs:element>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- implementation-defined-items                                         -->
+   <!--                                                                      -->
+   <!-- Identify each of the implementation-defined-items that occur in the  -->
+   <!-- XQuery specifications.                                               -->
+   <!--                                                                      -->
+   <!-- These item names will be used when an implementor submits his test   -->
+   <!-- results.                                                             -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="implementation-defined-items">
+      <xs:annotation>
+         <xs:documentation>
+            Identify each of the implementation-defined-items that occur in the XQuery specifications.
+            These item names will be used when an implementor submits his test results.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:sequence maxOccurs="unbounded">
+            <xs:element name="implementation-defined-item" maxOccurs="unbounded">
+               <xs:complexType>
+                  <xs:complexContent>
+                     <xs:extension base="test:infoBase">
+                        <xs:attribute name="name" type="xs:string" use="required"/>
+                        <xs:attribute name="spec" type="test:citation-spec-enum" use="required"/>
+                        <xs:attribute name="spec-version" type="test:spec-version-list-type" use="optional">
+                           <xs:annotation>
+                              <xs:documentation>
+                                 Identifies the versions of the specification to which this item
+                                 applies. If the attribute is absent or empty, the item apply to all
+                                 versions of the specification.
+                              </xs:documentation>
+                           </xs:annotation>
+                        </xs:attribute>
+                     </xs:extension>
+                  </xs:complexContent>
+               </xs:complexType>
+            </xs:element>
+         </xs:sequence>
+      </xs:complexType>
+
+      <xs:unique name="unique-implementation-defined-item">
+         <xs:selector xpath=".//test:implementation-defined-item"/>
+         <xs:field xpath="@name"/>
+      </xs:unique>
+
+   </xs:element>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- features                                                             -->
+   <!--                                                                      -->
+   <!-- Identify each of the features that occur in the XQuery               -->
+   <!-- specification.                                                       -->
+   <!--                                                                      -->
+   <!-- These feature names will be used when an implementor submits his     -->
+   <!-- test results.                                                        -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="features">
+      <xs:annotation>
+         <xs:documentation>
+            Identify each of the features that occur in the XQuery specification.
+            These feature names will be used when an implementor submits his test results.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:sequence maxOccurs="unbounded">
+            <xs:element name="feature" maxOccurs="unbounded">
+               <xs:complexType>
+                  <xs:attribute name="name" type="xs:string" use="required"/>
+                  <xs:attribute name="spec-version" type="test:spec-version-list-type" use="optional">
+                     <xs:annotation>
+                        <xs:documentation>
+                           Identifies the versions of the specification to which this featire
+                           applies. If the attribute is absent or empty, the item applies to all
+                           versions of the specification.
+                        </xs:documentation>
+                     </xs:annotation>
+                  </xs:attribute>
+               </xs:complexType>
+            </xs:element>
+         </xs:sequence>
+      </xs:complexType>
+
+      <xs:unique name="unique-feature">
+         <xs:selector xpath=".//test:feature"/>
+         <xs:field xpath="@name"/>
+      </xs:unique>
+
+   </xs:element>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- context-properties                                                   -->
+   <!--                                                                      -->
+   <!-- Identify each of the properties that occur in the XQuery             -->
+   <!-- specification.                                                       -->
+   <!--                                                                      -->
+   <!-- These feature names will be used when an implementor submits his     -->
+   <!-- test results.                                                        -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="context-properties">
+      <xs:annotation>
+         <xs:documentation>
+            Identify each of the properties that occur in the XQuery specification.
+            These feature names will be used when an implementor submits his test results.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:sequence maxOccurs="unbounded">
+            <xs:element name="context-property" maxOccurs="unbounded">
+               <xs:complexType>
+                  <xs:attribute name="name" type="xs:string" use="required"/>
+                  <xs:attribute name="context-type" use="required">
+                     <xs:simpleType>
+                        <xs:restriction base="xs:string">
+                           <xs:enumeration value="static"/>
+                           <xs:enumeration value="dynamic"/>
+                        </xs:restriction>
+                     </xs:simpleType>
+                  </xs:attribute>
+                  <xs:attribute name="spec-version" type="test:spec-version-list-type" use="optional">
+                     <xs:annotation>
+                        <xs:documentation>
+                           Identifies the versions of the specification to which this context property
+                           applies. If the attribute is absent or empty, the property applies to all
+                           versions of the specification.
+                        </xs:documentation>
+                     </xs:annotation>
+                  </xs:attribute>
+               </xs:complexType>
+            </xs:element>
+         </xs:sequence>
+      </xs:complexType>
+
+      <xs:unique name="unique-context-property">
+         <xs:selector xpath=".//test:context-property"/>
+         <xs:field xpath="@name"/>
+      </xs:unique>
+
+   </xs:element>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- test-group                                                           -->
+   <!--                                                                      -->
+   <!-- Group of test cases and test groups.                                 -->
+   <!--                                                                      -->
+   <!-- The grouping of the tests helps the XML Query WG organize its work   -->
+   <!-- and is used when reporting our results. Implementors need only       -->
+   <!-- execute the test contained in these groups.                          -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:element name="test-group">
+      <xs:annotation>
+         <xs:documentation>
+            Group of test cases and test groups.
+            The grouping of the tests helps the XML Query WG organize its work 
+            and is used when reporting our results. Implementors need only 
+            execute the test contained in these groups.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:complexType>
+         <xs:sequence>
+            <xs:element name="GroupInfo" type="test:GroupInfo"/>
+            <xs:element name="test-case" type="test:test-case" minOccurs="0" maxOccurs="unbounded">
+               <xs:unique name="unique-expected-error">
+                  <xs:selector xpath=".//test:expected-error"/>
+                  <xs:field xpath="."/>
+               </xs:unique>
+            </xs:element>
+
+            <xs:element ref="test:test-group" minOccurs="0" maxOccurs="unbounded"/>
+         </xs:sequence>
+         <xs:attribute name="name" type="xs:string" use="required"/>
+         <xs:attribute name="featureOwner" type="xs:string" use="optional"/>
+         <xs:attribute name="is-XPath2" type="xs:boolean" use="optional"/>
+      </xs:complexType>
+   </xs:element>
+
+
+   <!-- GroupInfo type                                                       -->
+
+   <xs:complexType name="GroupInfo">
+      <xs:sequence>
+         <xs:element name="title" type="xs:string"/>
+         <xs:element name="description" type="test:description"/>
+         <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+   </xs:complexType>
+
+
+
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+   <!-- test-case                                                            -->
+   <!--                                                                      -->
+   <!-- A test case to be run.                                               -->
+   <!--                                                                      -->
+   <!-- All test cases that are not parse-error's are provided in both       -->
+   <!-- XQuery and XQueryX formats. An implementor should use the            -->
+   <!-- appropriate path offsets and file extensions to locate each version. -->
+   <!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -  -->
+
+   <xs:complexType name="test-case">
+      <xs:annotation>
+         <xs:documentation>
+            A test case to be run.
+            All test cases that are not parse-error's are provided in both
+            XQuery and XQueryX formats. An implementor should use the
+            appropriate path offsets and file extensions to locate each version.
+         </xs:documentation>
+
+         <xs:documentation>
+            The filename for this query can be constructed from:
+            the XQueryQueryOffsetPath or XQueryXQueryOffsetPath, the FilePath,
+            the name, the XQueryFileExtension or XQueryXFileExtension
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:sequence>
+         <xs:element name="description" type="test:description"/>
+         <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+
+         <!-- Identify the parts of the XQuery specifications that are       -->
+         <!-- being tested                                                   -->
+
+         <xs:element name="spec-citation" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+               <xs:documentation>
+                  Identify the parts of the XQuery specifications that are being tested.
+               </xs:documentation>
+            </xs:annotation>
+            <xs:complexType>
+               <xs:simpleContent>
+                  <xs:extension base="xs:string">
+                     <xs:attribute name="section-number" type="xs:string" use="required"/>
+                     <xs:attribute name="spec" type="test:citation-spec-enum" use="required"/>
+                     <xs:attribute name="section-title" type="xs:string" use="required"/>
+                     <xs:attribute name="section-pointer" type="xs:string" use="required"/>
+                  </xs:extension>
+               </xs:simpleContent>
+            </xs:complexType>
+         </xs:element>
+
+         <!-- Allow references to resolved Bugzilla Bugs -->
+
+         <xs:element name="reflects-resolution" minOccurs="0" maxOccurs="unbounded" type="xs:anyURI">
+            <xs:annotation>
+               <xs:documentation>
+                  Identify Bugzilla Bugs whose resolution is reflected in this test case.
+               </xs:documentation>
+            </xs:annotation>
+         </xs:element>
+
+         <!-- Description of the query -->
+
+         <xs:element name="query">
+            <xs:annotation>
+               <xs:documentation>
+                  Description of the query.
+               </xs:documentation>
+            </xs:annotation>
+
+            <xs:complexType>
+               <xs:sequence>
+                  <xs:element name="description" type="test:description" minOccurs="0"/>
+                  <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+               </xs:sequence>
+
+               <!-- This name is always equal to the name of the test case -->
+               <xs:attribute name="name" type="xs:string" use="required">
+                  <xs:annotation>
+                     <xs:documentation>
+                        This name is always equal to the name of the test case.
+                     </xs:documentation>
+                  </xs:annotation>
+               </xs:attribute>
+               <xs:attribute name="static-name" type="xs:string" use="optional">
+                  <xs:annotation>
+                     <xs:documentation>
+                        If present, specifies the name of the query file that should be used for an implementation running with the Static Typing Feature enabled.
+                     </xs:documentation>
+                  </xs:annotation>
+               </xs:attribute>
+               <xs:attribute name="date" type="xs:date" use="required"/>
+            </xs:complexType>
+         </xs:element>
+
+         <!-- Zero or more modules that will be used by this query -->
+
+         <xs:element name="module" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+               <xs:documentation>
+                  Zero or more modules that will be used by this query.
+               </xs:documentation>
+            </xs:annotation>
+            <xs:complexType>
+               <xs:simpleContent>
+                  <xs:extension base="xs:IDREF">
+                     <xs:attribute name="namespace" type="xs:anyURI" use="required"/>
+                  </xs:extension>
+               </xs:simpleContent>
+            </xs:complexType>
+         </xs:element>
+
+         <!-- Zero or more input files that will be used by this query -->
+
+         <xs:element name="input-file" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+               <xs:documentation>
+                  One or more input files that will be used by this query.
+               </xs:documentation>
+            </xs:annotation>
+            <xs:complexType>
+               <xs:simpleContent>
+                  <xs:extension base="xs:IDREF">
+                     <!-- this attribute contains only principal-data -->
+                     <xs:attribute name="role" type="test:role-enum" use="required">
+                        <xs:annotation>
+                           <xs:documentation>
+                              this attribute contains only principal-data
+                           </xs:documentation>
+                        </xs:annotation>
+                     </xs:attribute>
+                     <xs:attribute name="variable" type="xs:string" use="required"/>
+                  </xs:extension>
+               </xs:simpleContent>
+            </xs:complexType>
+         </xs:element>
+
+         <!-- Zero or more input URIs that will be used by this query -->
+
+         <xs:element name="input-URI" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+               <xs:documentation>
+                  One or more input URIs that will be used by this query.
+               </xs:documentation>
+            </xs:annotation>
+            <xs:complexType>
+               <xs:simpleContent>
+                  <xs:extension base="xs:IDREF">
+                     <!-- this attribute contains only principal-data -->
+                     <xs:attribute name="role" type="test:role-enum" use="required">
+                        <xs:annotation>
+                           <xs:documentation>
+                              this attribute contains only principal-data
+                           </xs:documentation>
+                        </xs:annotation>
+                     </xs:attribute>
+                     <xs:attribute name="variable" type="xs:string" use="required"/>
+                  </xs:extension>
+               </xs:simpleContent>
+            </xs:complexType>
+         </xs:element>
+
+         <!-- Zero or one default collections that will be used by this query -->
+
+         <xs:element name="defaultCollection" minOccurs="0" maxOccurs="1">
+            <xs:annotation>
+               <xs:documentation>
+                  Zero or one default collection that will be used by this query.
+               </xs:documentation>
+            </xs:annotation>
+            <xs:complexType>
+               <xs:simpleContent>
+                  <xs:extension base="xs:IDREF">
+                     <!-- this attribute contains only principal-data -->
+                     <xs:attribute name="role" type="test:role-enum" use="required">
+                        <xs:annotation>
+                           <xs:documentation>
+                              this attribute contains only principal-data
+                           </xs:documentation>
+                        </xs:annotation>
+                     </xs:attribute>
+                  </xs:extension>
+               </xs:simpleContent>
+            </xs:complexType>
+         </xs:element>
+
+         <!-- Zero or one context nodes that will be used by this query -->
+
+         <xs:element name="contextItem" minOccurs="0" maxOccurs="1">
+            <xs:annotation>
+               <xs:documentation>
+                  Zero or one context item that will be used by this query.
+               </xs:documentation>
+            </xs:annotation>
+            <xs:complexType>
+               <xs:simpleContent>
+                  <xs:extension base="xs:IDREF">
+                     <!-- this attribute contains only principal-data -->
+                     <xs:attribute name="role" type="test:role-enum" use="required">
+                        <xs:annotation>
+                           <xs:documentation>
+                              this attribute contains only principal-data
+                           </xs:documentation>
+                        </xs:annotation>
+                     </xs:attribute>
+                  </xs:extension>
+               </xs:simpleContent>
+            </xs:complexType>
+         </xs:element>
+
+         <!-- Zero or more input queries that will be used to bind values to -->
+         <!-- external variables                                             -->
+
+         <xs:element name="input-query" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+               <xs:documentation>
+                  Zero or more input queries that will be used to bind values to 
+                  external variables.
+               </xs:documentation>
+            </xs:annotation>
+            <xs:complexType>
+               <xs:sequence>
+                  <xs:element name="description" type="test:description" minOccurs="0"/>
+                  <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+               </xs:sequence>
+               <xs:attribute name="variable" type="xs:string" use="required"/>
+               <xs:attribute name="name" type="xs:string" use="required"/>
+               <xs:attribute name="date" type="xs:date" use="required"/>
+            </xs:complexType>
+         </xs:element>
+
+         <!-- Zero or more files containing expected results for this query -->
+
+         <xs:element name="output-file" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+               <xs:documentation>
+                  Zero or more files containing expected results for this query.
+               </xs:documentation>
+            </xs:annotation>
+            <xs:complexType>
+               <xs:simpleContent>
+                  <xs:extension base="xs:string">
+                     <xs:attribute name="role" type="test:role-enum" use="required"/>
+                     <xs:attribute name="compare" type="test:comparison-enum" use="required"/>
+
+                     <!-- can identify a results as being specific to typed or untyped  -->
+                     <!-- documents                                                     -->
+
+                     <xs:attribute name="input-document" type="test:input-document-enum"
+                        use="optional">
+                        <xs:annotation>
+                           <xs:documentation>
+                              can identify a results as being specific to typed or untyped documents
+                           </xs:documentation>
+                        </xs:annotation>
+                     </xs:attribute>
+
+                     <xs:attribute name="spec-version" type="test:spec-version-list-type" use="optional">
+                        <xs:annotation>
+                           <xs:documentation>
+                              identifies the versions of the specification to which these test results
+                              apply. If the attribute is absent or empty, the test results apply to all
+                              versions of the specification.
+                           </xs:documentation>
+                        </xs:annotation>
+                     </xs:attribute>
+                  </xs:extension>
+               </xs:simpleContent>
+            </xs:complexType>
+         </xs:element>
+
+
+         <!-- Zero or more expected errors for this query -->
+
+         <xs:element name="expected-error" minOccurs="0" maxOccurs="unbounded">
+            <xs:annotation>
+               <xs:documentation>
+                  Zero or more expected errors for this query.
+               </xs:documentation>
+            </xs:annotation>
+
+            <xs:complexType>
+               <xs:simpleContent>
+                  <xs:extension base="test:XQueryErrorCode">
+
+                     <!-- can identify an error as being specific to typed or untyped  -->
+                     <!-- documents                                                    -->
+
+                     <xs:attribute name="input-document" type="test:input-document-enum"
+                        use="optional">
+                        <xs:annotation>
+                           <xs:documentation>
+                              can identify an error as being specific to typed or untyped documents
+                           </xs:documentation>
+                        </xs:annotation>
+                     </xs:attribute>
+
+                     <xs:attribute name="spec-version" type="test:spec-version-list-type" use="optional">
+                        <xs:annotation>
+                           <xs:documentation>
+                              identifies the versions of the specification to which this error response
+                              applies. If the attribute is absent or empty, the error response applies to all
+                              versions of the specification.
+                           </xs:documentation>
+                        </xs:annotation>
+                     </xs:attribute>
+                  </xs:extension>
+               </xs:simpleContent>
+            </xs:complexType>
+         </xs:element>
+
+      </xs:sequence>
+
+      <!-- The filename for this query can be constructed from:              -->
+      <!--    the XQueryQueryOffsetPath or XQueryXQueryOffsetPath            -->
+      <!--    the FilePath                                                   -->
+      <!--    the name                                                       -->
+      <!--    the XQueryFileExtension or XQueryXFileExtension                -->
+
+      <xs:attribute name="name" type="xs:string" use="required"/>
+      <xs:attribute name="FilePath" type="test:SimplifiedRelativeFilePath" use="required"/>
+      <xs:attribute name="scenario" type="test:scenarios-enum" use="required"/>
+      <xs:attribute name="Creator" type="xs:string" use="required"/>
+      <xs:attribute name="version-drop" type="xs:date">
+         <xs:annotation>
+            <xs:documentation>
+               not being used
+            </xs:documentation>
+         </xs:annotation>
+      </xs:attribute>
+      <!-- identify tests that are applicable to XPath 2.0 -->
+      <xs:attribute name="is-XPath2" type="xs:boolean" use="optional">
+         <xs:annotation>
+            <xs:documentation>
+               identify tests that are applicable to XPath 2.0
+            </xs:documentation>
+         </xs:annotation>
+      </xs:attribute>
+   </xs:complexType>
+
+
+
+   <!-- citation-spec-enum type                                              -->
+   <!--    Identify the document being cited                                 -->
+
+   <xs:simpleType name="citation-spec-enum">
+      <xs:annotation>
+         <xs:documentation>
+            Identify the document being cited.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:restriction base="xs:string">
+         <xs:enumeration value="XQuery"/>
+         <xs:enumeration value="FuncOps"/>
+         <xs:enumeration value="DataModel"/>
+         <xs:enumeration value="FormalSemantics"/>
+         <xs:enumeration value="SchemaPart2"/>
+         <xs:enumeration value="Schema-Errata"/>
+         <xs:enumeration value="UseCases"/>
+         <xs:enumeration value="Serialization"/>
+         <xs:enumeration value="XQueryX"/>
+      </xs:restriction>
+   </xs:simpleType>
+
+
+   <!-- comparison-enum type                                                 -->
+   <!--    Identify the type of comparison used to determine whether an      -->
+   <!--    expected result and an actual result match.                       -->
+
+   <xs:simpleType name="comparison-enum">
+      <xs:annotation>
+         <xs:documentation>
+            Identify the type of comparison used to determine whether an
+            expected result and an actual result match.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:restriction base="xs:string">
+         <xs:enumeration value="XML"/>
+         <xs:enumeration value="Fragment"/>
+         <xs:enumeration value="Text"/>
+         <xs:enumeration value="Inspect"/>
+         <xs:enumeration value="Ignore"/>
+      </xs:restriction>
+   </xs:simpleType>
+
+
+   <!-- role-enum type                                                       -->
+   <!--    Identify how a document is being used.                            -->
+
+   <xs:simpleType name="role-enum">
+      <xs:annotation>
+         <xs:documentation>
+            Identify how a document is being used.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:restriction base="xs:string">
+         <xs:enumeration value="principal-data"/>
+         <xs:enumeration value="supplemental-data"/>
+         <xs:enumeration value="schema"/>
+         <xs:enumeration value="principal"/>
+         <xs:enumeration value="console-log"/>
+         <xs:enumeration value="dtd"/>
+      </xs:restriction>
+   </xs:simpleType>
+
+
+   <!-- scenarios-enum type                                                  -->
+   <!--     Identify whether a test should execute normally, cause a parse   -->
+   <!--     error, or cause a runtime error.                                 -->
+
+   <xs:simpleType name="scenarios-enum">
+      <xs:annotation>
+         <xs:documentation>
+            Identify whether a test should execute normally, cause a parse 
+            error, or cause a runtime error.
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:restriction base="xs:string">
+         <xs:enumeration value="standard"/>
+         <xs:enumeration value="parse-error"/>
+         <xs:enumeration value="runtime-error"/>
+         <xs:enumeration value="trivial"/>
+      </xs:restriction>
+   </xs:simpleType>
+
+
+   <!-- input-document-enum type                                             -->
+   <!--    Identify expected results that are specific to either typed or    -->
+   <!--    untyped input documents.                                          -->
+
+   <xs:simpleType name="input-document-enum">
+      <xs:annotation>
+         <xs:documentation>
+            Identify expected results that are specific to either typed or
+            untyped input documents.                  
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:restriction base="xs:string">
+         <xs:enumeration value="typed"/>
+         <xs:enumeration value="untyped"/>
+      </xs:restriction>
+   </xs:simpleType>
+
+
+   <!-- description type                                                     -->
+
+   <xs:complexType name="description">
+      <xs:simpleContent>
+         <xs:extension base="xs:string">
+            <xs:attribute name="last-mod" type="xs:date"/>
+         </xs:extension>
+      </xs:simpleContent>
+   </xs:complexType>
+
+
+   <!-- XQueryErrorCode type                                                 -->
+   <!--   * is used to mean that any error code is acceptable                -->
+
+   <xs:simpleType name="XQueryErrorCode">
+      <xs:annotation>
+         <xs:documentation>
+            * is used to mean that any error code is acceptable
+         </xs:documentation>
+      </xs:annotation>
+
+      <xs:restriction base="xs:string">
+         <xs:pattern value="\*|([A-Z]{4}[0-9]{4})"/>
+      </xs:restriction>
+   </xs:simpleType>
+   
+   <xs:simpleType name="spec-version-list-type">
+      <xs:annotation>
+         <xs:documentation>
+            A list of specification versions to which expected results (actual results or error outcome) apply
+         </xs:documentation>
+      </xs:annotation>
+      <xs:list itemType="test:spec-version-type"/>
+   </xs:simpleType>
+   
+   <xs:simpleType name="spec-version-type">
+      <xs:annotation>
+         <xs:documentation>
+            A specification version. Currently "1.0" or "1.1". Could be extended to allow for example
+            "1.1+ST" to imply "XQuery 1.1 with Static Typing Feature".
+         </xs:documentation>
+      </xs:annotation>
+      <xs:restriction base="xs:string">
+         <xs:enumeration value="1.0"/>
+         <xs:enumeration value="1.1"/>
+      </xs:restriction>
+   </xs:simpleType>
+
+
+   <!-- infoBase type                                                        -->
+
+   <xs:complexType name="infoBase">
+      <xs:sequence>
+         <xs:element name="description" type="test:description"/>
+         <xs:element name="note" type="xs:string" minOccurs="0" maxOccurs="unbounded"/>
+      </xs:sequence>
+   </xs:complexType>
+
+
+</xs:schema>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/XQTSCatalog.xsl
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/XQTSCatalog.xsl b/vxquery-xtest/tests/XQTSCatalog.xsl
new file mode 100644
index 0000000..bc96a6d
--- /dev/null
+++ b/vxquery-xtest/tests/XQTSCatalog.xsl
@@ -0,0 +1,745 @@
+<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:test="http://www.w3.org/2005/02/query-test-XQTSCatalog">
+   <xsl:key name="citation-spec" match="/test-suite/citations/citation-spec" use="@name"/>
+
+      <xsl:variable name="TargetLanguage" select="/test:test-suite/@targetLanguage" />
+      <xsl:variable name="XQueryQueryOffsetPath" select="/test:test-suite/@XQueryQueryOffsetPath" />
+      <xsl:variable name="XQueryXQueryOffsetPath" select="/test:test-suite/@XQueryXQueryOffsetPath" />
+      <xsl:variable name="ResultOffsetPath" select="/test:test-suite/@ResultOffsetPath" />
+      <xsl:variable name="XQueryFileExtension" select="/test:test-suite/@XQueryFileExtension" />
+      <xsl:variable name="XQueryXFileExtension" select="/test:test-suite/@XQueryXFileExtension" />
+      <xsl:variable name="SourceOffsetPath" select="/test:test-suite/@SourceOffsetPath" />
+
+   <xsl:template match="/">
+      <html>
+         <head>
+            <title>XQuery Interoperability Test Suite</title>
+         </head>
+         <body>
+            <xsl:if test="test:test-suite/@targetLanguage">
+               <h1><xsl:value-of select="test:test-suite/@targetLanguage" /> Interoperability Test Suite</h1>
+            </xsl:if>
+            <xsl:if test="not( test:test-suite/@targetLanguage )">
+               <h1>XQuery/XQueryX Interoperability Test Suite</h1>
+            </xsl:if>
+            <h6>[Version: <xsl:value-of select="test:test-suite/@version" /> Catalog Design Date: <xsl:value-of select="test:test-suite/@CatalogDesignDate" />]</h6>
+            <h2>Introduction</h2>
+            <P>
+               The following document is an XSLT transform of the XQuery Testing Task Force (XQTTF) test catalog. The test 
+               catalog is an XML file containing meta-data about the XQuery interoperability 
+               tests published by the XQTTF. The meta-data serves to link test queries with 
+               their required input sources and results as well as providing further 
+               information about the tests (e.g. who the author was, what the purpose of the 
+               test is) and categorizing the various tests into their relevant sections. For 
+               further information and details about this catalog file, please visit the XQTTF 
+               homepage at <A HREF="http://www.w3.org/XML/Query/test-suite/">http://www.w3.org/XML/Query/test-suite/</A>.
+            </P>
+            <h2>Citations</h2>
+            <table>
+               <tr>
+                  <th>Name</th>
+                  <th>Description</th>
+                  <th>Note</th>
+               </tr>
+               <xsl:apply-templates select="test:test-suite/test:citations/test:citation-spec" />
+            </table>
+            <h2>Comparators</h2>
+            <table>
+               <tr>
+                  <th>Name</th>
+                  <th>Description</th>
+               </tr>
+               <xsl:for-each select="test:test-suite/test:comparisons/test:comparison">
+                  <tr>
+                     <td>
+                        <A>
+                           <xsl:attribute name="name">
+                              <xsl:value-of select="@name"/>
+                           </xsl:attribute>
+                           <b>
+                              <xsl:value-of select="@name"/>
+                           </b>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="test:description"/>
+                     </td>
+                  </tr>
+               </xsl:for-each>
+            </table>
+            <h2>Scenarios</h2>
+            <table>
+               <tr>
+                  <th>Name</th>
+                  <th>Description</th>
+               </tr>
+               <xsl:for-each select="test:test-suite/test:scenarios/test:scenario">
+                  <tr>
+                     <td>
+                        <A>
+                           <xsl:attribute name="name">
+                              <xsl:value-of select="@name"/>
+                           </xsl:attribute>
+                           <b>
+                              <xsl:value-of select="@name"/>
+                           </b>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="test:description"/>
+                     </td>
+                  </tr>
+               </xsl:for-each>
+            </table>
+            <h2>Roles</h2>
+            <table>
+               <tr>
+                  <th>Name</th>
+                  <th>Description</th>
+               </tr>
+               <xsl:for-each select="test:test-suite/test:roles/test:role">
+                  <tr>
+                     <td>
+                        <A>
+                           <xsl:attribute name="name">
+                              <xsl:value-of select="@name"/>
+                           </xsl:attribute>
+                           <b>
+                              <xsl:value-of select="@name"/>
+                           </b>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="test:description"/>
+                     </td>
+                  </tr>
+               </xsl:for-each>
+            </table>
+            <h2>Sources</h2>
+            <table>
+               <tr>
+                  <th>ID</th>
+                  <th>Creator</th>
+                  <th>Schema</th>
+                  <th>File</th>
+                  <th>Description</th>
+               </tr>
+               <xsl:for-each select="test:test-suite/test:sources/test:source">
+                  <tr>
+                     <td>
+                        <A>
+                           <xsl:attribute name="name">
+                              <xsl:value-of select="@ID"/>
+                           </xsl:attribute>
+                           <b>
+                              <xsl:value-of select="@ID"/>
+                           </b>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="@Creator"/>
+                     </td>
+                     <td>
+                        <A>
+                           <xsl:attribute name="href">#<xsl:value-of select="@schema"/></xsl:attribute>
+                           <xsl:value-of select="@schema"/>								
+                        </A>
+                     </td>
+                     <td>
+                        <A>
+                           <xsl:attribute name="href">
+                              <xsl:value-of select="$SourceOffsetPath"/><xsl:value-of select="@FileName"/></xsl:attribute>
+                           <xsl:value-of select="@FileName"/>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="test:description"/>
+                     </td>
+                  </tr>
+               </xsl:for-each>
+            </table>
+            <h2>Schemas</h2>
+            <table>
+               <tr>
+                  <th>ID</th>
+                  <th>URI</th>
+                  <th>File Name</th>
+                  <th>Description</th>
+               </tr>
+               <xsl:for-each select="test:test-suite/test:sources/test:schema">
+                  <tr>
+                     <td>
+                        <A>
+                           <xsl:attribute name="name">
+                              <xsl:value-of select="@ID"/>
+                           </xsl:attribute>
+                           <b>
+                              <xsl:value-of select="@ID"/>
+                           </b>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="@uri"/>
+                     </td>
+                     <td>
+                        <A>
+                           <xsl:attribute name="href"><xsl:value-of select="$SourceOffsetPath"/><xsl:value-of select="@FileName"/></xsl:attribute>
+                           <xsl:value-of select="@FileName"/>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="test:description"/>
+                     </td>
+                  </tr>
+               </xsl:for-each>
+            </table>
+            <h2>Collections</h2>
+            <table>
+               <tr>
+                  <th>ID</th>
+                  <th>Creator</th>
+                  <th>Contents</th>
+                  <th>Description</th>
+               </tr>
+               <xsl:for-each select="test:test-suite/test:sources/test:collection">
+                  <tr>
+                     <td>
+                        <A>
+                           <xsl:attribute name="name">
+                              <xsl:value-of select="@ID"/>
+                           </xsl:attribute>
+                           <b>
+                              <xsl:value-of select="@ID"/>
+                           </b>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="@Creator"/>
+                     </td>
+                     <td>
+                        <xsl:for-each select="test:input-document">
+                           <A>
+                              <xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute>
+                              <xsl:value-of select="."/>
+                           </A>
+			   <xsl:if test="position() != last()">
+			      <xsl:text>, </xsl:text>
+			   </xsl:if>
+                        </xsl:for-each>
+                     </td>
+                     <td>
+                        <xsl:value-of select="test:description"/>
+                     </td>
+                  </tr>
+               </xsl:for-each>
+            </table>
+            <h2>Modules</h2>
+            <table>
+               <tr>
+                  <th>ID</th>
+                  <th>Creator</th>
+                  <th>File</th>
+                  <th>Description</th>
+               </tr>
+               <xsl:for-each select="test:test-suite/test:sources/test:module">
+                  <tr>
+                     <td>
+                        <A>
+                           <xsl:attribute name="name">
+                              <xsl:value-of select="@ID"/>
+                           </xsl:attribute>
+                           <b>
+                              <xsl:value-of select="@ID"/>
+                           </b>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="@Creator"/>
+                     </td>
+                     <td>
+                        <A>
+                           <xsl:attribute name="href">
+                              <xsl:value-of select="$SourceOffsetPath"/><xsl:value-of select="@FileName"/><xsl:value-of select="$XQueryFileExtension"/>
+                           </xsl:attribute>
+                           <xsl:value-of select="@FileName"/>
+                        </A>
+                     </td>
+                     <td>
+                        <xsl:value-of select="test:description"/>
+                     </td>
+                  </tr>
+               </xsl:for-each>
+            </table>
+            <h2>Test Groups</h2>
+            <ul>
+               <xsl:for-each select="test:test-suite/test:test-group">
+                  <li>
+                     <A>
+                        <xsl:attribute name="href">#<xsl:value-of select="@name"/></xsl:attribute>
+                        <xsl:number level="multiple" format="1.1" count="test:test-group"/>&#x20;<xsl:value-of select="test:GroupInfo/test:title"/></A>
+                     <xsl:if test="@featureOwner">
+                        &#x20;[<xsl:value-of select="@featureOwner" />]
+                     </xsl:if>
+                     <xsl:if test="test:test-group">
+                        <ul>
+                           <xsl:for-each select="test:test-group">
+                              <li>
+                                 <A>
+                                    <xsl:attribute name="href">#<xsl:value-of select="@name"/></xsl:attribute>
+                                    <xsl:number level="multiple" format="1.1" count="test:test-group"/>&#x20;<xsl:value-of select="test:GroupInfo/test:title"/></A>
+                                 <xsl:if test="@featureOwner">
+                                    &#x20;[<xsl:value-of select="@featureOwner" />]
+                                 </xsl:if>
+                              </li>
+                           </xsl:for-each>
+                        </ul>
+                     </xsl:if>
+                  </li>
+               </xsl:for-each>
+            </ul>
+            <xsl:apply-templates select="test:test-suite/test:test-group" />
+            <h2>Appendices</h2>
+            <h3>Implementation Defined Items</h3>
+            <blockquote>
+               <table border="1">
+                  <xsl:apply-templates select="test:test-suite/test:implementation-defined-items/test:implementation-defined-item" />
+               </table>
+            </blockquote>
+            <h3>Context Properties</h3>
+            <xsl:apply-templates select="test:test-suite/test:context-properties" />
+            <h3>Features</h3>
+            <table>
+               <xsl:apply-templates select="test:test-suite/test:features/test:feature" />
+            </table>
+         </body>
+      </html>
+   </xsl:template>
+   <xsl:template match="test:test-group">
+      <A>
+         <xsl:attribute name="name">
+            <xsl:value-of select="@name"/>
+         </xsl:attribute>
+      </A>
+      <h3>
+         <xsl:number level="multiple" format="1.1" count="test:test-group"/>&#x20;<xsl:value-of select="test:GroupInfo/test:title" />
+         <xsl:if test="@featureOwner">
+            &#x20;[<xsl:value-of select="@featureOwner" />]
+         </xsl:if>
+      </h3>
+      <p/>
+      <xsl:value-of select="test:GroupInfo/test:description" />
+      <p/>
+      <ul>
+         <xsl:for-each select="test:test-group">
+            <li>
+               <A>
+                  <xsl:attribute name="href">#<xsl:value-of select="@name"/></xsl:attribute>
+                  <xsl:number level="multiple" format="1.1" count="test:test-group"/>&#x20;<xsl:value-of select="test:GroupInfo/test:title"/></A>
+               <xsl:if test="@featureOwner">
+                  &#x20;[<xsl:value-of select="@featureOwner" />]
+               </xsl:if>
+               <xsl:if test="test:test-group">
+                  <ul>
+                     <xsl:for-each select="test:test-group">
+                        <li>
+                           <A>
+                              <xsl:attribute name="href">#<xsl:value-of select="@name"/></xsl:attribute>
+                              <xsl:number level="multiple" format="1.1" count="test:test-group"/>&#x20;<xsl:value-of select="test:GroupInfo/test:title"/></A>
+                           <xsl:if test="@featureOwner">
+                              &#x20;[<xsl:value-of select="@featureOwner" />]
+                           </xsl:if>
+                        </li>
+                     </xsl:for-each>
+                  </ul>
+               </xsl:if>
+            </li>
+         </xsl:for-each>
+      </ul>
+      <xsl:apply-templates select="test:test-case" />
+      <xsl:apply-templates select="test:test-group" />
+   </xsl:template>
+
+   <xsl:template match="test:test-case">
+      <xsl:variable name="FilePath" select="@FilePath" />
+      <table width="80%" bgcolor="tan">
+         <a name="{@name}"/>
+         <tr>
+            <td>
+               <b>
+                  <xsl:value-of select="@name"/>
+               </b>
+            </td>
+            <td>
+               Scenario:
+               <A>
+                  <xsl:attribute name="href">#<xsl:value-of select="@scenario"/></xsl:attribute>
+                  <xsl:value-of select="@scenario"/>
+               </A>
+            </td>
+            <td>
+               Creator:
+               <xsl:value-of select="@Creator"/>
+            </td>
+         </tr>
+         <tr>
+            <td colspan="3">
+               <B>Description:</B>
+            </td>
+         </tr>
+         <tr>
+            <td colspan="3">
+               <xsl:value-of select="test:description"/>
+            </td>
+         </tr>
+         <tr>
+            <td colspan="3">
+               <xsl:value-of select="test:query/test:description"/>
+            </td>
+         </tr>
+         <tr>
+            <td colspan="3">
+               <B>Spec Citations:</B>
+            </td>
+         </tr>
+         <xsl:for-each select="test:spec-citation">
+            <xsl:variable name="spec-URI" select="key( 'citation-spec', @spec )/test:spec-URI" />
+            <tr>
+               <td colspan="3">
+                  <A>
+                     <xsl:attribute name="href">
+                        <xsl:value-of select="$spec-URI"/>#<xsl:value-of select="@section-pointer"/>
+                     </xsl:attribute>
+                     <xsl:value-of select="$spec-URI"/>#<xsl:value-of select="@section-pointer"/>
+                  </A>
+               </td>
+            </tr>
+         </xsl:for-each>
+         
+         <tr>
+            <td colspan="3">
+               <B>Reflects Resolution:</B>
+            </td>
+         </tr>
+         <xsl:for-each select="test:reflects-resolution">
+            <tr>
+               <td colspan="3">
+                  <A>
+                     <xsl:attribute name="href">
+                        <xsl:value-of select="."/>
+                     </xsl:attribute>
+                     <xsl:value-of select="substring-after(., '?id=')"/>
+                  </A>
+               </td>
+            </tr>
+         </xsl:for-each>
+         
+         <xsl:if test="test:input-query">
+            <tr>
+               <td colspan="3">
+                  <B>External Variables:</B>
+               </td>
+            </tr>
+            <xsl:for-each select="test:input-query">
+               <tr>
+                  <td>
+                     <xsl:text>Variable: </xsl:text>
+                     <xsl:value-of select="@variable"/>
+                  </td>
+                  <td colspan="2">
+                     <A>
+                        <xsl:choose>
+                           <xsl:when test="$TargetLanguage='XQuery'">
+                              <xsl:attribute name="href">
+                                 <xsl:value-of select="$XQueryQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="@name"/><xsl:value-of select="$XQueryFileExtension"/>
+                              </xsl:attribute>
+                              <xsl:value-of select="$XQueryQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="@name"/><xsl:value-of select="$XQueryFileExtension"/>
+                           </xsl:when>
+                           <xsl:when test="$TargetLanguage='XQueryX'">
+                              <xsl:attribute name="href">
+                                 <xsl:value-of select="$XQueryXQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="@name"/><xsl:value-of select="$XQueryXFileExtension"/>
+                              </xsl:attribute>
+                              <xsl:value-of select="$XQueryXQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="@name"/><xsl:value-of select="$XQueryXFileExtension"/>
+                           </xsl:when>
+                           <xsl:otherwise>
+                              <xsl:attribute name="href">
+                                 <xsl:value-of select="$XQueryQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="@name"/><xsl:value-of select="$XQueryFileExtension"/>
+                              </xsl:attribute>
+                              <xsl:value-of select="$XQueryQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="@name"/><xsl:value-of select="$XQueryFileExtension"/>
+                           </xsl:otherwise>
+                        </xsl:choose>
+                     </A>
+                  </td>
+               </tr>
+            </xsl:for-each>
+         </xsl:if>
+         
+         <tr>
+            <td colspan="2">
+               <B>Query:</B>
+            </td>
+            <td>
+               <xsl:if test="@is-XPath2='true'">
+                  (XPath 2.0)
+               </xsl:if>
+            </td>
+         </tr>
+         <tr>
+            <td colspan="3">
+               <A>
+                  <xsl:choose>
+                     <xsl:when test="$TargetLanguage='XQuery'">
+                        <xsl:attribute name="href">
+                           <xsl:value-of select="$XQueryQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="test:query/@name"/><xsl:value-of select="$XQueryFileExtension"/>
+                        </xsl:attribute>
+                        <xsl:value-of select="$XQueryQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="test:query/@name"/><xsl:value-of select="$XQueryFileExtension"/>
+                     </xsl:when>
+                     <xsl:when test="$TargetLanguage='XQueryX'">
+                        <xsl:attribute name="href">
+                           <xsl:value-of select="$XQueryXQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="test:query/@name"/><xsl:value-of select="$XQueryXFileExtension"/>
+                        </xsl:attribute>
+                        <xsl:value-of select="$XQueryXQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="test:query/@name"/><xsl:value-of select="$XQueryXFileExtension"/>
+                     </xsl:when>
+                     <xsl:otherwise>
+                        <xsl:attribute name="href">
+                           <xsl:value-of select="$XQueryQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="test:query/@name"/><xsl:value-of select="$XQueryFileExtension"/>
+                        </xsl:attribute>
+                        <xsl:value-of select="$XQueryQueryOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="test:query/@name"/><xsl:value-of select="$XQueryFileExtension"/>
+                     </xsl:otherwise>
+                  </xsl:choose>
+               </A>
+            </td>
+         </tr>
+         <xsl:if test="test:module">
+            <tr>
+               <td colspan="3">
+                  <B>Modules:</B>
+               </td>
+            </tr>
+            <xsl:for-each select="test:module">
+               <tr>
+                  <td colspan="2">
+                     Module ID:
+                     <A>
+                        <xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute>
+                        <xsl:value-of select="."/>
+                     </A>
+                  </td>
+                  <td>
+                     Namespace:
+                     <A>
+                        <xsl:attribute name="href">#<xsl:value-of select="@namespace"/></xsl:attribute>
+                        <xsl:value-of select="@namespace"/>
+                     </A>
+                  </td>
+               </tr>
+            </xsl:for-each>
+         </xsl:if>
+         <tr>
+            <td colspan="3">
+               <B>Inputs:</B>
+            </td>
+         </tr>
+         <xsl:for-each select="test:input-file">
+            <tr>
+               <td>
+                  Name:
+                  <xsl:value-of select="@variable"/>
+               </td>
+               <td>
+                  Role:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="@role"/></xsl:attribute>
+                     <xsl:value-of select="@role"/>
+                  </A>
+               </td>
+               <td>
+                  Source ID:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute>
+                     <xsl:value-of select="."/>
+                  </A>
+               </td>
+            </tr>
+         </xsl:for-each>
+         <xsl:for-each select="test:input-URI">
+            <tr>
+               <td>
+                  Role:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="@role"/></xsl:attribute>
+                     <xsl:value-of select="@role"/>
+                  </A>
+               </td>
+               <td>
+                  Source ID:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute>
+                     <xsl:value-of select="."/>
+                  </A>
+               </td>
+               <td>
+	          <xsl:text>(as input URI)</xsl:text>
+               </td>
+            </tr>
+         </xsl:for-each>
+         <xsl:for-each select="test:defaultCollection">
+            <tr>
+               <td>
+                  Role:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="@role"/></xsl:attribute>
+                     <xsl:value-of select="@role"/>
+                  </A>
+               </td>
+               <td>
+                  Source ID:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute>
+                     <xsl:value-of select="."/>
+                  </A>
+               </td>
+               <td>
+	          <xsl:text>(as default collection)</xsl:text>
+               </td>
+            </tr>
+         </xsl:for-each>
+         <xsl:for-each select="test:contextItem">
+            <tr>
+               <td>
+                  Role:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="@role"/></xsl:attribute>
+                     <xsl:value-of select="@role"/>
+                  </A>
+               </td>
+               <td>
+                  Source ID:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="."/></xsl:attribute>
+                     <xsl:value-of select="."/>
+                  </A>
+               </td>
+               <td>
+	          <xsl:text>(as context item)</xsl:text>
+               </td>
+            </tr>
+         </xsl:for-each>
+         <tr>
+            <td colspan="3">
+               <B>Outputs:</B>
+            </td>
+         </tr>
+         <xsl:for-each select="test:output-file">
+            <tr>
+               <td>
+                  Role:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="@role"/></xsl:attribute>
+                     <xsl:value-of select="@role"/>
+                  </A>
+                  <xsl:if test="@spec-version">
+                     <xsl:value-of select="concat(' (Version ', @spec-version, ')')" />
+                  </xsl:if>
+               </td>
+               <td>
+                  Comparator:
+                  <A>
+                     <xsl:attribute name="href">#<xsl:value-of select="@compare"/></xsl:attribute>
+                     <xsl:value-of select="@compare"/>
+                  </A>
+               </td>
+               <td>
+                  <A>
+                     <xsl:attribute name="href">
+                        <xsl:value-of select="$ResultOffsetPath"/><xsl:value-of select="$FilePath"/><xsl:value-of select="."/></xsl:attribute>
+                     Results/<xsl:value-of select="$FilePath"/><xsl:value-of select="."/>
+                  </A>
+               </td>
+            </tr>
+         </xsl:for-each>
+         <xsl:for-each select="test:expected-error">
+            <tr>
+               <td colspan="3">
+                  Error:
+                  <A>
+                     <xsl:attribute name="href">http://www.w3.org/TR/xquery/#ERR<xsl:value-of select="."/></xsl:attribute>
+                     err:<xsl:value-of select="."/>
+                  </A>
+                  <xsl:if test="@spec-version">
+                     <xsl:value-of select="concat(' (Version ', @spec-version, ')')" />
+                  </xsl:if>
+               </td>
+            </tr>
+         </xsl:for-each>
+      </table>
+      <p/>
+   </xsl:template>
+   <xsl:template match="test:citation-spec">
+      <tr>
+         <td>
+            <A>
+               <xsl:attribute name="name">
+                  <xsl:value-of select="@name"/>
+               </xsl:attribute>
+               <xsl:attribute name="href">
+                  <xsl:value-of select="test:spec-URI"/>
+               </xsl:attribute>
+               <b>
+                  <xsl:value-of select="@name"/>
+               </b>
+            </A>
+         </td>
+         <td>
+            <xsl:value-of select="test:description"/>
+         </td>
+         <td>
+            <I>
+               <xsl:value-of select="test:note"/>
+            </I>
+         </td>
+      </tr>
+   </xsl:template>
+   <xsl:template match="test:implementation-defined-item">
+      <tr>
+         <td valign="top">
+            <xsl:text>[</xsl:text>
+            <xsl:value-of select="@spec" />
+            <xsl:text>]</xsl:text>
+            <br />
+            <xsl:value-of select="@name" />
+         </td>
+         <td valign="top">
+            <xsl:value-of select="test:description/text()" />
+         </td>
+      </tr>
+   </xsl:template>
+   <xsl:template match="test:context-properties">
+      <h4>Static Context</h4>
+      <blockquote>
+         <table>
+            <xsl:apply-templates select="test:context-property[@context-type='static']" />
+         </table>
+      </blockquote>
+      <h4>Dynamic Context</h4>
+      <blockquote>
+         <table>
+            <xsl:apply-templates select="test:context-property[@context-type='dynamic']" />
+         </table>
+      </blockquote>
+   </xsl:template>
+   <xsl:template match="test:context-property">
+      <tr>
+         <td>
+            <xsl:value-of select="@name" />
+         </td>
+         <td />
+      </tr>
+   </xsl:template>
+   <xsl:template match="test:feature">
+      <tr>
+         <td>
+            <xsl:value-of select="@name" />
+         </td>
+         <td />
+      </tr>
+   </xsl:template>
+</xsl:stylesheet>
\ No newline at end of file


[13/50] [abbrv] git commit: Removed change to comparator factory provider.

Posted by pr...@apache.org.
Removed change to comparator factory provider.

The change removed all the result for the join operation.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/d61f5bd4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/d61f5bd4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/d61f5bd4

Branch: refs/heads/prestonc/hash_join
Commit: d61f5bd4680fb04b9f6925723f18842f5a45d75d
Parents: 6d0b66b
Author: Preston Carman <pr...@apache.org>
Authored: Wed Mar 12 13:19:40 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../VXQueryComparatorFactoryProvider.java       | 36 +-------------------
 1 file changed, 1 insertion(+), 35 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d61f5bd4/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
index b473d69..5a0e2df 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
@@ -16,9 +16,7 @@
  */
 package org.apache.vxquery.compiler.algebricks;
 
-import org.apache.vxquery.datamodel.accessors.SequencePointable;
 import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
-import org.apache.vxquery.datamodel.values.ValueTag;
 
 import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
 import edu.uci.ics.hyracks.algebricks.data.IBinaryComparatorFactoryProvider;
@@ -45,44 +43,12 @@ public class VXQueryComparatorFactoryProvider implements IBinaryComparatorFactor
         public IBinaryComparator createBinaryComparator() {
             final TaggedValuePointable tvp1 = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
             final TaggedValuePointable tvp2 = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
-            final SequencePointable sp1 = (SequencePointable) SequencePointable.FACTORY.createPointable();
-            final SequencePointable sp2 = (SequencePointable) SequencePointable.FACTORY.createPointable();
             return new IBinaryComparator() {
                 @Override
                 public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
                     tvp1.set(b1, s1, l1);
                     tvp2.set(b2, s2, l2);
-                    if (tvp1.getTag() != tvp2.getTag()) {
-                        return tvp1.getTag() - tvp2.getTag();
-                    }
-                    // Empty sequences do not match. Supports hash based join.
-                    switch (tvp1.getTag()) {
-                        case ValueTag.SEQUENCE_TAG:
-                            tvp1.getValue(sp1);
-                            if (sp1.getEntryCount() == 0) {
-                                return -1;
-                            }
-
-                            switch (tvp2.getTag()) {
-                                case ValueTag.SEQUENCE_TAG:
-                                    tvp2.getValue(sp2);
-                                    if (sp2.getEntryCount() == 0) {
-                                        return 1;
-                                    }
-                                    break;
-                                default:
-                            }
-
-                            break;
-                        default:
-                    }
-                    // Do a binary compare between byte arrays.
-                    for (int i = 0; i < b1.length && i < b2.length; i++) {
-                        if (b1[i] != b2[i]) {
-                            return b1[i] - b2[i];
-                        }
-                    }
-                    return b1.length - b2.length;
+                    return 0;
                 }
             };
         }


[26/50] [abbrv] git commit: Changed hash seed to match AsterixDB default.

Posted by pr...@apache.org.
Changed hash seed to match AsterixDB default.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/a50cf444
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/a50cf444
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/a50cf444

Branch: refs/heads/prestonc/hash_join
Commit: a50cf44448828609648e8e121aedf5dbed339f31
Parents: f44744f
Author: Preston Carman <pr...@apache.org>
Authored: Thu Mar 20 18:39:52 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/a50cf444/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java
index 3f9a5ad..4f9437b 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java
@@ -32,7 +32,7 @@ public class VXQueryRawBinaryHashFunctionFactory implements IBinaryHashFunctionF
     @Override
     public IBinaryHashFunction createBinaryHashFunction() {
 
-        return MurmurHash3BinaryHashFunctionFamily.INSTANCE.createBinaryHashFunction(1);
+        return MurmurHash3BinaryHashFunctionFamily.INSTANCE.createBinaryHashFunction(0);
 
     }
 


[33/50] [abbrv] git commit: Updated queries to use larger dataset with minimal output.

Posted by pr...@apache.org.
Updated queries to use larger dataset with minimal output.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/43b6a2cf
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/43b6a2cf
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/43b6a2cf

Branch: refs/heads/prestonc/hash_join
Commit: 43b6a2cf8915b9ef0bdf07cc1cc866b513831326
Parents: f9932ab
Author: Preston Carman <pr...@apache.org>
Authored: Mon Mar 17 22:41:44 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../resources/noaa-ghcn-daily/queries/q04.xq    |  4 +--
 .../noaa-ghcn-daily/queries/q04_station.xq      |  4 +--
 .../resources/noaa-ghcn-daily/queries/q05.xq    |  4 +--
 .../noaa-ghcn-daily/queries/q05_station.xq      |  4 +--
 .../resources/noaa-ghcn-daily/queries/q06.xq    | 26 +++++++++++---------
 5 files changed, 22 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/43b6a2cf/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
index f0ff178..19d5093 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
@@ -1,5 +1,5 @@
 (: XQuery Join Query :)
-(: Find all the weather readings for King county for a specific day    :)
+(: Find all the weather readings for Washington state for a specific day    :)
 (: 1976/7/4.                                                                  :)
 let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
 for $s in collection($station_collection)/stationCollection/station
@@ -8,6 +8,6 @@ let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
 for $r in collection($sensor_collection)/dataCollection/data
     
 where $s/id eq $r/station 
-    and (some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and fn:contains(fn:upper-case(fn:data($x/displayName)), "KING")))
+    and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "WASHINGTON"))
     and xs:dateTime(fn:data($r/date)) eq xs:dateTime("1976-07-04T00:00:00.000")
 return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/43b6a2cf/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_station.xq
index c9effde..100d2b3 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_station.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_station.xq
@@ -1,8 +1,8 @@
 (: XQuery Join Query :)
-(: Count all the weather stations for King county.                            :)
+(: Count all the weather stations for Washington state.                       :)
 count(
     let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
     for $s in collection($station_collection)/stationCollection/station
-    where (some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and fn:contains(fn:upper-case(fn:data($x/displayName)), "KING")))
+    where (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "WASHINGTON"))
     return $s
 )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/43b6a2cf/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
index 366eaff..44db96d 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
@@ -1,5 +1,5 @@
 (: XQuery Join Aggregate Query :)
-(: Find the lowest recorded temperature (TMIN) in the state of Oregon for     :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
 (: 2001.                                                                      :)
 fn:min(
     let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
@@ -9,7 +9,7 @@ fn:min(
     for $r in collection($sensor_collection)/dataCollection/data
     
     where $s/id eq $r/station
-        and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "OREGON"))
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
         and $r/dataType eq "TMIN" 
         and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
     return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/43b6a2cf/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_station.xq
index c01f386..ee26d88 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_station.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_station.xq
@@ -1,8 +1,8 @@
 (: XQuery Join Aggregate Query :)
-(: Count all stations in the state of Oregon.                                 :)
+(: Count all stations in the United States.                                 :)
 count(
     let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
     for $s in collection($station_collection)/stationCollection/station
-    where (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "OREGON"))
+    where (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
     return $s
 )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/43b6a2cf/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
index 0d0a4ba..d8eb815 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
@@ -1,14 +1,16 @@
 (: XQuery Self Join Query :)
 (: Self join with all stations finding the difference in min and max       :)
-(: temperature.                                                            :)
-let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-for $r_min in collection($sensor_collection_min)/dataCollection/data
-
-let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-for $r_max in collection($sensor_collection_max)/dataCollection/data
-
-where $r_min/station eq $r_max/station
-    and $r_min/date eq $r_max/date
-    and $r_min/dataType eq "TMIN"
-    and $r_max/dataType eq "TMAX"
-return ($r_max/value, $r_min/value, $r_max/value - $r_min/value)
\ No newline at end of file
+(: temperature and get the average.                                        :)
+fn:avg(
+    let $sensor_collection_min := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value
+) div 10
\ No newline at end of file


[07/50] [abbrv] git commit: More tweaks to make the benchmark cluster queries.

Posted by pr...@apache.org.
More tweaks to make the benchmark cluster queries.

* Updated the data links to real partitions.
* Updated the query copy process.
* Simplified the example config file.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/06b20cfe
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/06b20cfe
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/06b20cfe

Branch: refs/heads/prestonc/hash_join
Commit: 06b20cfe65b70a1702f324fe92504f39077c65b7
Parents: 25c38f4
Author: Preston Carman <pr...@apache.org>
Authored: Sat Mar 1 23:15:26 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 .../noaa-ghcn-daily/scripts/weather_benchmark.py  | 18 +++++++++++-------
 .../noaa-ghcn-daily/scripts/weather_example.xml   | 11 +----------
 .../metadata/VXQueryCollectionDataSource.java     |  1 -
 3 files changed, 12 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/06b20cfe/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index f0d93f8..4813bd9 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -130,11 +130,11 @@ class WeatherBenchmark:
     
     def add_collection_links_for(self, real_path, link_path, index):
         for collection in self.QUERY_COLLECTIONS:
-            collection_path = link_path + "/" + collection
+            collection_path = link_path + collection + "/"
             if not os.path.isdir(collection_path):
                 os.makedirs(collection_path)
             if index >= 0:
-                os.symlink(real_path + "/" + collection, collection_path + "/index" + str(index))
+                os.symlink(real_path + collection + "/", collection_path + "index" + str(index))
             
     def get_partition_folders(self, base_path):
         glob.glob(base_path + "partitions/d*_p*_i*")
@@ -158,7 +158,7 @@ class WeatherBenchmark:
                 os.makedirs(query_path)
         
             # Copy query files.
-            partition_paths = get_partition_paths(partitions, self.base_paths, "data_links/" + test + "/" + str(i) + "nodes")
+            partition_paths = get_cluster_link_paths_for_node(i, self.base_paths, "data_links/" + test)
             self.copy_and_replace_query(query_path, partition_paths)
 
     def copy_local_query_files(self, test):
@@ -205,12 +205,16 @@ class WeatherBenchmark:
 def get_cluster_link_paths(nodes, base_paths, key="partitions"):        
     link_paths = []
     for i in range(0, nodes):
-        for j in range(0, len(base_paths)):
-            new_link_path = base_paths[j] + key + "/" + str(i) + "nodes/"
-            link_paths.append(new_link_path)
+        new_link_path = get_cluster_link_paths_for_node(i, base_paths, key)
+        link_paths.extend(new_link_path)
     return link_paths
 
-
+def get_cluster_link_paths_for_node(node_id, base_paths, key="partitions"):        
+    link_paths = []
+    for j in range(0, len(base_paths)):
+        new_link_path = base_paths[j] + key + "/" + str(node_id) + "nodes/"
+        link_paths.append(new_link_path)
+    return link_paths
 
 def get_local_query_path(base_paths, test, partition):        
     return base_paths[0] + "queries/" + test + "/" + get_local_query_folder(len(base_paths), partition) + "/"

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/06b20cfe/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
index daf8f20..bc9f07f 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example.xml
@@ -23,16 +23,7 @@
         <cluster_ip>127.0.0.1</cluster_ip>
     </node>
     <dataset>
-        <name>tiny</name>
-        <test>local_speed_up</test>
-        <save_path>/data</save_path>
-        <partitions_per_path>1</partitions_per_path>
-        <partitions_per_path>2</partitions_per_path>
-        <partitions_per_path>4</partitions_per_path>
-        <partitions_per_path>8</partitions_per_path>
-    </dataset>
-    <dataset>
-        <name>small</name>
+        <name>tiny-example</name>
         <test>local_speed_up</test>
         <save_path>/data</save_path>
         <partitions_per_path>1</partitions_per_path>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/06b20cfe/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionDataSource.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionDataSource.java b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionDataSource.java
index 1f9f0a7..e48d4ab 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionDataSource.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/metadata/VXQueryCollectionDataSource.java
@@ -16,7 +16,6 @@
  */
 package org.apache.vxquery.metadata;
 
-import java.io.Serializable;
 import java.util.ArrayList;
 import java.util.List;
 


[05/50] [abbrv] git commit: Added license and option to run a single query.

Posted by pr...@apache.org.
Added license and option to run a single query.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/303483c1
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/303483c1
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/303483c1

Branch: refs/heads/prestonc/hash_join
Commit: 303483c156cc18df427ec5272155c02111d17705
Parents: 49e185f
Author: Preston Carman <pr...@apache.org>
Authored: Tue Mar 4 15:52:55 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 .../noaa-ghcn-daily/scripts/run_benchmark.sh    | 27 ++++++++++++++++++--
 1 file changed, 25 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/303483c1/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
index ff34a88..8417660 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
@@ -1,9 +1,29 @@
+#!/bin/bash
+#
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+# 
+#      http://www.apache.org/licenses/LICENSE-2.0
+# 
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+
 # Run all the queries and save a log. 
 # First argument: Supply the folder which houses all the queries (recursive).
 # Second argument: adds options to the VXQuery CLI.
 #
 # run_benchmark.sh ./noaa-ghcn-daily/benchmarks/local_speed_up/queries/
 # run_benchmark.sh ./noaa-ghcn-daily/benchmarks/local_speed_up/queries/ "-client-net-ip-address 169.235.27.138"
+# run_benchmark.sh ./noaa-ghcn-daily/benchmarks/local_speed_up/queries/ "" q03
 #
 
 if [ -z "${1}" ]
@@ -14,7 +34,10 @@ fi
 
 for j in $(find ${1} -name '*.xq')
 do
-	echo "Running query: ${j}"
-	time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -frame-size 1000000 -repeatexec 10 > ${j}.log 2>&1
+	if [ -z "${3}" ] || [[ "${j}" =~ "${3}" ]] 
+	then
+		echo "Running query: ${j}"
+		time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -frame-size 1000000 -repeatexec 10 > ${j}.log 2>&1
+	fi;
 done
 


[32/50] [abbrv] git commit: Added the option to create an inventory csv file.

Posted by pr...@apache.org.
Added the option to create an inventory csv file.

The inventory hold the number of sensor and reading for each station.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/f60f8858
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/f60f8858
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/f60f8858

Branch: refs/heads/prestonc/hash_join
Commit: f60f885885409dd2781cbfda1baaf18c89911b53
Parents: a50cf44
Author: Preston Carman <pr...@apache.org>
Authored: Tue Mar 25 16:38:28 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../noaa-ghcn-daily/scripts/weather_cli.py      |  8 +++--
 .../scripts/weather_config_ghcnd.py             | 14 ++++----
 .../scripts/weather_convert_to_xml.py           | 35 ++++++++++++++++++--
 3 files changed, 46 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f60f8858/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
index 52945e5..5bfa698 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
@@ -53,7 +53,7 @@ def main(argv):
             print '    -a        Append the results to the progress file.'
             print '    -f (str)  The file name of a specific station to process.'
             print '              * Helpful when testing a single stations XML file output.'
-            print '    -l (str)  Select the locality of the scripts execution (download, progress_file, sensor_build, station_build, partition, partition_scheme, statistics).'
+            print '    -l (str)  Select the locality of the scripts execution (download, progress_file, sensor_build, station_build, partition, partition_scheme, inventory, statistics).'
             print '    -m (int)  Limits the number of files created for each station.'
             print '              * Helpful when testing to make sure all elements are supported for each station.'
             print '              Alternate form: --max_station_files=(int)'
@@ -73,7 +73,7 @@ def main(argv):
                 print 'Error: Argument must be a file name for --file (-f).'
                 sys.exit()
         elif opt in ('-l', "--locality"):
-            if arg in ("download", "progress_file", "sensor_build", "station_build", "partition", "partition_scheme", "test_links", "queries", "statistics"):
+            if arg in ("download", "progress_file", "sensor_build", "station_build", "partition", "partition_scheme", "test_links", "queries", "inventory", "statistics"):
                 section = arg
             else:
                 print 'Error: Argument must be a string for --locality (-l) and a valid locality.'
@@ -221,6 +221,10 @@ def main(argv):
             print 'Processing the queries section (' + dataset.get_name() + ').'
             benchmark.copy_query_files(reset)
     
+    if section in ("inventory"):
+        print 'Processing the inventory section.'
+        convert.process_inventory_file()
+                  
 #     if section in ("statistics"):
 #         print 'Processing the statistics section.'
 #         data.print_progress_file_stats(convert)

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f60f8858/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py
index 6d3bd9c..04fff52 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_config_ghcnd.py
@@ -86,10 +86,10 @@ STATES_FIELDS['CODE'] = ['CODE', 1, 2, 'Character']
 STATES_FIELDS['NAME'] = ['NAME', 4, 50, 'Character']
 
 # Details about the row.
-INVENTORY_FIELDS = []
-INVENTORY_FIELDS.append(['ID', 1, 11, 'Character'])
-INVENTORY_FIELDS.append(['LATITUDE', 13, 20, 'Real'])
-INVENTORY_FIELDS.append(['LONGITUDE', 22, 30, 'Real'])
-INVENTORY_FIELDS.append(['ELEMENT', 32, 35, 'Character'])
-INVENTORY_FIELDS.append(['FIRSTYEAR', 37, 40, 'Integer'])
-INVENTORY_FIELDS.append(['LASTYEAR', 42, 45, 'Integer'])
+INVENTORY_FIELDS = {}
+INVENTORY_FIELDS['ID'] = ['ID', 1, 11, 'Character']
+INVENTORY_FIELDS['LATITUDE'] = ['LATITUDE', 13, 20, 'Real']
+INVENTORY_FIELDS['LONGITUDE'] = ['LONGITUDE', 22, 30, 'Real']
+INVENTORY_FIELDS['ELEMENT'] = ['ELEMENT', 32, 35, 'Character']
+INVENTORY_FIELDS['FIRSTYEAR'] = ['FIRSTYEAR', 37, 40, 'Integer']
+INVENTORY_FIELDS['LASTYEAR'] = ['LASTYEAR', 42, 45, 'Integer']

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f60f8858/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
index c115efa..a4f33a1 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
@@ -109,9 +109,10 @@ class WeatherConvertToXML:
 
         # Extra support files.
         self.ghcnd_countries = base_path + '/ghcnd-countries.txt'
+        self.ghcnd_inventory = base_path + '/ghcnd-inventory.txt'
         self.ghcnd_states = base_path + '/ghcnd-states.txt'
         self.ghcnd_stations = base_path + '/ghcnd-stations.txt'
-
+        
         # MSHR support files.
         self.mshr_stations = base_path + '/mshr_enhanced_201402.txt'
         
@@ -160,6 +161,36 @@ class WeatherConvertToXML:
     def get_base_folder(self, station_id, data_type="sensors"):
         return build_base_save_folder(self.save_path, station_id, data_type) 
     
+    def process_inventory_file(self):
+        print "Processing inventory file"
+        file_stream = open(self.ghcnd_inventory, 'r')
+        
+        csv_header = ['ID', 'SENSORS', 'SENSORS_COUNT',  'MAX_YEARS', 'TOTAL_YEARS_FOR_ALL_SENSORS']
+        row = file_stream.readline()
+        csv_inventory = {}
+        for row in file_stream:
+            id = self.get_field_from_definition(row, INVENTORY_FIELDS['ID'])
+            sensor_id = self.get_field_from_definition(row, INVENTORY_FIELDS['ELEMENT'])
+            start = int(self.get_field_from_definition(row, INVENTORY_FIELDS['FIRSTYEAR']))
+            end = int(self.get_field_from_definition(row, INVENTORY_FIELDS['LASTYEAR']))
+            if id in csv_inventory:
+                new_count = str(int(csv_inventory[id][2]) + 1)
+                new_max = str(max(int(csv_inventory[id][3]), (end - start)))
+                new_total = str(int(csv_inventory[id][3]) + end - start)
+                csv_inventory[id] = [id, (csv_inventory[id][1] + "," + sensor_id), new_count, new_max, new_total]
+            else:
+                csv_inventory[id] = [id, sensor_id, str(1), str(end - start), str(end - start)]
+                
+        path = self.save_path + "/inventory.csv"
+        self.save_csv_file(path, csv_inventory, csv_header)
+    
+    def save_csv_file(self, path, csv_inventory, header):
+        csv_content = "|".join(header) + "\n"
+        for row_id in csv_inventory:
+            csv_content += "|".join(csv_inventory[row_id]) + "\n"
+        self.save_file(path, csv_content)
+        
+
     def process_station_file(self, file_name):
         print "Processing station file: " + file_name
         file_stream = open(file_name, 'r')
@@ -333,7 +364,7 @@ class WeatherConvertToXML:
         country_code = self.get_field_from_definition(station_mshr_row, MSHR_FIELDS['FIPS_COUNTRY_CODE']).strip()
         country_name = self.get_field_from_definition(station_mshr_row, MSHR_FIELDS['FIPS_COUNTRY_NAME']).strip()
         if country_code != "" and country_name != "":
-            additional_xml += self.default_xml_location_labels("CNTRY", "FIPS:"+country_code, country_name)
+            additional_xml += self.default_xml_location_labels("CNTRY", "FIPS:" + country_code, country_name)
         
         return additional_xml
 


[29/50] [abbrv] git commit: Updated the comparator to actually check the two values.

Posted by pr...@apache.org.
Updated the comparator to actually check the two values.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/c97d8175
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/c97d8175
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/c97d8175

Branch: refs/heads/prestonc/hash_join
Commit: c97d817579fdfa313c63819e52af085d1a4b9a68
Parents: c3a7ce2
Author: Preston Carman <pr...@apache.org>
Authored: Mon Mar 31 16:11:22 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../compiler/algebricks/VXQueryComparatorFactoryProvider.java | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/c97d8175/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
index 5a0e2df..10da31e 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/algebricks/VXQueryComparatorFactoryProvider.java
@@ -48,7 +48,12 @@ public class VXQueryComparatorFactoryProvider implements IBinaryComparatorFactor
                 public int compare(byte[] b1, int s1, int l1, byte[] b2, int s2, int l2) {
                     tvp1.set(b1, s1, l1);
                     tvp2.set(b2, s2, l2);
-                    return 0;
+                    for (int i = 0; i < l1 && i < l2; ++i) {
+                        if (b1[s1 + i] != b2[s2 + i]) {
+                            return b1[s1 + i] - b2[s2 + i];
+                        }
+                    }
+                    return l1 - l2;
                 }
             };
         }


[47/50] [abbrv] New weather benchmark test suite that includes tests for 1, 2, and 4 partitions of data.

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/d2771c04/vxquery-xtest/tests/XQTSCatalog.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/XQTSCatalog.xml b/vxquery-xtest/tests/XQTSCatalog.xml
new file mode 100644
index 0000000..88a7981
--- /dev/null
+++ b/vxquery-xtest/tests/XQTSCatalog.xml
@@ -0,0 +1,955 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<?xml-stylesheet type="text/xsl" href="XQTSCatalog.xsl" ?>
+<!DOCTYPE test-suite [
+
+<!ELEMENT GroupInfo ( title, description ) >
+
+<!ELEMENT citation-spec ( description | note | spec-URI )* >
+<!ATTLIST citation-spec name NMTOKEN #REQUIRED >
+
+<!ELEMENT citations ( citation-spec+ ) >
+
+<!ELEMENT collection ( description, input-document+ ) >
+<!ATTLIST collection Creator CDATA #REQUIRED >
+<!ATTLIST collection ID NMTOKEN #REQUIRED >
+
+<!ELEMENT comparison ( description ) >
+<!ATTLIST comparison name NMTOKEN #REQUIRED >
+
+<!ELEMENT comparisons ( comparison+ ) >
+
+<!ELEMENT context-properties ( context-property+ ) >
+
+<!ELEMENT context-property EMPTY >
+<!ATTLIST context-property context-type ( dynamic | static ) #REQUIRED >
+<!ATTLIST context-property name CDATA #REQUIRED >
+
+<!ELEMENT contextItem ( #PCDATA ) >
+<!ATTLIST contextItem role NMTOKEN #FIXED "principal-data" >
+
+<!ELEMENT defaultCollection ( #PCDATA ) >
+<!ATTLIST defaultCollection role NMTOKEN #REQUIRED >
+
+<!ELEMENT description ( #PCDATA ) >
+<!ATTLIST description last-mod NMTOKEN #IMPLIED >
+
+<!ELEMENT expected-error ( #PCDATA ) >
+<!ATTLIST expected-error input-document NMTOKEN #IMPLIED >
+<!ATTLIST expected-error spec-version NMTOKENS #IMPLIED >
+
+<!ELEMENT feature EMPTY >
+<!ATTLIST feature name CDATA #REQUIRED >
+
+<!ELEMENT features ( feature+ ) >
+
+<!ELEMENT implementation-defined-item ( description ) >
+<!ATTLIST implementation-defined-item name ID #REQUIRED >
+<!ATTLIST implementation-defined-item spec ( DataModel | FuncOps | Serialization | XQuery ) #REQUIRED >
+
+<!ELEMENT implementation-defined-items ( implementation-defined-item+ ) >
+
+<!ELEMENT input-URI ( #PCDATA ) >
+<!ATTLIST input-URI role NMTOKEN #FIXED "principal-data" >
+<!ATTLIST input-URI variable ( input-context | input-context1 | input-context2 ) #REQUIRED >
+
+<!ELEMENT input-document ( #PCDATA ) >
+
+<!ELEMENT input-file ( #PCDATA ) >
+<!ATTLIST input-file role NMTOKEN #FIXED "principal-data" >
+<!ATTLIST input-file variable ( input-context | input-context1 | input-context2 | input-context3 | inputDocument | var ) #REQUIRED >
+
+<!ELEMENT input-query EMPTY >
+<!ATTLIST input-query date CDATA #REQUIRED >
+<!ATTLIST input-query name ID #REQUIRED >
+<!ATTLIST input-query variable NMTOKEN #FIXED "x" >
+
+<!ELEMENT module ( #PCDATA | description )* >
+<!ATTLIST module Creator CDATA #IMPLIED >
+<!ATTLIST module FileName CDATA #IMPLIED >
+<!ATTLIST module ID ID #IMPLIED >
+<!ATTLIST module namespace CDATA #IMPLIED >
+
+<!ELEMENT note ( #PCDATA ) >
+
+<!ELEMENT output-file ( #PCDATA ) >
+<!ATTLIST output-file compare ( Fragment | Ignore | Inspect | Text | XML ) #REQUIRED >
+<!ATTLIST output-file input-document NMTOKEN #IMPLIED >
+<!ATTLIST output-file spec-version NMTOKENS #IMPLIED >
+<!ATTLIST output-file role NMTOKEN #FIXED "principal" >
+
+<!ELEMENT query ( description? ) >
+<!ATTLIST query date CDATA #REQUIRED >
+<!ATTLIST query name NMTOKEN #REQUIRED >
+<!ATTLIST query static-name NMTOKEN #IMPLIED >
+
+<!ELEMENT reflects-resolution ( #PCDATA ) >
+
+<!ELEMENT role ( description, note? ) >
+<!ATTLIST role name NMTOKEN #REQUIRED >
+
+<!ELEMENT roles ( role+ ) >
+
+<!ELEMENT scenario ( description ) >
+<!ATTLIST scenario name NMTOKEN #REQUIRED >
+
+<!ELEMENT scenarios ( scenario+ ) >
+
+<!ELEMENT schema ( description ) >
+<!ATTLIST schema FileName CDATA #REQUIRED >
+<!ATTLIST schema ID ID #REQUIRED >
+<!ATTLIST schema uri CDATA #REQUIRED >
+
+<!ELEMENT source ( description, note* ) >
+<!ATTLIST source Creator CDATA #REQUIRED >
+<!ATTLIST source FileName CDATA #REQUIRED >
+<!ATTLIST source ID ID #REQUIRED >
+<!ATTLIST source schema NMTOKEN #IMPLIED >
+
+<!ELEMENT sources ( source+, schema+, collection+, module+ ) >
+
+<!ELEMENT spec-URI ( #PCDATA ) >
+
+<!ELEMENT spec-citation EMPTY >
+<!ATTLIST spec-citation section-number NMTOKEN #REQUIRED >
+<!ATTLIST spec-citation section-pointer NMTOKEN #REQUIRED >
+<!ATTLIST spec-citation section-title CDATA #REQUIRED >
+<!ATTLIST spec-citation spec ( DataModel | FuncOps | UseCases | XQuery ) #REQUIRED >
+
+<!ELEMENT test-case ( contextItem | defaultCollection | description | expected-error | input-URI | input-file | input-query | module | output-file | query | reflects-resolution | spec-citation )* >
+<!ATTLIST test-case Creator CDATA #REQUIRED >
+<!ATTLIST test-case FilePath CDATA #REQUIRED >
+<!ATTLIST test-case is-XPath2 ( false | true ) #IMPLIED >
+<!ATTLIST test-case name ID #REQUIRED >
+<!ATTLIST test-case scenario ( parse-error | runtime-error | standard ) #REQUIRED >
+
+<!ELEMENT test-group ( GroupInfo | test-case | test-group )* >
+<!ATTLIST test-group featureOwner CDATA #IMPLIED >
+<!ATTLIST test-group is-XPath2 ( false | true ) #IMPLIED >
+<!ATTLIST test-group name ID #REQUIRED >
+<!ATTLIST test-group xmlns CDATA #IMPLIED >
+
+<!ELEMENT test-suite ( test-suite-info, citations, comparisons, roles, scenarios, sources, implementation-defined-items, features, context-properties, test-group+ ) >
+<!ATTLIST test-suite CatalogDesignDate NMTOKEN #REQUIRED >
+<!ATTLIST test-suite ResultOffsetPath CDATA #REQUIRED >
+<!ATTLIST test-suite SourceOffsetPath CDATA #REQUIRED >
+<!ATTLIST test-suite XQueryFileExtension NMTOKEN #REQUIRED >
+<!ATTLIST test-suite XQueryQueryOffsetPath CDATA #REQUIRED >
+<!ATTLIST test-suite XQueryXFileExtension NMTOKEN #REQUIRED >
+<!ATTLIST test-suite XQueryXQueryOffsetPath CDATA #REQUIRED >
+<!ATTLIST test-suite version CDATA #REQUIRED >
+<!ATTLIST test-suite xmlns CDATA #REQUIRED >
+<!ATTLIST test-suite xmlns:xsi CDATA #REQUIRED >
+<!ATTLIST test-suite xsi:schemaLocation CDATA #REQUIRED >
+
+<!ELEMENT test-suite-info ( title, description ) >
+
+<!ELEMENT title ( #PCDATA ) >
+
+<!ENTITY GhcndPartition1Queries SYSTEM "cat/GhcndPartition1Queries.xml">
+<!ENTITY GhcndPartition2Queries SYSTEM "cat/GhcndPartition2Queries.xml">
+<!ENTITY GhcndPartition4Queries SYSTEM "cat/GhcndPartition4Queries.xml">
+]>
+<test-suite xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog"
+            xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+            CatalogDesignDate="2003-04-03"
+            version="1.0.3"
+            SourceOffsetPath="./"
+            ResultOffsetPath="ExpectedTestResults/"
+            XQueryQueryOffsetPath="Queries/XQuery/"
+            XQueryXQueryOffsetPath="Queries/XQueryX/"
+            XQueryFileExtension=".xq"
+            XQueryXFileExtension=".xqx"
+            xsi:schemaLocation="http://www.w3.org/2005/02/query-test-XQTSCatalog XQTSCatalog.xsd">
+   <test-suite-info>
+      <title>VXQuery Test Suite</title>
+      <description> 
+         Test Suite for VXQuery. 
+      </description>
+   </test-suite-info>
+   <citations>
+      <citation-spec name="XQuery">
+         <description last-mod="2007-01-23">XQuery 1.0: An XML Query Language</description>
+         <spec-URI>http://www.w3.org/TR/xquery/</spec-URI>
+      </citation-spec>
+      <citation-spec name="FuncOps">
+         <description last-mod="2007-01-23">XQuery 1.0 and XPath 2.0 Functions and Operators</description>
+         <spec-URI>http://www.w3.org/TR/xpath-functions/</spec-URI>
+      </citation-spec>
+      <citation-spec name="DataModel">
+         <description last-mod="2007-01-23">XQuery 1.0 and XPath 2.0 Data Model</description>
+         <spec-URI>http://www.w3.org/TR/xpath-datamodel/</spec-URI>
+      </citation-spec>
+      <citation-spec name="FormalSemantics">
+         <description last-mod="2007-01-23">XQuery 1.0 and XPath 2.0 Formal Semantics</description>
+         <spec-URI>http://www.w3.org/TR/xquery-semantics/</spec-URI>
+      </citation-spec>
+      <citation-spec name="SchemaPart2">
+         <description last-mod="2003-03-25">XML Schema Part 2: Datatypes</description>
+         <spec-URI>http://www.w3.org/TR/xmlschema-2/</spec-URI>
+      </citation-spec>
+      <citation-spec name="Schema-Errata">
+         <description last-mod="2003-03-25">XML Schema Errata</description>
+         <note>Current practice is to have one Errata document for all parts of Schema.</note>
+         <spec-URI>http://www.w3.org/2001/05/xmlschema-errata</spec-URI>
+      </citation-spec>
+      <citation-spec name="UseCases">
+         <description last-mod="2006-07-12">XML Query Use Cases</description>
+         <spec-URI>http://www.w3c.org/TR/xquery-use-cases/</spec-URI>
+      </citation-spec>
+      <citation-spec name="XQueryX">
+         <description last-mod="2007-01-23">XML Syntax for XQuery 1.0 (XQueryX)</description>
+         <spec-URI>http://www.w3.org/TR/xqueryx/</spec-URI>
+      </citation-spec>
+      <citation-spec name="Serialization">
+         <description last-mod="2007-01-23">XSLT 2.0 and XQuery 1.0 Serialization</description>
+         <spec-URI>http://www.w3.org/TR/xslt-xquery-serialization/</spec-URI>
+      </citation-spec>
+   </citations>
+   <comparisons>
+      <comparison name="XML">
+         <description last-mod="2003-03-25">The XML InfoSets should be canonicalized and compared.</description>
+      </comparison>
+      <comparison name="Fragment">
+         <description last-mod="2004-10-20">
+            A 'fragment' refers to an XML based instance which has multiple top-level elements and NO XML declaration.
+            The comparator for this should simply wrap the entire fragment in a container element and perform XML comparison.
+         </description>
+      </comparison>
+      <comparison name="Text">
+         <description last-mod="2003-03-25">
+            Each line of non-whitespace text should match. New-line sequences
+            may vary and should be neutralized. Due to issues with the XML serialization of certain characters (e.g. '&lt;'),
+            it is not possible to simply compare the actual and expected results. Rather (as is the case with the 'Fragment' comparator)
+            the test harness should convert the results into valid XML (by adding a container element) and perform comparison
+            on the XML canonicalized versions of the results.
+         </description>
+      </comparison>
+      <comparison name="Ignore">
+         <description last-mod="2003-03-25">
+            Only the presence/absence of this file is significant,
+            not its content.
+         </description>
+      </comparison>
+      <comparison name="Inspect">
+         <description last-mod="2003-03-25">
+            Automated comparison is not possible. the output should be
+            inspected by a human.
+         </description>
+      </comparison>
+   </comparisons>
+   <roles>
+      <role name="principal-data">
+         <description last-mod="2003-03-25">
+            This is the source that is handed in to the processor as the
+            initial input sequence, setting the "evaluation context" as described in XQuery chapter 2.
+         </description>
+      </role>
+      <role name="supplemental-data">
+         <description last-mod="2003-03-25">
+            These are sources that may be read by functions such as
+            fn:document() as the query is evaluated.
+         </description>
+      </role>
+      <role name="schema">
+         <description last-mod="2003-03-25">
+            These are schema definitions that may be referenced by sources
+            or in the query.
+         </description>
+      </role>
+      <role name="dtd">
+         <description last-mod="2003-03-25">
+            These are dtd definitions that may be referenced by sources
+            or in the query.
+         </description>
+      </role>
+      <role name="principal">
+         <description last-mod="2003-03-25">
+            This is an output (either text or XML) that will contain the
+            query results. If the processor invocation sequence accepts a filename for results, this name may be
+            passed, possibly prefixed by a partial directory path to allow storage of the results in a separate
+            directory tree.
+         </description>
+      </role>
+      <role name="console-log">
+         <description last-mod="2003-03-25">
+            This is an output (text file tagged .log) that will contain the
+            captured "console" output for a command-line invocation, or equivalent messages from a harness. The
+            main goal is to capture error messages that came from the processor.
+         </description>
+         <note>
+            A test lab may choose to capture console output for every test case, in which case the presence
+            of this element is a signal that the console log of this test contains messages that are significant to
+            the pass/fail determination.
+         </note>
+      </role>
+   </roles>
+   <scenarios>
+      <scenario name="standard">
+         <description last-mod="2005-06-10">
+            A query this is expected to produce valid results. Principal input should always be specified, even if the query doesn't have any PathExpr.
+         </description>
+      </scenario>
+      <scenario name="parse-error">
+         <description last-mod="2005-06-10">
+            A query this is expected to raise a parsing/syntax error at query parse time. Principal input should always be specified, even if the query doesn't have any PathExpr.
+         </description>
+      </scenario>
+      <scenario name="runtime-error">
+         <description last-mod="2005-06-10">
+            A query this is expected to raise a runtime error at query parse time. Runtime errors in this case include those raised by static typing rules. Principal input should always be specified, even if the query doesn't have any PathExpr.
+         </description>
+      </scenario>
+      <scenario name="trivial">
+         <description last-mod="2006-03-29">
+            A query this is expected to produce valid results. Principal input should always be specified, even if the query doesn't have any PathExpr.
+            The initial query returns an &lt;xqx:xquery&gt; element (Trivial Embedding of XQuery).
+            This embedded query is then executed to produce the final result.
+         </description>
+      </scenario>
+   </scenarios>
+   <sources>
+      <source ID="XQTSCatalog" FileName="XQTSCatalog.xml" Creator="XQuery Test Task Force"
+              schema="XQTSCatalogxsd">
+         <description last-mod="2005-04-14">XQuery Test Suite Catalog</description>
+      </source>
+      <source ID="bib2" FileName="TestSources/bib2.xml" Creator="spec-authors">
+         <description last-mod="2003-03-25">Bibliography example with extra comments and PIs.</description>
+      </source>
+      <source ID="emptydoc" FileName="TestSources/emptydoc.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">Contains just a "doc" element, no comments/text/PIs.</description>
+      </source>
+      <source ID="fsx" FileName="TestSources/fsx.xml" Creator="Mike Rorke">
+         <description last-mod="2003-03-25">Data about a filesystem represented in XML.</description>
+      </source>
+      <source ID="fsx_NS" FileName="TestSources/fsx_NS.xml" Creator="Mike Rorke">
+         <description last-mod="2003-03-25">Data about a filesystem represented in XML with namespace-qualified names.</description>
+      </source>
+      <source ID="MixNS" FileName="TestSources/MixNS.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">Small tree with element names in mixed namespaces.</description>
+         <note>Use @index to identify elements precisely.</note>
+      </source>
+      <source ID="nw_Customers" FileName="TestSources/nw_Customers.xml" Creator="Kuen Siew">
+         <description last-mod="2003-03-25">Customer name/address file with some non-ASCII characters.</description>
+      </source>
+      <source ID="TopMany" FileName="TestSources/TopMany.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">Like TreeCompass, but with comments and PIs off the root. PI targets vary.</description>
+         <note>All text nodes must have non-whitespace characters.</note>
+      </source>
+      <source ID="Tree1Child" FileName="TestSources/Tree1Child.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">A "compass" tree that has just one child, of an abnormal name, off the center node.</description>
+         <note>One attribute each on west and center.</note>
+      </source>
+      <source ID="Tree1Text" FileName="TestSources/Tree1Text.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">A "compass" tree that has just a text node and no child element off the center node.</description>
+      </source>
+      <source ID="TreeCompass" FileName="TestSources/TreeCompass.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">A tree intended to allow many kinds of path expressions.</description>
+         <note>Need multiple attributes on center, west, and south, plus @mark scattered around.</note>
+         <note>Mix of text and element children in many places, but east should have only a text node.</note>
+         <note>All text nodes must have non-whitespace characters.</note>
+         <note>Top element is far-north.</note>
+      </source>
+      <source ID="TreeEmpty" FileName="TestSources/TreeEmpty.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">A "compass" tree that has just one "south" element at the top, bearing one "mark" attribute.</description>
+      </source>
+      <source ID="TreeRepeat" FileName="TestSources/TreeRepeat.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">A "compass" tree that has center elements off the real center node.</description>
+         <note>Use @mark to distinguish center elements.</note>
+         <note>"Real" center must have multiple element children, some with duplicate names (south-east).</note>
+         <note>Repeating attribute names used, including same name on elements of the same name.</note>
+         <note>Comments and text nodes are strewn about. All text nodes must have non-whitespace characters.</note>
+      </source>
+      <source ID="TreeStack" FileName="TestSources/TreeStack.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">A "compass" tree that has several "south" elements, some stacked within each other.</description>
+         <note>Use "mark" attributes at several levels and on all south elements.</note>
+      </source>
+      <source ID="TreeTrunc" FileName="TestSources/TreeTrunc.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">A "compass" tree that has no content at all in center or west, no attributes anywhere.</description>
+      </source>
+      <source ID="xq311A" FileName="TestSources/xq311A.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">Data that fits first example in XQuery 3.11.</description>
+      </source>
+      <source ID="xq311B" FileName="TestSources/xq311B.xml" Creator="David Marston">
+         <description last-mod="2003-03-25">Data that fits later examples in XQuery 3.11.</description>
+      </source>
+      <source ID="DupNode" FileName="TestSources/DupNode.xml" Creator="Andreas Behm">
+         <description last-mod="2005-04-26">Simple document with all node kinds</description>
+      </source>
+      <source ID="inscope" FileName="TestSources/inscope.xml" Creator="Andreas Behm">
+         <description last-mod="2005-08-26">Simple document with namespaces</description>
+      </source>
+      <source ID="nsmode" FileName="TestSources/nsmode.xml" Creator="Andreas Behm">
+         <description last-mod="2005-04-26">Source document for namespace copy modes</description>
+      </source>
+      <source ID="works" FileName="TestSources/works.xml" Creator="Carmelo Montanez">
+         <description last-mod="2005-03-04">Data for various NIST tests</description>
+      </source>
+      <source ID="examples" FileName="TestSources/examples.xml" Creator="Carmelo Montanez"
+              schema="examplesxsd">
+         <description last-mod="2006-05-19">Data for fn-data-1 test.</description>
+      </source>
+      <source ID="works-mod" FileName="TestSources/works-mod.xml" Creator="Carmelo Montanez">
+         <description last-mod="2005-03-04">Data for various NIST tests (abbreviated, unabbreviated syntax)</description>
+      </source>
+      <source ID="lang" FileName="TestSources/lang.xml" Creator="Carmelo Montanez">
+         <description last-mod="2005-10-19">Data for fn:lang tests.</description>
+      </source>
+      <source ID="staff" FileName="TestSources/staff.xml" Creator="Carmelo Montanez">
+         <description last-mod="2005-03-04">Data for various NIST tests</description>
+      </source>
+      <source ID="acme_corp" FileName="TestSources/acme_corp.xml"
+              Creator="Ravindranath Chennoju">
+         <description last-mod="2005-08-30">Source document for Function Declaration tests</description>
+      </source>
+      <source ID="bib" FileName="TestSources/bib.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+      </source>
+      <source ID="reviews" FileName="TestSources/reviews.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+      </source>
+      <source ID="books" FileName="TestSources/books.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+      </source>
+      <source ID="prices" FileName="TestSources/prices.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query XMP use cases</description>
+      </source>
+      <source ID="book" FileName="TestSources/book.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query TREE use cases</description>
+      </source>
+      <source ID="report1" FileName="TestSources/report1.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query SEQ use cases</description>
+      </source>
+      <source ID="items" FileName="TestSources/items.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+      </source>
+      <source ID="bids" FileName="TestSources/bids.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+      </source>
+      <source ID="users" FileName="TestSources/users.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query RDB use cases</description>
+      </source>
+      <source ID="string" FileName="TestSources/string.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query STRING use cases</description>
+      </source>
+      <source ID="company-data" FileName="TestSources/company-data.xml"
+              Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query STRING use cases</description>
+      </source>
+      <source ID="auction" FileName="TestSources/auction.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query NS use cases</description>
+      </source>
+      <source ID="partlist" FileName="TestSources/partlist.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query PARTS use cases</description>
+      </source>
+      <source ID="sgml" FileName="TestSources/sgml.xml" Creator="XML Query WG">
+         <description last-mod="2005-02-11">Data for the the XML Query SGML use cases</description>
+      </source>
+      <source ID="atomic" FileName="TestSources/atomic.xml" Creator="Carmelo Montanez"
+              schema="atomicxsd">
+         <description last-mod="2005-03-08">A Schema validated xml file, that contains values for data types. Can be used by any test.</description>
+      </source>
+      <source ID="id-idref-dtd" FileName="TestSources/iddtd.xml" Creator="Carmelo Montanez">
+         <description last-mod="2006-06-28">A DTD validated xml file, that contains data for the ID/IDREF function tests.</description>
+      </source>
+      <source ID="atomicns" FileName="TestSources/atomicns.xml" Creator="Carmelo Montanez">
+         <description last-mod="2006-03-15">A non schema validated xml file, that contains values for data types. Can be used by any test.</description>
+      </source>
+      <source ID="orderData" FileName="TestSources/orderData.xml" Creator="Carmelo Montanez"
+              schema="orderDataxsd">
+         <description last-mod="2005-06-01">A Schema validated xml file, that contains values for some of the order by tests generated by NIST.</description>
+      </source>
+      <source ID="id-idref" FileName="TestSources/id.xml" Creator="Carmelo Montanez"
+              schema="idxsd">
+         <description last-mod="2006-05-12">Data for id and idref related functions (schema-based).</description>
+      </source>
+      <source ID="id-idref2" FileName="TestSources/id2.xml" Creator="Michael Kay"
+              schema="idxsd">
+         <description last-mod="2009-03-06">More data for id and idref related functions (schema-based).</description>
+      </source>
+      <source ID="SpecialTypes" FileName="TestSources/SpecialTypes.xml" Creator="Mike Rorke"
+              schema="SpecialTypesXSD">
+         <description last-mod="2005-06-01">A Schema validated XML file containing certain special types e.g. interleave types, union types, anySimpleType</description>
+      </source>
+      <source ID="QNameSource" FileName="TestSources/QName-source.xml" Creator="Mike Rorke"
+              schema="QNameSourceXSD">
+         <description last-mod="2005-09-28">A schema validated XML file containing QName and QName derived types.</description>
+      </source>
+      <source ID="notation" FileName="TestSources/notation.xml" Creator="Andreas Behm"
+              schema="notationschema">
+         <description last-mod="2005-10-10">A Scehma validated xml file with NOTATION elements</description>
+      </source>
+      <source ID="textWithSpaces" FileName="TestSources/textWithSpaces.xml"
+              Creator="Joanne Tong">
+         <description last-mod="2005-09-29">Data for normalize-space functions</description>
+      </source>
+      <source ID="XMarkAuction" FileName="TestSources/XMarkAuction.xml"
+              Creator="Frans Englich">
+         <description last-mod="2007-03-09">Source file generated XML Benchmark Project's xmlgen utility. See http://www.xml-benchmark.org/.</description>
+      </source>
+      <source ID="CPPGlobals" FileName="TestSources/CPPGlobals.xml" Creator="Frans Englich">
+         <description last-mod="2007-06-27">The declarations of a C++ file described in XML.</description>
+      </source>
+      <source ID="MainWindow" FileName="TestSources/MainWindow.ui" Creator="Frans Englich">
+         <description last-mod="2007-07-09">A description of an graphical user interface.</description>
+      </source>
+      <source ID="ComplexWhitespace" FileName="TestSources/ComplexWhitespace.xml"
+              Creator="Frans Englich">
+         <description last-mod="2007-07-09">A file containing different forms of whitespace.</description>
+      </source>
+      <source ID="SpaceBracket" FileName="TestSources/SpaceBracket.xml"
+              Creator="Frans Englich">
+         <description last-mod="2007-12-20">A file containing ' ]' as a text node.</description>
+      </source>
+      <source ID="HighUnicode" FileName="TestSources/HighUnicode.xml" Creator="Frans Englich">
+         <description last-mod="2007-12-20">Corner case unicode codepoints.</description>
+      </source>
+      <source ID="HighUnicode2" FileName="TestSources/HighUnicode2.xml"
+              Creator="Frans Englich">
+         <description last-mod="2007-12-21">Corner case unicode codepoints, second case.</description>
+      </source>
+      <source ID="BCIsInvalid" FileName="TestSources/BCisInvalid.xml" Creator="Frans Englich">
+         <description last-mod="2007-12-21">An element name containing 0xBC.</description>
+      </source>
+      <source ID="InvalidUmlaut" FileName="TestSources/InvalidUmlaut.xml"
+              Creator="Frans Englich">
+         <description last-mod="2007-12-27">Contains the codepoint 188 in an NCName.</description>
+      </source>
+      <source ID="NamespaceSuppliedInternally"
+              FileName="TestSources/NamespaceSuppliedInternally.xml"
+              Creator="Frans Englich">
+         <description last-mod="2007-12-27">A namespace declared with a namespace declaration, as well as in the internal subset.</description>
+      </source>
+      <source ID="XMLIdDuplicated" FileName="TestSources/XMLIdDuplicated.xml"
+              Creator="Frans Englich">
+         <description last-mod="2008-01-15">An XML file which has two xml:id attributes with the same value.</description>
+      </source>
+      <source ID="InvalidXMLId" FileName="TestSources/InvalidXMLId.xml"
+              Creator="Frans Englich">
+         <description last-mod="2008-01-15">An XML file which has an invalid xml:id attribute.</description>
+      </source>
+      <source ID="UsingXMLId" FileName="TestSources/UsingXMLId.xml" Creator="Frans Englich">
+         <description last-mod="2008-01-15">An XML file which has xml:id attributes.</description>
+      </source>
+      <source ID="Books2" FileName="TestSources/Books2.xml" Creator="Frans Englich">
+         <description last-mod="2008-01-17">An XML which is in ISO-8859-1 encoding.</description>
+      </source>
+      <source ID="QObject" FileName="TestSources/QObject.xml" Creator="Frans Englich">
+         <description last-mod="2008-02-19"/>
+      </source>
+      <source ID="Char010D" FileName="TestSources/0x010D.xml" Creator="Frans Englich">
+         <description last-mod="2008-02-28"/>
+      </source>
+      <source ID="SmallTree" FileName="TestSources/SmallTree.xml" Creator="Frans Englich">
+         <description last-mod="2008-04-03"/>
+      </source>
+      <source ID="AttributesAndElements" FileName="TestSources/AttributesAndElements.xml"
+              Creator="Frans Englich">
+         <description last-mod="2008-04-03"/>
+      </source>
+      <source ID="functx_prices" FileName="TestSources/functx_prices.xml"
+              Creator="Frans Englich">
+         <description last-mod="2008-05-16"/>
+      </source>
+      <source ID="functx_order" FileName="TestSources/functx_order.xml"
+              Creator="Frans Englich">
+         <description last-mod="2008-05-16"/>
+      </source>
+      <source ID="functx_cats" FileName="TestSources/functx_cats.xml" Creator="Frans Englich">
+         <description last-mod="2008-05-16"/>
+      </source>
+      <source ID="functx_catalog" FileName="TestSources/functx_catalog.xml"
+              Creator="Frans Englich">
+         <description last-mod="2008-05-16"/>
+      </source>
+      <source ID="functx_book" FileName="TestSources/functx_book.xml" Creator="Frans Englich">
+         <description last-mod="2008-06-25"/>
+      </source>
+      <source ID="badxml" FileName="TestSources/badxml.xml" Creator="Frans Englich">
+         <description last-mod="2008-05-19"/>
+      </source>
+      <source ID="builtinEntities" FileName="TestSources/builtinEntities.xml"
+              Creator="Frans Englich">
+         <description last-mod="2008-05-26"/>
+      </source>
+      <source ID="XMLIdWhitespace" FileName="TestSources/XMLIdWhitespace.xml"
+              Creator="Frans Englich">
+         <description last-mod="2008-05-27"/>
+      </source>
+      <source ID="XMLIDMany" FileName="TestSources/XMLIDMany.xml" Creator="Frans Englich">
+         <description last-mod="2008-10-24"/>
+      </source>
+      <source ID="OneTopElement" FileName="TestSources/OneTopElement.xml" Creator="Nicolae Brinza">
+         <description last-mod="2009-04-01"/>
+      </source>
+      <source ID="namespace-sensitive" FileName="TestSources/namespace-sensitive.xml" schema="namespace-sensitive-schema" Creator="Oliver Hallam">
+        <description last-mod="2007-02-26">Document containing namespace-sensitive constructs.</description>
+      </source>
+      <source ID="dm-e005" FileName="TestSources/dm-e005.xml" schema="dm-e005-schema" Creator="Norm Walsh">
+        <description last-mod="2010-03-10">Document to test erratum DM.E05.</description>
+      </source>
+		  <source ID="extendedTypes" FileName="TestSources/extendedTypes.xml" schema="extendedTypes-schema" Creator="Oliver Hallam">
+			  <description last-mod="2010-03-17">Document containing elements with various restricted and extended types.</description>
+		  </source>
+		 	<source ID="mixed" FileName="TestSources/mixed.xml" schema="mixedcontent" Creator="Oliver Hallam">
+		 	 <description last-mod="2010-03-17">Document containing an element with mixed content but statically could have element only content.</description>
+	    </source>
+      <schema ID="XQTSCatalogxsd" uri="http://www.w3.org/2005/02/query-test-XQTSCatalog"
+              FileName="XQTSCatalog.xsd">
+         <description last-mod="2005-04-14">Schema for XQTSCatalog</description>
+      </schema>
+      <schema ID="atomicxsd" uri="http://www.w3.org/XQueryTest"
+              FileName="TestSources/atomic.xsd">
+         <description last-mod="2005-03-08">A Schema for atomic.xml</description>
+      </schema>
+      <schema ID="orderDataxsd" uri="http://www.w3.org/XQueryTestOrderBy"
+              FileName="TestSources/orderData.xsd">
+         <description last-mod="2005-06-01">A Schema for orderData.xml</description>
+      </schema>
+      <schema ID="SpecialTypesXSD" uri="http://www.example.com/typedecl"
+              FileName="TestSources/SpecialTypes.xsd">
+         <description last-mod="2005-06-01">A Schema containing certain special types e.g. interleave types, union types, anySimpleType</description>
+      </schema>
+      <schema ID="QNameSourceXSD" uri="http://www.example.com/QNameXSD"
+              FileName="TestSources/QName-schema.xsd">
+         <description last-mod="2005-09-28">A schema containing QName and QName derived types</description>
+      </schema>
+      <schema ID="notationschema" uri="http://www.example.com/notation"
+              FileName="TestSources/notationschema.xsd">
+         <description last-mod="2005-10-10">A Schema for NOTATION data</description>
+      </schema>
+      <schema ID="idxsd" uri="http://www.w3.org/XQueryTest/ididrefs"
+              FileName="TestSources/id.xsd">
+         <description last-mod="2009-03-06">A schema for the id/idref functions tests</description>
+      </schema>
+      <schema ID="simplexsd" uri="http://www.w3.org/XQueryTest/simple"
+              FileName="TestSources/simple.xsd">
+         <description last-mod="2005-12-07">A schema for simple context tests</description>
+      </schema>
+      <schema ID="examplesxsd" uri="http://www.w3.org/XQueryTest/someExamples"
+              FileName="TestSources/examples.xsd">
+         <description last-mod="2006-05-19">A schema for examples.xml.</description>
+      </schema>
+      <schema ID="userdefined" uri="http://www.w3.org/XQueryTest/userDefinedTypes"
+              FileName="TestSources/userdefined.xsd">
+         <description last-mod="2006-04-03">A schema user defined types and constructor tests</description>
+      </schema>
+      <schema ID="listunion" uri="http://www.w3.org/XQueryTest/ListUnionTypes"
+              FileName="TestSources/listunion.xsd">
+         <description last-mod="2006-06-07">A schema defining a list of unions.</description>
+      </schema>
+      <schema ID="examples2xsd" uri="http://www.w3.org/XQueryTest/someExamples2"
+              FileName="TestSources/examples2.xsd">
+         <description last-mod="2009-10-01">Test schema for Errata XQ.E6.</description>
+      </schema>
+      <schema ID="attribute" uri="http://www.w3.org/XQueryTest/sample"
+         FileName="TestSources/attribute.xsd">
+         <description last-mod="2009-04-01">Test schema that contains an attribute declaration.</description>
+      </schema>
+      <schema ID="mixedcontent" uri="http://www.w3.org/XQueryTest/mixedcontent"
+         FileName="TestSources/mixedcontent.xsd">
+         <description last-mod="2009-04-01">Test schema that contains two complex types, one of them with a mixed content.</description>
+      </schema>
+      <schema ID="simpleContent" uri="http://www.w3.org/query-test/complexSimple"
+              FileName="TestSources/simpleContent.xsd">
+         <description last-mod="2009-11-20">Schema for complex types with
+         simple content</description>
+      </schema>
+      <schema ID="namespace-sensitive-schema" uri="http://www.example.com/test/namespace-sensitive" FileName="TestSources/namespace-sensitive.xsd">
+         <description last-mod="2007-02-26">Schema illustrating various namespace-sensitive constructs.</description>
+      </schema>
+      <schema ID="dm-e005-schema" uri="http://www.example.com/ns/test" FileName="TestSources/dm-e005.xsd">
+         <description last-mod="2010-03-10">Schema to test erratum DM.E05.</description>
+      </schema>
+      <schema ID="xq-e18-schema" uri="http://www.example.com/ns/test/xq-e18" FileName="TestSources/xq-e18.xsd">
+         <description last-mod="2010-03-11">Schema to test erratum XQ.E18.</description>
+      </schema>
+			<schema ID="extendedTypes-schema" uri="http://www.example.com/XQueryTest/extendedTypes" FileName="TestSources/extendedTypes.xsd">
+				<description last-mod="2010-03-17">Schema containing extended and restricted types.</description>
+			</schema>
+			<schema ID="constraints" uri="http://www.w3.org/constraints" FileName="TestSources/constraints.xsd">
+				<description last-mod="2010-06-10">Schema with unique/id/idref constraints.</description>
+			</schema>
+      <collection ID="collection1" Creator="Andrew Eisenberg">
+         <description last-mod="2006-06-07">A simple collection of documents.</description>
+         <input-document>bib</input-document>
+         <input-document>reviews</input-document>
+      </collection>
+      <collection ID="collection2" Creator="Andrew Eisenberg">
+         <description last-mod="2006-06-07">A simple collection of documents.</description>
+         <input-document>bib</input-document>
+         <input-document>reviews</input-document>
+         <input-document>books</input-document>
+      </collection>
+      <module ID="module1-lib" FileName="TestSources/module1-lib" Creator="Carmelo Montanez">
+         <description last-mod="2006-07-13">Library module for "modules-18" query</description>
+      </module>
+      <module ID="module2-lib" FileName="TestSources/module2-lib" Creator="Carmelo Montanez">
+         <description last-mod="2006-07-13">Library module for "modules-18" query</description>
+      </module>
+      <module ID="empty-lib" FileName="TestSources/empty-lib" Creator="Mary Holstege">
+         <description last-mod="2005-12-05">Library module for "modules-none" query</description>
+      </module>
+      <module ID="emptyns-lib" FileName="TestSources/emptyns-lib" Creator="Mary Holstege">
+         <description last-mod="2005-12-05">Library module with empty namespace</description>
+      </module>
+      <module ID="test1-lib" FileName="TestSources/test1-lib" Creator="Mary Holstege">
+         <description last-mod="2005-12-05">Simple library module</description>
+      </module>
+      <module ID="test2-lib" FileName="TestSources/test2-lib" Creator="Carmelo Montanez">
+         <description last-mod="2006-01-19">Library module with namespace URI set to empty string.</description>
+      </module>
+      <module ID="test1a-lib" FileName="TestSources/test1a-lib" Creator="Mary Holstege">
+         <description last-mod="2005-12-05">Simple library module</description>
+      </module>
+      <module ID="test1collide1-lib" FileName="TestSources/test1collide1-lib"
+              Creator="Mary Holstege">
+         <description last-mod="2005-12-05">Library module with colliding definitions</description>
+      </module>
+      <module ID="test1collide2-lib" FileName="TestSources/test1collide2-lib"
+              Creator="Mary Holstege">
+         <description last-mod="2005-12-05">Library module with colliding definitions</description>
+      </module>
+      <module ID="test1c1-lib" FileName="TestSources/test1c1-lib" Creator="Mary Holstege">
+         <description last-mod="2005-12-05">Library module with circular includes</description>
+      </module>
+      <module ID="test2c1-lib" FileName="TestSources/test2c1-lib" Creator="Mary Holstege">
+         <description last-mod="2005-12-05">Library module with circular includes</description>
+      </module>
+      <module ID="context-lib" FileName="TestSources/context-lib" Creator="Mary Holstege">
+         <description last-mod="2005-12-05">Library module with interesting context</description>
+      </module>
+      <module ID="module-defs" FileName="TestSources/moduleDefs-lib"
+              Creator="Carmelo Montanez">
+         <description last-mod="2006-01-06">Library module with definitions for various NIST tests.</description>
+      </module>
+      <module ID="modulewrongprefix-lib" FileName="TestSources/moduleDefs-lib"
+              Creator="Carmelo Montanez">
+         <description last-mod="2006-03-21">Library module with invalid namespace prefix ("xml")</description>
+      </module>
+      <module ID="modulesdiffns" FileName="TestSources/modulesdiffns-lib"
+              Creator="Carmelo Montanez">
+         <description last-mod="2006-04-11">Library module with variable on different namespace than target.</description>
+      </module>
+      <module ID="errata6-module1" FileName="TestSources/errata6-module1" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+      </module>
+      <module ID="errata6-module2" FileName="TestSources/errata6-module2" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+      </module>
+      <module ID="errata6-module4" FileName="TestSources/errata6-module4" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+      </module>
+      <module ID="errata6-module5" FileName="TestSources/errata6-module5" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+      </module>
+      <module ID="errata6-module6" FileName="TestSources/errata6-module6" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+      </module>
+      <module ID="errata6-module7" FileName="TestSources/errata6-module7" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports a schema and uses types from it.</description>
+      </module>
+      <module ID="errata8-module1a" FileName="TestSources/errata8-module1a" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports another module and uses a variable from it, testing circular dependencies.</description>
+      </module>
+      <module ID="errata8-module1b" FileName="TestSources/errata8-module1b" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports another module and uses a function from it, testing circular dependencies.</description>
+      </module>
+      <module ID="errata8-module2a" FileName="TestSources/errata8-module2a" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports another module and uses a variable from it, testing circular dependencies.</description>
+      </module>
+      <module ID="errata8-module2b" FileName="TestSources/errata8-module2b" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports another module and uses a function from it, testing circular dependencies.</description>
+      </module>
+      <module ID="errata8-module3a" FileName="TestSources/errata8-module3a" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports another module and uses a variable from it, testing circular dependencies pass case.</description>
+      </module>
+      <module ID="errata8-module3b" FileName="TestSources/errata8-module3b" Creator="John Snelson">
+         <description last-mod="2009-10-01">Module that imports another module and uses a function from it, testing circular dependencies pass case.</description>
+      </module>
+      <module ID="module3-lib" FileName="TestSources/module3-lib" Creator="Nicolae Brinza">
+         <description last-mod="2009-04-01">Module with simple and schema-element() types, used for functions'parameters and return results.</description>
+      </module>
+      <module ID="module4-lib" FileName="TestSources/module4-lib" Creator="Nicolae Brinza">
+         <description last-mod="2009-04-01">Module with schema-attribute() types, used for functions' parameters and return results.</description>
+      </module>
+      <module ID="modules-recursive1" FileName="TestSources/modules-recursive1" Creator="Nicolae Brinza">
+         <description last-mod="2009-04-01">Module with cyclic recursive imports.</description>
+      </module>
+      <module ID="modules-recursive2" FileName="TestSources/modules-recursive2" Creator="Nicolae Brinza">
+         <description last-mod="2009-04-01">Module with cyclic recursive imports.</description>
+      </module>
+      <module ID="module-pub-priv" FileName="TestSources/module-pub-priv" Creator="Michael Kay">
+         <description last-mod="2009-10-01">Module that contains both private and public function declarations (XQuery 1.1).</description>
+      </module>
+   </sources>
+   <implementation-defined-items>
+      <implementation-defined-item name="expressionUnicode" spec="XQuery">
+         <description last-mod="2005-04-04">The version of Unicode that is used to construct expressions.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="collations" spec="XQuery">
+         <description last-mod="2005-04-04">The statically-known collations.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="implicitTimezone" spec="XQuery">
+         <description last-mod="2005-04-04">The implicit timezone.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="warningsMethod" spec="XQuery">
+         <description last-mod="2005-04-04">The circumstances in which warnings are raised, and the ways in which warnings are handled.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="errorsMethod" spec="XQuery">
+         <description last-mod="2005-04-04">The method by which errors are reported to the external processing environment.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="XMLVersion" spec="XQuery">
+         <description last-mod="2005-10-10">Whether the implementation is based on the rules of [XML 1.0] and [XML Names] or the rules of [XML 1.1] and [XML Names 1.1]. One of these sets of rules must be applied consistently by all aspects of the implementation.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="overwrittenContextComponents" spec="XQuery">
+         <description last-mod="2005-04-04">Any components of the static context or dynamic context that are overwritten or augmented by the implementation.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="axes" spec="XQuery">
+         <description last-mod="2005-04-04">Which of the optional axes are supported by the implementation, if the Full-Axis Feature is not supported.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="defaultOrderEmpty" spec="XQuery">
+         <description last-mod="2005-04-04">The default handling of empty sequences returned by an ordering key (sortspec) in an order by clause (empty least or empty greatest).</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="pragmas" spec="XQuery">
+         <description last-mod="2005-04-04">The names and semantics of any extension expressions (pragmas) recognized by the implementation.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="optionDeclarations" spec="XQuery">
+         <description last-mod="2005-04-04">The names and semantics of any option declarations recognized by the implementation.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="externalFunctionProtocols" spec="XQuery">
+         <description last-mod="2005-04-04">Protocols (if any) by which parameters can be passed to an external function, and the result of the function can returned to the invoking query.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="moduleLocationHints" spec="XQuery">
+         <description last-mod="2005-11-01">The process by which the specific modules to be imported by a module import are identified, if the Module Feature is supported (includes processing of location hints, if any.)</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="staticTypingExtensions" spec="XQuery">
+         <description last-mod="2005-04-04">Any static typing extensions supported by the implementation, if the Static Typing Feature is supported.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="serializationInvocation" spec="XQuery">
+         <description last-mod="2005-04-04">The means by which serialization is invoked, if the Serialization Feature is supported.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="serializationDefaults" spec="XQuery">
+         <description last-mod="2005-10-10">The default values for the byte-order-mark, encoding, media-type, normalization-form, omit-xml-declaration, standalone, and version parameters, if the Serialization Feature is supported.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="externalFunctionCall" spec="XQuery">
+         <description last-mod="2006-08-09">The result of an unsuccessful call to an external function (for example, if the function implementation cannot be found or does not return a value of the declared type).</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="limits" spec="XQuery">
+         <description last-mod="2005-11-01">Limits on ranges of values for various data types, as enumerated in 5.3 Data Model Conformance.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="traceDestination" spec="FuncOps">
+         <description last-mod="2005-10-10">The destination of the trace output is implementation-defined. See 4 The Trace Function.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="integerOperations" spec="FuncOps">
+         <description last-mod="2005-10-10">For xs:integer operations, implementations that support limited-precision integer operations must either raise an error [err:FOAR0002] or provide an implementation-defined mechanism that allows users to choose between raising an error and returning a result that is modulo the largest representable integer value. See 6.2 Operators on Numeric Values.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="decimalDigits" spec="FuncOps">
+         <description last-mod="2005-11-01">For xs:decimal values the number of digits of precision returned by the numeric operators is implementation-defined. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="roundOrTruncate" spec="FuncOps">
+         <description last-mod="2005-10-10">If the number of digits in the result exceeds the number of digits that the implementation supports, the result is truncated or rounded in an implementation-defined manner. See 6.2 Operators on Numeric Values. See also 17.1.3.3 Casting to xs:decimal and 17.1.3.4 Casting to xs:integer.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="Unicode" spec="FuncOps">
+         <description last-mod="2005-11-01">It is implementation-defined which version of Unicode is supported by the features defined in this specification, but it is recommended that the most recent version of Unicode be used. See 7.1 String Types.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="normalizationForms" spec="FuncOps">
+         <description last-mod="2005-10-10">For 7.4.6 fn:normalize-unicode, conforming implementations must support normalization form "NFC" and may support normalization forms "NFD", "NFKC", "NFKD", "FULLY-NORMALIZED". They may also support other normalization forms with implementation-defined semantics.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="collationUnits" spec="FuncOps">
+         <description last-mod="2005-10-10">The ability to decompose strings into collation units suitable for substring matching is an implementation-defined property of a collation. See 7.5 Functions Based on Substring Matching.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="secondsDigits" spec="FuncOps">
+         <description last-mod="2005-10-10">All minimally conforming processors must support year values with a minimum of 4 digits (i.e., YYYY) and a minimum fractional second precision of 1 millisecond or three digits (i.e., s.sss). However, conforming processors may set larger implementation-defined limits on the maximum number of digits they support in these two situations. See 10.1.1 Limits and Precision.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="stringToDecimal" spec="FuncOps">
+         <description last-mod="2006-08-09">The result of casting a string to xs:decimal, when the resulting value is not too large or too small but nevertheless has too many decimal digits to be accurately represented, is implementation-defined. See 17.1.1 Casting from xs:string and xs:untypedAtomic.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="docProcessing" spec="FuncOps">
+         <description last-mod="2005-10-10">Various aspects of the processing provided by 15.5.4 fn:doc are implementation-defined. Implementations may provide external configuration options that allow any aspect of the processing to be controlled by the user.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="weakenStable" spec="FuncOps">
+         <description last-mod="2006-08-09">The manner in which implementations provide options to weaken the stable characteristic of 15.5.6 fn:collection and 15.5.4 fn:doc are implementation-defined.</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="additionalTypes" spec="DataModel">
+         <description last-mod="2005-04-04">Support for additional user-defined or implementation-defined types is implementation-defined. (See 2.6.1 Representation of Types)</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="undefinedProperties" spec="DataModel">
+         <description last-mod="2005-04-04">Some typed values in the data model are undefined. Attempting to access an undefined property is always an error. Behavior in these cases is implementation-defined and the host language is responsible for determining the result. (See 5 Accessors)</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="sequenceNormalization" spec="Serialization">
+         <description last-mod="2005-04-04">For any implementation-defined output method, it is implementation-defined whether sequence normalization process takes place. (See 2 Sequence Normalization)</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="outputMethods" spec="Serialization">
+         <description last-mod="2005-04-04">If the namespace URI is non-null for the method serialization parameter, then the parameter specifies an implementation-defined output method. (See 3 Serialization Parameters)</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="normalizationFormBehavior" spec="Serialization">
+         <description last-mod="2005-04-04">If the value of the normalization-form form parameter is not NFC, NFD, NFKC, NFKD, fully-normalized, or none then the meaning of the value and it's effect is implementation-defined. (See 4 Phases of Serialization)</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="additionalParams" spec="Serialization">
+         <description last-mod="2005-11-01">The effect of additional serialization parameters on the output of the serializer, where the name of such a parameter must be namespace-qualified, is implementation-defined or implementation-dependent. The extent of this effect on the output must not override the provisions of this specification. (See 3 Serialization Parameters)</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="encodingPhase" spec="Serialization">
+         <description last-mod="2005-04-04">The effect of providing an option that allows the encoding phase to be skipped, so that the result of serialization is a stream of Unicode characters, is implementation-defined. The serializer is not required to support such an option. (See 4 Phases of Serialization)</description>
+      </implementation-defined-item>
+      <implementation-defined-item name="CDATASerialization" spec="Serialization">
+         <description last-mod="2005-04-04">An serializer may provide an implementation-defined mechanism to place CDATA sections in the result tree. (See 5.1.4 XML Output Method: the cdata-section-elements Parameter)</description>
+      </implementation-defined-item>
+   </implementation-defined-items>
+   <features>
+      <feature name="Minimal Conformance"/>
+      <feature name="Schema Import"/>
+      <feature name="Schema Validation"/>
+      <feature name="Static Typing"/>
+      <feature name="Static Typing Extensions"/>
+      <feature name="Full Axis"/>
+      <feature name="Module"/>
+      <feature name="Serialization"/>
+   </features>
+   <context-properties>
+      <context-property name="Statically known namespaces" context-type="static"/>
+      <context-property name="Default element/type namespace" context-type="static"/>
+      <context-property name="Default function namespace" context-type="static"/>
+      <context-property name="In-scope schema types" context-type="static"/>
+      <context-property name="In-scope element declarations" context-type="static"/>
+      <context-property name="In-scope attribute declarations" context-type="static"/>
+      <context-property name="In-scope variables" context-type="static"/>
+      <context-property name="Context item static type" context-type="static"/>
+      <context-property name="Function signatures" context-type="static"/>
+      <context-property name="Statically known collations" context-type="static"/>
+      <context-property name="Default collation" context-type="static"/>
+      <context-property name="Construction mode" context-type="static"/>
+      <context-property name="Ordering mode" context-type="static"/>
+      <context-property name="Default order for empty sequences" context-type="static"/>
+      <context-property name="Boundary-space policy" context-type="static"/>
+      <context-property name="Copy-namespaces mode" context-type="static"/>
+      <context-property name="Base URI" context-type="static"/>
+      <context-property name="Statically known documents" context-type="static"/>
+      <context-property name="Statically known collections" context-type="static"/>
+      <context-property name="Statically known default collection type" context-type="static"/>
+      <context-property name="Context item" context-type="dynamic"/>
+      <context-property name="Context position" context-type="dynamic"/>
+      <context-property name="Context size" context-type="dynamic"/>
+      <context-property name="Variable values" context-type="dynamic"/>
+      <context-property name="Function implementations" context-type="dynamic"/>
+      <context-property name="Current dateTime" context-type="dynamic"/>
+      <context-property name="Implicit timezone" context-type="dynamic"/>
+      <context-property name="Available documents" context-type="dynamic"/>
+      <context-property name="Available collections" context-type="dynamic"/>
+      <context-property name="Default collection" context-type="dynamic"/>
+   </context-properties>
+   <test-group name="GhcndPartitionQueries" featureOwner="Preston Carman">
+      <GroupInfo>
+         <title>GHCND Partition Queries</title>
+         <description/>
+      </GroupInfo>
+      <test-group name="ParallelExecutionTests" featureOwner="Preston Carman">
+         <GroupInfo>
+            <title>Parallel Execution Tests</title>
+            <description/>
+         </GroupInfo>
+         &GhcndPartition1Queries;
+         &GhcndPartition2Queries;
+         &GhcndPartition4Queries;
+      </test-group>
+   </test-group>
+</test-suite>


[24/50] [abbrv] git commit: Made better variable names and fixed local partition scheme.

Posted by pr...@apache.org.
Made better variable names and fixed local partition scheme.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/a74fd60e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/a74fd60e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/a74fd60e

Branch: refs/heads/prestonc/hash_join
Commit: a74fd60e1d9e81e30613d20dfb2ecb7ee3b4362d
Parents: 7566f5e
Author: Preston Carman <pr...@apache.org>
Authored: Tue Mar 18 15:58:44 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../scripts/weather_benchmark.py                | 58 +++++++++++---------
 1 file changed, 32 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/a74fd60e/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index fdd08ec..2077c10 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -63,16 +63,16 @@ class WeatherBenchmark:
     def print_local_partition_schemes(self, test, xml_save_path):
         node_index = 0
         virtual_partitions = get_local_virtual_partitions(self.partitions)
-        for i in self.partitions:
-            scheme = self.get_local_partition_scheme(test, xml_save_path, i)
-            self.print_partition_schemes(virtual_partitions, scheme, test, i, node_index)
+        for p in self.partitions:
+            scheme = self.get_local_partition_scheme(test, xml_save_path, p)
+            self.print_partition_schemes(virtual_partitions, scheme, test, p, node_index)
         
     def print_cluster_partition_schemes(self, test, xml_save_path):
         node_index = self.get_current_node_index()
         virtual_partitions = get_cluster_virtual_partitions(self.nodes, self.partitions)
-        for i in self.partitions:
-            scheme = self.get_cluster_partition_scheme(test, xml_save_path, i)
-            self.print_partition_schemes(virtual_partitions, scheme, test, i, node_index)
+        for p in self.partitions:
+            scheme = self.get_cluster_partition_scheme(test, xml_save_path, p)
+            self.print_partition_schemes(virtual_partitions, scheme, test, p, node_index)
         
     def print_partition_schemes(self, virtual_partitions, scheme, test, partitions, node_id):
         print
@@ -98,18 +98,23 @@ class WeatherBenchmark:
         scheme = []
         virtual_partitions = get_local_virtual_partitions(self.partitions)
         data_schemes = get_partition_scheme(0, virtual_partitions, self.base_paths)
-        
         link_base_schemes = get_partition_scheme(0, partition, self.base_paths, "data_links/" + test)
+
         # Match link paths to real data paths.
-        offset = 0
         group_size = len(data_schemes) / len(link_base_schemes)
-        for link_node, link_disk, link_virtual, link_index, link_path in link_base_schemes:
-            for data_node, data_disk, data_virtual, data_index, data_path in data_schemes:
-                if test == "local_speed_up" and offset <= data_index and data_index < offset + group_size:
-                    scheme.append([data_index, link_index, data_path, link_path])
-                elif test == "local_batch_scale_out" and data_index == link_index:
-                    scheme.append([data_index, link_index, data_path, link_path])
-            offset += group_size
+        for d in range(len(self.base_paths)):
+            offset = 0
+            for link_node, link_disk, link_virtual, link_index, link_path in link_base_schemes:
+                if d == link_disk:
+                    # Only consider a single disk at a time.
+                    for data_node, data_disk, data_virtual, data_index, data_path in data_schemes:
+                        if test == "local_speed_up" and data_disk == link_disk \
+                                and offset <= data_index and data_index < offset + group_size:
+                            scheme.append([data_disk, data_index, link_index, data_path, link_path])
+                        elif test == "local_batch_scale_out" and data_disk == link_disk \
+                                and data_index == link_index:
+                            scheme.append([data_disk, data_index, link_index, data_path, link_path])
+                    offset += group_size
         return scheme
     
     def get_cluster_partition_scheme(self, test, xml_save_path, partition):
@@ -142,7 +147,8 @@ class WeatherBenchmark:
                 has_data = False
             # Make links
             for date_node, data_disk, data_virtual, data_index, data_path in data_schemes:
-                if has_data and data_disk == link_disk and node_offset <= data_index and data_index < node_offset + group_size:
+                if has_data and data_disk == link_disk \
+                        and node_offset <= data_index and data_index < node_offset + group_size:
                     scheme.append([link_disk, data_index, link_index, data_path, link_path])
             scheme.append([link_disk, -1, link_index, "", link_path])
         return scheme
@@ -166,7 +172,7 @@ class WeatherBenchmark:
     def build_data_links_scheme(self, scheme):
         """Build all the data links based on the scheme information."""
         link_path_cleared = []
-        for (data_index, partition, data_path, link_path) in scheme:
+        for (data_disk, data_index, partition, data_path, link_path) in scheme:
             if link_path not in link_path_cleared and os.path.isdir(link_path):
                 shutil.rmtree(link_path)
                 link_path_cleared.append(link_path)
@@ -208,24 +214,24 @@ class WeatherBenchmark:
         '''Determine the data_link path for cluster query files and copy with
         new location for collection.'''
         partitions = self.dataset.get_partitions()[0]
-        for i in self.partitions:
-            for j in range(len(self.nodes)):
-                query_path = get_cluster_query_path(self.base_paths, test, i, j)
+        for n in range(len(self.nodes)):
+            for p in self.partitions:
+                query_path = get_cluster_query_path(self.base_paths, test, p, n)
                 prepare_path(query_path, reset)
             
                 # Copy query files.
-                partition_paths = get_cluster_link_paths_for_node(i, self.base_paths, "data_links/" + test)
+                partition_paths = get_partition_paths(n, p, self.base_paths, "data_links/" + test + "/" + str(n) + "nodes")
                 self.copy_and_replace_query(query_path, partition_paths)
 
     def copy_local_query_files(self, test, reset):
         '''Determine the data_link path for local query files and copy with
         new location for collection.'''
-        for i in self.partitions:
-            query_path = get_local_query_path(self.base_paths, test, i)
+        for p in self.partitions:
+            query_path = get_local_query_path(self.base_paths, test, p)
             prepare_path(query_path, reset)
     
             # Copy query files.
-            partition_paths = get_partition_paths(0, i, self.base_paths, "data_links/" + test)
+            partition_paths = get_partition_paths(0, p, self.base_paths, "data_links/" + test)
             self.copy_and_replace_query(query_path, partition_paths)
 
     def copy_and_replace_query(self, query_path, replacement_list):
@@ -259,8 +265,8 @@ class WeatherBenchmark:
 
 def get_cluster_link_scheme(nodes, partition, base_paths, key="partitions"):        
     link_paths = []
-    for i in range(0, nodes):
-        new_link_path = get_partition_scheme(i, partition, base_paths, key + "/" + str(i) + "nodes")
+    for n in range(0, nodes):
+        new_link_path = get_partition_scheme(n, partition, base_paths, key + "/" + str(n) + "nodes")
         link_paths.extend(new_link_path)
     return link_paths
 


[06/50] [abbrv] git commit: Added new InlineNestedVariablesRule.

Posted by pr...@apache.org.
Added new InlineNestedVariablesRule.

The rule modifies the Algebricks rule for InlineVariablesRule to include nested plans in the processing.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/49e185f4
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/49e185f4
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/49e185f4

Branch: refs/heads/prestonc/hash_join
Commit: 49e185f4862c2c756a6cf33f0fa5ce9ae63c38ef
Parents: 06b20cf
Author: Preston Carman <pr...@apache.org>
Authored: Tue Mar 4 15:51:59 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 .../compiler/rewriter/RewriteRuleset.java       |  3 +-
 .../rules/InlineNestedVariablesRule.java        | 97 ++++++++++++++++++++
 2 files changed, 99 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/49e185f4/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
index 70a2b8e..16c44b8 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/RewriteRuleset.java
@@ -20,6 +20,7 @@ import java.util.LinkedList;
 import java.util.List;
 
 import org.apache.vxquery.compiler.rewriter.rules.ConsolidateAssignAggregateRule;
+import org.apache.vxquery.compiler.rewriter.rules.InlineNestedVariablesRule;
 import org.apache.vxquery.compiler.rewriter.rules.PushChildIntoDataScanRule;
 import org.apache.vxquery.compiler.rewriter.rules.ConsolidateUnnestsRule;
 import org.apache.vxquery.compiler.rewriter.rules.ConvertAssignToAggregateRule;
@@ -153,7 +154,7 @@ public class RewriteRuleset {
         xquery.add(new SimpleUnnestToProductRule());
         xquery.add(new PushMapOperatorDownThroughProductRule());
         xquery.add(new PushSubplanWithAggregateDownThroughProductRule());
-        xquery.add(new InlineVariablesRule());
+        xquery.add(new InlineNestedVariablesRule());
         xquery.add(new PushSelectDownRule());
         xquery.add(new PushSelectIntoJoinRule());
         // Clean up

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/49e185f4/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/InlineNestedVariablesRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/InlineNestedVariablesRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/InlineNestedVariablesRule.java
new file mode 100644
index 0000000..8cd86f8
--- /dev/null
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/InlineNestedVariablesRule.java
@@ -0,0 +1,97 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package org.apache.vxquery.compiler.rewriter.rules;
+
+import java.util.List;
+
+import org.apache.commons.lang3.mutable.Mutable;
+
+import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalOperator;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.ILogicalPlan;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.IOptimizationContext;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalExpressionTag;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalOperatorTag;
+import edu.uci.ics.hyracks.algebricks.core.algebra.base.LogicalVariable;
+import edu.uci.ics.hyracks.algebricks.core.algebra.expressions.AbstractFunctionCallExpression;
+import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractLogicalOperator;
+import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AbstractOperatorWithNestedPlans;
+import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.AssignOperator;
+import edu.uci.ics.hyracks.algebricks.rewriter.rules.InlineVariablesRule;
+
+/**
+ * Modifies the InlineVariablesRule to also process nested plans.
+ */
+public class InlineNestedVariablesRule extends InlineVariablesRule {
+
+    protected boolean inlineVariables(Mutable<ILogicalOperator> opRef, IOptimizationContext context)
+            throws AlgebricksException {
+        AbstractLogicalOperator op = (AbstractLogicalOperator) opRef.getValue();
+
+        // Update mapping from variables to expressions during top-down traversal.
+        if (op.getOperatorTag() == LogicalOperatorTag.ASSIGN) {
+            AssignOperator assignOp = (AssignOperator) op;
+            List<LogicalVariable> vars = assignOp.getVariables();
+            List<Mutable<ILogicalExpression>> exprs = assignOp.getExpressions();
+            for (int i = 0; i < vars.size(); i++) {
+                ILogicalExpression expr = exprs.get(i).getValue();
+                // Ignore functions that are either in the doNotInline set or are non-functional               
+                if (expr.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
+                    AbstractFunctionCallExpression funcExpr = (AbstractFunctionCallExpression) expr;
+                    if (doNotInlineFuncs.contains(funcExpr.getFunctionIdentifier()) || !funcExpr.isFunctional()) {
+                        continue;
+                    }
+                }
+                varAssignRhs.put(vars.get(i), exprs.get(i).getValue());
+            }
+        }
+
+        boolean modified = false;
+        // Descend into nested plans removing projects on the way.
+        if (op.hasNestedPlans()) {
+            AbstractOperatorWithNestedPlans nestedOp = (AbstractOperatorWithNestedPlans) op;
+            for (ILogicalPlan nestedPlan : nestedOp.getNestedPlans()) {
+                for (Mutable<ILogicalOperator> nestedOpRef : nestedPlan.getRoots()) {
+                    if (inlineVariables(nestedOpRef, context)) {
+                        modified = true;
+                    }
+                }
+            }
+        }
+
+        // Descend into children removing projects on the way.
+        for (Mutable<ILogicalOperator> inputOpRef : op.getInputs()) {
+            if (inlineVariables(inputOpRef, context)) {
+                modified = true;
+            }
+        }
+
+        if (performBottomUpAction(op)) {
+            modified = true;
+        }
+
+        if (modified) {
+            context.computeAndSetTypeEnvironmentForOperator(op);
+            context.addToDontApplySet(this, op);
+            // Re-enable rules that we may have already tried. They could be applicable now after inlining.
+            context.removeFromAlreadyCompared(opRef.getValue());
+        }
+
+        return modified;
+    }
+}


[27/50] [abbrv] git commit: Change the hash function to be generic and consistent for both family and factory.

Posted by pr...@apache.org.
Change the hash function to be generic and consistent for both family and factory.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/f44744f7
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/f44744f7
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/f44744f7

Branch: refs/heads/prestonc/hash_join
Commit: f44744f76b7a961d5ea9c34acf2a7b7030cdd6e3
Parents: 59e536a
Author: Preston Carman <pr...@apache.org>
Authored: Thu Mar 20 16:29:21 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../hashfunction/VXQueryRawBinaryHashFunctionFactory.java        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f44744f7/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java
index e9b1529..3f9a5ad 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/factory/hashfunction/VXQueryRawBinaryHashFunctionFactory.java
@@ -18,7 +18,7 @@ package org.apache.vxquery.runtime.factory.hashfunction;
 
 import edu.uci.ics.hyracks.api.dataflow.value.IBinaryHashFunction;
 import edu.uci.ics.hyracks.api.dataflow.value.IBinaryHashFunctionFactory;
-import edu.uci.ics.hyracks.data.std.accessors.UTF8StringBinaryHashFunctionFamily;
+import edu.uci.ics.hyracks.data.std.accessors.MurmurHash3BinaryHashFunctionFamily;
 
 public class VXQueryRawBinaryHashFunctionFactory implements IBinaryHashFunctionFactory {
     private static final long serialVersionUID = 1L;
@@ -32,7 +32,7 @@ public class VXQueryRawBinaryHashFunctionFactory implements IBinaryHashFunctionF
     @Override
     public IBinaryHashFunction createBinaryHashFunction() {
 
-        return UTF8StringBinaryHashFunctionFamily.INSTANCE.createBinaryHashFunction(1);
+        return MurmurHash3BinaryHashFunctionFamily.INSTANCE.createBinaryHashFunction(1);
 
     }
 


[15/50] [abbrv] git commit: Added some support queries to help understand the join condition.

Posted by pr...@apache.org.
Added some support queries to help understand the join condition.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/65c05e03
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/65c05e03
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/65c05e03

Branch: refs/heads/prestonc/hash_join
Commit: 65c05e032eb3126570dda77cfec37ae176c2a18c
Parents: f8049b7
Author: Preston Carman <pr...@apache.org>
Authored: Thu Mar 13 14:30:13 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../resources/noaa-ghcn-daily/queries/q04_sensor.xq   | 10 ++++++++++
 .../resources/noaa-ghcn-daily/queries/q04_station.xq  |  8 ++++++++
 .../resources/noaa-ghcn-daily/queries/q05_sensor.xq   | 11 +++++++++++
 .../resources/noaa-ghcn-daily/queries/q05_station.xq  |  8 ++++++++
 .../src/main/resources/noaa-ghcn-daily/queries/q06.xq | 14 ++++++++++++++
 .../resources/noaa-ghcn-daily/queries/q06_sensor.xq   |  9 +++++++++
 .../resources/noaa-ghcn-daily/queries/sensor_count.xq |  7 +++++++
 .../noaa-ghcn-daily/queries/station_count.xq          |  7 +++++++
 8 files changed, 74 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c05e03/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_sensor.xq
new file mode 100644
index 0000000..7a94332
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_sensor.xq
@@ -0,0 +1,10 @@
+(: XQuery Join Query :)
+(: Count all the weather sensor readings on 1976-07-04.                       :)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)/dataCollection/data
+        
+    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
+    where $date eq xs:date("1976-07-04")
+    return $r
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c05e03/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_station.xq
new file mode 100644
index 0000000..c9effde
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04_station.xq
@@ -0,0 +1,8 @@
+(: XQuery Join Query :)
+(: Count all the weather stations for King county.                            :)
+count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)/stationCollection/station
+    where (some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and fn:contains(fn:upper-case(fn:data($x/displayName)), "KING")))
+    return $s
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c05e03/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_sensor.xq
new file mode 100644
index 0000000..5f96d1b
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_sensor.xq
@@ -0,0 +1,11 @@
+(: XQuery Join Aggregate Query :)
+(: Count all sensor readings for TMIN in 2001.                                :)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
+    where $r/dataType eq "TMIN" 
+        and fn:year-from-date($date) eq 2001
+    return $r/value
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c05e03/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_station.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_station.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_station.xq
new file mode 100644
index 0000000..c01f386
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05_station.xq
@@ -0,0 +1,8 @@
+(: XQuery Join Aggregate Query :)
+(: Count all stations in the state of Oregon.                                 :)
+count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)/stationCollection/station
+    where (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "OREGON"))
+    return $s
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c05e03/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
new file mode 100644
index 0000000..02dc9ab
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06.xq
@@ -0,0 +1,14 @@
+(: XQuery Join Aggregate Query :)
+(: Self join with all stations.                                               :)
+let $sensor_collection1 := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r1 in collection($sensor_collection1)/dataCollection/data
+
+let $sensor_collection2 := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r2 in collection($sensor_collection2)/dataCollection/data
+
+let $date1 := xs:date(fn:substring(xs:string(fn:data($r1/date)), 0, 11))
+let $date2 := xs:date(fn:substring(xs:string(fn:data($r2/date)), 0, 11))
+where $r1/station eq $r2/station
+    and fn:year-from-date($date1) gt 2000
+    and fn:year-from-date($date2) gt 2000
+return ($r1/value, $r2/value) 
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c05e03/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
new file mode 100644
index 0000000..7767b7c
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q06_sensor.xq
@@ -0,0 +1,9 @@
+(: XQuery Join Aggregate Query :)
+(: Count all sensor readings after 2000.                                      :)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)/dataCollection/data
+    let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
+    where fn:year-from-date($date) gt 2000
+    return $r
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c05e03/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/sensor_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/sensor_count.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/sensor_count.xq
new file mode 100644
index 0000000..b671d31
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/sensor_count.xq
@@ -0,0 +1,7 @@
+(: XQuery Join Query :)
+(: Count all the weather sensor readings available.                           :)
+count(
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)/dataCollection/data
+    return $r
+)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/65c05e03/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/station_count.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/station_count.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/station_count.xq
new file mode 100644
index 0000000..4f8a666
--- /dev/null
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/station_count.xq
@@ -0,0 +1,7 @@
+(: XQuery Join Query :)
+(: Count all the weather stations available.                                  :)
+count(
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)/stationCollection/station
+    return $s
+)
\ No newline at end of file


[39/50] [abbrv] Added more parallel tests to the VXQuery test suite.

Posted by pr...@apache.org.
http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q05_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q05_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q05_records.xq
new file mode 100644
index 0000000..664e91b
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q05_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Join Aggregate Query :)
+(: Find the lowest recorded temperature (TMIN) in the United States for     :)
+(: 2001.                                                                      :)
+    let $station_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $s in collection($station_collection)/stationCollection/station
+    
+    let $sensor_collection := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r in collection($sensor_collection)/dataCollection/data
+    
+    where $s/id eq $r/station
+        and (some $x in $s/locationLabels satisfies ($x/type eq "CNTRY" and $x/id eq "FIPS:US"))
+        and $r/dataType eq "TMIN" 
+        and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2001
+    return $r/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q07_records.xq
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q07_records.xq b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q07_records.xq
new file mode 100644
index 0000000..6f8c165
--- /dev/null
+++ b/vxquery-xtest/tests/Queries/XQuery/GhcndRecords/Partition-4/q07_records.xq
@@ -0,0 +1,14 @@
+(: XQuery Self Join Query :)
+(: Self join with all stations finding the difference in min and max       :)
+(: temperature and get the average.                                        :)
+    let $sensor_collection_min := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_min in collection($sensor_collection_min)/dataCollection/data
+    
+    let $sensor_collection_max := "/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/|/Users/prestoncarman/Documents/smartsvn/vxquery_git_master/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_4/"
+    for $r_max in collection($sensor_collection_max)/dataCollection/data
+    
+    where $r_min/station eq $r_max/station
+        and $r_min/date eq $r_max/date
+        and $r_min/dataType eq "TMIN"
+        and $r_max/dataType eq "TMAX"
+    return $r_max/value - $r_min/value

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
index bb0124e..cc2fd33 100644
--- a/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_1/sesnors/US000000001_200101_0.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="3"><data><date>2001-01-01T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000001</station><value>11</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2001-01-01T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000001</station><value>31</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="3"><data><date>2001-01-01T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000001</station><value>11.25</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2001-01-01T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000001</station><value>31</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2001-01-01T00:00:00.000</date><dataType>AWND</dataType><station>GHCND:US000000001</station><value>1000</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
index b4a7897..c095726 100644
--- a/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_1/quarter_2/sesnors/US000000002_200202_0.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="3"><data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="3"><data><date>2002-02-02T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:US000000002</station><value>12.5</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2002-02-02T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:US000000002</station><value>32</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2002-02-02T00:00:00.000</date><dataType>PRCP</dataType><station>GHCND:US000000002</station><value>20</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
index 6a23ab6..3a540d3 100644
--- a/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
+++ b/vxquery-xtest/tests/TestSources/ghcnd/half_2/quarter_3/sesnors/AS000000003_200303_0.xml
@@ -1 +1 @@
-<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="2"><data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file
+<?xml version="1.0" encoding="UTF-8" standalone="yes"?><dataCollection pageCount="1" totalCount="2"><data><date>2003-03-03T00:00:00.000</date><dataType>TMIN</dataType><station>GHCND:AS000000003</station><value>13.75</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data><data><date>2003-03-03T00:00:00.000</date><dataType>TMAX</dataType><station>GHCND:AS000000003</station><value>33</value><attributes><attribute></attribute><attribute></attribute><attribute>a</attribute><attribute></attribute></attributes></data></dataCollection>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/XQTSCatalog.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/XQTSCatalog.xml b/vxquery-xtest/tests/XQTSCatalog.xml
index 3b30b30..7f6554f 100644
--- a/vxquery-xtest/tests/XQTSCatalog.xml
+++ b/vxquery-xtest/tests/XQTSCatalog.xml
@@ -145,13 +145,21 @@
 
 <!ELEMENT title ( #PCDATA ) >
 
+<!ENTITY AggregatePartition1Queries SYSTEM "cat/AggregatePartition1Queries.xml">
+<!ENTITY AggregatePartition2Queries SYSTEM "cat/AggregatePartition2Queries.xml">
+<!ENTITY AggregatePartition4Queries SYSTEM "cat/AggregatePartition4Queries.xml">
+
 <!ENTITY GhcndPartition1Queries SYSTEM "cat/GhcndPartition1Queries.xml">
 <!ENTITY GhcndPartition2Queries SYSTEM "cat/GhcndPartition2Queries.xml">
 <!ENTITY GhcndPartition4Queries SYSTEM "cat/GhcndPartition4Queries.xml">
 
-<!ENTITY CollectionPartition1Queries SYSTEM "cat/CollectionPartition1Queries.xml">
-<!ENTITY CollectionPartition2Queries SYSTEM "cat/CollectionPartition2Queries.xml">
-<!ENTITY CollectionPartition4Queries SYSTEM "cat/CollectionPartition4Queries.xml">
+<!ENTITY GhcndRecordsPartition1Queries SYSTEM "cat/GhcndRecordsPartition1Queries.xml">
+<!ENTITY GhcndRecordsPartition2Queries SYSTEM "cat/GhcndRecordsPartition2Queries.xml">
+<!ENTITY GhcndRecordsPartition4Queries SYSTEM "cat/GhcndRecordsPartition4Queries.xml">
+
+<!ENTITY GhcndCountPartition1Queries SYSTEM "cat/GhcndCountPartition1Queries.xml">
+<!ENTITY GhcndCountPartition2Queries SYSTEM "cat/GhcndCountPartition2Queries.xml">
+<!ENTITY GhcndCountPartition4Queries SYSTEM "cat/GhcndCountPartition4Queries.xml">
 
 ]>
 <test-suite xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog"
@@ -942,6 +950,21 @@
       <context-property name="Available collections" context-type="dynamic"/>
       <context-property name="Default collection" context-type="dynamic"/>
    </context-properties>
+   <test-group name="AggregatePartitionQueries" featureOwner="Preston Carman">
+      <GroupInfo>
+         <title>Aggregate Partition Queries</title>
+         <description/>
+      </GroupInfo>
+      <test-group name="AggregateParallelExecutionTests" featureOwner="Preston Carman">
+         <GroupInfo>
+            <title>Aggregate Parallel Execution Tests</title>
+            <description/>
+         </GroupInfo>
+         &AggregatePartition1Queries;
+         &AggregatePartition2Queries;
+         &AggregatePartition4Queries;
+      </test-group>
+   </test-group>
    <test-group name="GhcndPartitionQueries" featureOwner="Preston Carman">
       <GroupInfo>
          <title>GHCND Partition Queries</title>
@@ -957,19 +980,34 @@
          &GhcndPartition4Queries;
       </test-group>
    </test-group>
-   <test-group name="CollectionPartitionQueries" featureOwner="Preston Carman">
+   <test-group name="GhcndCountPartitionQueries" featureOwner="Preston Carman">
       <GroupInfo>
-         <title>Collection Partition Queries</title>
+         <title>GHCND Count Partition Queries</title>
          <description/>
       </GroupInfo>
-      <test-group name="ParallelExecutionTests" featureOwner="Preston Carman">
+      <test-group name="CountParallelExecutionTests" featureOwner="Preston Carman">
          <GroupInfo>
             <title>Parallel Execution Tests</title>
             <description/>
          </GroupInfo>
-         &CollectionPartition1Queries;
-         &CollectionPartition2Queries;
-         &CollectionPartition4Queries;
+         &GhcndCountPartition1Queries;
+         &GhcndCountPartition2Queries;
+         &GhcndCountPartition4Queries;
+      </test-group>
+   </test-group>
+   <test-group name="GhcndRecordsPartitionQueries" featureOwner="Preston Carman">
+      <GroupInfo>
+         <title>GHCND Records Partition Queries</title>
+         <description/>
+      </GroupInfo>
+      <test-group name="RecordsParallelExecutionTests" featureOwner="Preston Carman">
+         <GroupInfo>
+            <title>Records Parallel Execution Tests</title>
+            <description/>
+         </GroupInfo>
+         &GhcndRecordsPartition1Queries;
+         &GhcndRecordsPartition2Queries;
+         &GhcndRecordsPartition4Queries;
       </test-group>
    </test-group>
 </test-suite>

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/AggregatePartition1Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/AggregatePartition1Queries.xml b/vxquery-xtest/tests/cat/AggregatePartition1Queries.xml
new file mode 100644
index 0000000..b058d7d
--- /dev/null
+++ b/vxquery-xtest/tests/cat/AggregatePartition1Queries.xml
@@ -0,0 +1,36 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="AggregatePartition1Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>Aggregate Partition 1</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="aggregate-partition-1-avg" FilePath="Aggregate/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 1 partition.</description>
+      <query name="avg" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">avg.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-1-count" FilePath="Aggregate/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 1 partition.</description>
+      <query name="count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-1-min" FilePath="Aggregate/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 1 partition.</description>
+      <query name="min" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">min.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-1-max" FilePath="Aggregate/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 1 partition.</description>
+      <query name="max" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">max.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-1-sum" FilePath="Aggregate/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 1 partition.</description>
+      <query name="sum" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">sum.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/AggregatePartition2Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/AggregatePartition2Queries.xml b/vxquery-xtest/tests/cat/AggregatePartition2Queries.xml
new file mode 100644
index 0000000..a4ac807
--- /dev/null
+++ b/vxquery-xtest/tests/cat/AggregatePartition2Queries.xml
@@ -0,0 +1,36 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="AggregatePartition2Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>Aggregate Partition 2</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="aggregate-partition-2-avg" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 2 partition.</description>
+      <query name="avg" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">avg.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-2-count" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 2 partition.</description>
+      <query name="count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-2-min" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 2 partition.</description>
+      <query name="min" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">min.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-2-max" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 2 partition.</description>
+      <query name="max" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">max.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-2-sum" FilePath="Aggregate/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 2 partition.</description>
+      <query name="sum" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">sum.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/AggregatePartition4Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/AggregatePartition4Queries.xml b/vxquery-xtest/tests/cat/AggregatePartition4Queries.xml
new file mode 100644
index 0000000..d920d31
--- /dev/null
+++ b/vxquery-xtest/tests/cat/AggregatePartition4Queries.xml
@@ -0,0 +1,36 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="AggregatePartition4Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>Aggregate Partition 4</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="aggregate-partition-4-avg" FilePath="Aggregate/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 4 partition.</description>
+      <query name="avg" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">avg.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-4-count" FilePath="Aggregate/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 4 partition.</description>
+      <query name="count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-4-min" FilePath="Aggregate/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 4 partition.</description>
+      <query name="min" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">min.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-4-max" FilePath="Aggregate/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 4 partition.</description>
+      <query name="max" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">max.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="aggregate-partition-4-sum" FilePath="Aggregate/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 4 partition.</description>
+      <query name="sum" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">sum.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/CollectionPartition1Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/CollectionPartition1Queries.xml b/vxquery-xtest/tests/cat/CollectionPartition1Queries.xml
deleted file mode 100644
index 71673af..0000000
--- a/vxquery-xtest/tests/cat/CollectionPartition1Queries.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="CollectionPartition1Queries" featureOwner="VXQuery">
-   <GroupInfo>
-      <title>Collection Partition 1</title>
-      <description/>
-   </GroupInfo>
-   <test-case is-XPath2="true" name="collection-partition-1-q02" FilePath="Collection/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q02 from the weather benchmark with 1 partition.</description>
-      <query name="q02_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q02_count.txt</output-file>
-   </test-case>
-   <test-case is-XPath2="true" name="collection-partition-1-q03" FilePath="Collection/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q03 from the weather benchmark with 1 partition.</description>
-      <query name="q03_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q03_count.txt</output-file>
-   </test-case>
-   <test-case is-XPath2="true" name="collection-partition-1-q05" FilePath="Collection/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q05 from the weather benchmark with 1 partition.</description>
-      <query name="q05_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q05_count.txt</output-file>
-   </test-case>
-   <test-case is-XPath2="true" name="collection-partition-1-q07" FilePath="Collection/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q07 from the weather benchmark with 1 partition.</description>
-      <query name="q07_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q07_count.txt</output-file>
-   </test-case>
-</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/CollectionPartition2Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/CollectionPartition2Queries.xml b/vxquery-xtest/tests/cat/CollectionPartition2Queries.xml
deleted file mode 100644
index 80dd480..0000000
--- a/vxquery-xtest/tests/cat/CollectionPartition2Queries.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="CollectionPartition2Queries" featureOwner="VXQuery">
-   <GroupInfo>
-      <title>Collection Partition 2</title>
-      <description/>
-   </GroupInfo>
-   <test-case is-XPath2="true" name="collection-partition-2-q02" FilePath="Collection/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q02 from the weather benchmark with 2 partitions.</description>
-      <query name="q02_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q02_count.txt</output-file>
-   </test-case>
-   <test-case is-XPath2="true" name="collection-partition-2-q03" FilePath="Collection/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q03 from the weather benchmark with 2 partitions.</description>
-      <query name="q03_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q03_count.txt</output-file>
-   </test-case>
-   <test-case is-XPath2="true" name="collection-partition-2-q05" FilePath="Collection/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q05 from the weather benchmark with 2 partitions.</description>
-      <query name="q05_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q05_count.txt</output-file>
-   </test-case>
-   <test-case is-XPath2="true" name="collection-partition-2-q07" FilePath="Collection/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q07 from the weather benchmark with 2 partitions.</description>
-      <query name="q07_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q07_count.txt</output-file>
-   </test-case>
-</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/CollectionPartition4Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/CollectionPartition4Queries.xml b/vxquery-xtest/tests/cat/CollectionPartition4Queries.xml
deleted file mode 100644
index 8b99f0f..0000000
--- a/vxquery-xtest/tests/cat/CollectionPartition4Queries.xml
+++ /dev/null
@@ -1,30 +0,0 @@
-<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="CollectionPartition4Queries" featureOwner="VXQuery">
-   <GroupInfo>
-      <title>Collection Partition 4</title>
-      <description/>
-   </GroupInfo>
-   <test-case is-XPath2="true" name="collection-partition-4-q02" FilePath="Collection/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q02 from the weather benchmark with 4 partitions.</description>
-      <query name="q02_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q02_count.txt</output-file>
-   </test-case>
-   <test-case is-XPath2="true" name="collection-partition-4-q03" FilePath="Collection/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q03 from the weather benchmark with 4 partitions.</description>
-      <query name="q03_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q03_count.txt</output-file>
-   </test-case>
-   <test-case is-XPath2="true" name="collection-partition-4-q05" FilePath="Collection/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q05 from the weather benchmark with 4 partitions.</description>
-      <query name="q05_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q05_count.txt</output-file>
-   </test-case>
-   <test-case is-XPath2="true" name="collection-partition-4-q07" FilePath="Collection/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
-      <description>Count records returned for q07 from the weather benchmark with 4 partitions.</description>
-      <query name="q07_count" date="2014-04-01"/>
-      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
-      <output-file role="principal" compare="Text">q07_count.txt</output-file>
-   </test-case>
-</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/GhcndCountPartition1Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndCountPartition1Queries.xml b/vxquery-xtest/tests/cat/GhcndCountPartition1Queries.xml
new file mode 100644
index 0000000..515738e
--- /dev/null
+++ b/vxquery-xtest/tests/cat/GhcndCountPartition1Queries.xml
@@ -0,0 +1,30 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="GhcndCountPartition1Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>GHCND Count Partition 1</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-1-q02" FilePath="GhcndCount/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 1 partition.</description>
+      <query name="q02_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-1-q03" FilePath="GhcndCount/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 1 partition.</description>
+      <query name="q03_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-1-q05" FilePath="GhcndCount/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 1 partition.</description>
+      <query name="q05_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-1-q07" FilePath="GhcndCount/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 1 partition.</description>
+      <query name="q07_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07_count.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/GhcndCountPartition2Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndCountPartition2Queries.xml b/vxquery-xtest/tests/cat/GhcndCountPartition2Queries.xml
new file mode 100644
index 0000000..8bb590b
--- /dev/null
+++ b/vxquery-xtest/tests/cat/GhcndCountPartition2Queries.xml
@@ -0,0 +1,30 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="GhcndCountPartition2Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>GHCND Count Partition 2</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-2-q02" FilePath="GhcndCount/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 2 partitions.</description>
+      <query name="q02_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-2-q03" FilePath="GhcndCount/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 2 partitions.</description>
+      <query name="q03_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-2-q05" FilePath="GhcndCount/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 2 partitions.</description>
+      <query name="q05_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-2-q07" FilePath="GhcndCount/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 2 partitions.</description>
+      <query name="q07_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07_count.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/GhcndCountPartition4Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndCountPartition4Queries.xml b/vxquery-xtest/tests/cat/GhcndCountPartition4Queries.xml
new file mode 100644
index 0000000..ff75d3a
--- /dev/null
+++ b/vxquery-xtest/tests/cat/GhcndCountPartition4Queries.xml
@@ -0,0 +1,30 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="GhcndCountPartition4Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>GHCND Count Partition 4</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-4-q02" FilePath="GhcndCount/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 4 partitions.</description>
+      <query name="q02_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-4-q03" FilePath="GhcndCount/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 4 partitions.</description>
+      <query name="q03_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-4-q05" FilePath="GhcndCount/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 4 partitions.</description>
+      <query name="q05_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05_count.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-count-partition-4-q07" FilePath="GhcndCount/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 4 partitions.</description>
+      <query name="q07_count" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07_count.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/GhcndRecordsPartition1Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndRecordsPartition1Queries.xml b/vxquery-xtest/tests/cat/GhcndRecordsPartition1Queries.xml
new file mode 100644
index 0000000..0c22422
--- /dev/null
+++ b/vxquery-xtest/tests/cat/GhcndRecordsPartition1Queries.xml
@@ -0,0 +1,30 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="GhcndRecordsPartition1Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>GHCND Records Partition 1</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-1-q02" FilePath="GhcndRecords/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 1 partition.</description>
+      <query name="q02_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02_records.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-1-q03" FilePath="GhcndRecords/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 1 partition.</description>
+      <query name="q03_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03_records.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-1-q05" FilePath="GhcndRecords/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 1 partition.</description>
+      <query name="q05_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05_records.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-1-q07" FilePath="GhcndRecords/Partition-1/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 1 partition.</description>
+      <query name="q07_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07_records.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/GhcndRecordsPartition2Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndRecordsPartition2Queries.xml b/vxquery-xtest/tests/cat/GhcndRecordsPartition2Queries.xml
new file mode 100644
index 0000000..929ff28
--- /dev/null
+++ b/vxquery-xtest/tests/cat/GhcndRecordsPartition2Queries.xml
@@ -0,0 +1,30 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="GhcndRecordsPartition2Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>GHCND Records Partition 2</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-2-q02" FilePath="GhcndRecords/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 2 partitions.</description>
+      <query name="q02_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02_records.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-2-q03" FilePath="GhcndRecords/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 2 partitions.</description>
+      <query name="q03_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03_records.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-2-q05" FilePath="GhcndRecords/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 2 partitions.</description>
+      <query name="q05_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05_records.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-2-q07" FilePath="GhcndRecords/Partition-2/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 2 partitions.</description>
+      <query name="q07_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07_records.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7cde080b/vxquery-xtest/tests/cat/GhcndRecordsPartition4Queries.xml
----------------------------------------------------------------------
diff --git a/vxquery-xtest/tests/cat/GhcndRecordsPartition4Queries.xml b/vxquery-xtest/tests/cat/GhcndRecordsPartition4Queries.xml
new file mode 100644
index 0000000..03eea78
--- /dev/null
+++ b/vxquery-xtest/tests/cat/GhcndRecordsPartition4Queries.xml
@@ -0,0 +1,30 @@
+<test-group xmlns="http://www.w3.org/2005/02/query-test-XQTSCatalog" name="GhcndRecordsPartition4Queries" featureOwner="VXQuery">
+   <GroupInfo>
+      <title>GHCND Records Partition 4</title>
+      <description/>
+   </GroupInfo>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-4-q02" FilePath="GhcndRecords/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q02 from the weather benchmark with 4 partitions.</description>
+      <query name="q02_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q02_records.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-4-q03" FilePath="GhcndRecords/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q03 from the weather benchmark with 4 partitions.</description>
+      <query name="q03_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q03_records.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-4-q05" FilePath="GhcndRecords/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q05 from the weather benchmark with 4 partitions.</description>
+      <query name="q05_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q05_records.txt</output-file>
+   </test-case>
+   <test-case is-XPath2="true" name="ghcnd-records-partition-4-q07" FilePath="GhcndRecords/Partition-4/" scenario="runtime-error" Creator="Preston Carman">
+      <description>Count records returned for q07 from the weather benchmark with 4 partitions.</description>
+      <query name="q07_records" date="2014-04-01"/>
+      <input-file role="principal-data" variable="input-context1">emptydoc</input-file>
+      <output-file role="principal" compare="Text">q07_records.txt</output-file>
+   </test-case>
+</test-group>
\ No newline at end of file


[20/50] [abbrv] git commit: Slight changes to increase number of records in join.

Posted by pr...@apache.org.
Slight changes to increase number of records in join.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/0b1033fa
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/0b1033fa
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/0b1033fa

Branch: refs/heads/prestonc/hash_join
Commit: 0b1033fa16fd59fbba59ad1364c1eb3a43fa57a4
Parents: 3171202
Author: Preston Carman <pr...@apache.org>
Authored: Fri Mar 14 22:55:46 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../src/main/resources/noaa-ghcn-daily/queries/q07.xq        | 8 ++++----
 .../src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq | 2 +-
 .../resources/noaa-ghcn-daily/scripts/weather_benchmark.py   | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/0b1033fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
index 6ed194d..573a3a3 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07.xq
@@ -1,6 +1,6 @@
 (: XQuery Join Query :)
-(: Find the highest recorded temperature (TMAX) for each station on           :)
-(: 2000-01-01.                                                                :)
+(: Find the highest recorded temperature (TMAX) for each station for each     :)
+(: day over the year 2000.                                                    :)
 let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
 for $s in collection($station_collection)/stationCollection/station
 
@@ -9,5 +9,5 @@ for $r in collection($sensor_collection)/dataCollection/data
 
 where $s/id eq $r/station
     and $r/dataType eq "TMAX" 
-    and xs:dateTime(fn:data($r/date)) eq xs:dateTime("2000-01-01T00:00:00.000")
-return ($s/displayName, $r/value)
\ No newline at end of file
+    and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
+return ($s/displayName, $r/date, $r/value)
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/0b1033fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
index 254c879..e8eb64a 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q07_sensor.xq
@@ -5,6 +5,6 @@ count(
     for $r in collection($sensor_collection)/dataCollection/data
     
     where $r/dataType eq "TMAX" 
-        and xs:dateTime(fn:data($r/date)) eq xs:dateTime("2000-01-01T00:00:00.000")
+    	and fn:year-from-dateTime(xs:dateTime(fn:data($r/date))) eq 2000
     return $r
 )
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/0b1033fa/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index 0500de3..6374d38 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -34,8 +34,8 @@ class WeatherBenchmark:
 
     QUERY_REPLACEMENT_KEY = "/tmp/1.0_partition_ghcnd_all_xml/"
     QUERY_MASTER_FOLDER = "../queries/"
-    QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq", "q04.xq", "q05.xq", "q06.xq"] 
-    QUERY_UTILITY_LIST = ["sensor_count.xq", "station_count.xq", "q04_sensor.xq", "q04_station.xq", "q05_sensor.xq", "q05_station.xq", "q06_sensor.xq"] 
+    QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq", "q04.xq", "q05.xq", "q06.xq", "q07.xq"] 
+    QUERY_UTILITY_LIST = ["sensor_count.xq", "station_count.xq", "q04_sensor.xq", "q04_station.xq", "q05_sensor.xq", "q05_station.xq", "q06_tmin.xq", "q06_tmax.xq", "q07_sensor.xq", "q07_station.xq"] 
     BENCHMARK_LOCAL_TESTS = ["local_speed_up", "local_batch_scale_out"] 
     BENCHMARK_CLUSTER_TESTS = ["speed_up", "batch_scale_out"] 
     QUERY_COLLECTIONS = ["sensors", "stations"]


[30/50] [abbrv] git commit: Updated the method to partition the weather data.

Posted by pr...@apache.org.
Updated the method to partition the weather data.

The new method is per xml file using a round robin method.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/ef2f36ac
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/ef2f36ac
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/ef2f36ac

Branch: refs/heads/prestonc/hash_join
Commit: ef2f36ac38d5fd7951ec36aa2707a71e6ed6a6b4
Parents: f60f885
Author: Preston Carman <pr...@apache.org>
Authored: Tue Mar 25 16:39:22 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../scripts/weather_benchmark.py                |  2 +-
 .../scripts/weather_data_files.py               | 54 ++++++++++++++++++++
 2 files changed, 55 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/ef2f36ac/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index 2077c10..be95ef8 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -140,7 +140,7 @@ class WeatherBenchmark:
                 print "Unknown test."
                 return
             group_size = group_size / link_virtual
-            node_offset = group_size * (node_index * local_virtual_partitions)
+            node_offset = group_size * (node_index * partition)
             node_offset += group_size * link_index
             has_data = True
             if link_node < node_index:

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/ef2f36ac/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
index 64e19d6..a7fb691 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
@@ -105,6 +105,60 @@ class WeatherDataFiles:
             # Make sure the xml folder is available.
             prepare_path(path, reset)
 
+        import fnmatch
+        import os
+        
+        # copy stations and sensors into each partition
+        current_sensor_partition = 0
+        current_station_partition = 0
+        self.open_progress_data()
+        row_count = len(self.progress_data)
+        for row in range(0, row_count):
+            row_contents = self.progress_data[row].rsplit(self.SEPERATOR)
+            file_name = row_contents[self.INDEX_DATA_FILE_NAME]
+            station_id = os.path.basename(file_name).split('.')[0]
+               
+            # Copy sensor files
+            type = "sensors"
+            file_path = build_base_save_folder(save_path, station_id, type) + station_id
+            for root, dirnames, filenames in os.walk(file_path):
+                for filename in fnmatch.filter(filenames, '*.xml'):
+                    xml_path = os.path.join(root, filename)
+                    new_file_base = build_base_save_folder(partition_paths[current_sensor_partition], station_id, type) + station_id
+                    if not os.path.isdir(new_file_base):
+                        os.makedirs(new_file_base)
+                    shutil.copyfile(xml_path, new_file_base + "/" + filename)
+                    current_sensor_partition += 1
+                    if current_sensor_partition >= len(partition_paths):
+                        current_sensor_partition = 0
+            
+            # Copy station files
+            type = "stations"
+            file_path = build_base_save_folder(save_path, station_id, type) + station_id + ".xml"
+            new_file_base = build_base_save_folder(partition_paths[current_station_partition], station_id, type)
+            new_file_path = new_file_base + station_id + ".xml"
+            if os.path.isfile(file_path):
+                if not os.path.isdir(new_file_base):
+                    os.makedirs(new_file_base)
+                shutil.copyfile(file_path, new_file_path)
+            current_station_partition += 1
+            if current_station_partition >= len(partition_paths):
+                current_station_partition = 0
+
+    
+    def copy_to_n_partitions_by_station(self, save_path, partitions, base_paths, reset):
+        """Once the initial data has been generated, the data can be copied into a set number of partitions. """
+        if (len(base_paths) == 0):
+            return
+        
+        # Initialize the partition paths.
+        partition_sizes = []
+        partition_paths = get_partition_paths(0, partitions, base_paths)
+        for path in partition_paths:
+            partition_sizes.append(0)
+            # Make sure the xml folder is available.
+            prepare_path(path, reset)
+
         # copy stations and sensors into each partition
         current_partition = 0
         csv_sorted = self.get_csv_in_partition_order()


[37/50] [abbrv] git commit: Added comments and reverted a previous change.

Posted by pr...@apache.org.
Added comments and reverted a previous change.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/7566f5ef
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/7566f5ef
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/7566f5ef

Branch: refs/heads/prestonc/hash_join
Commit: 7566f5ef62de9ce95151ba69990ad4303f5296c1
Parents: 43b6a2c
Author: Preston Carman <pr...@apache.org>
Authored: Mon Mar 17 23:22:45 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../ConvertFromAlgebricksExpressionsRule.java   | 27 +++++++++++++++++++-
 .../ConvertToAlgebricksExpressionsRule.java     | 23 +++++++++++++++++
 .../rewriter/rules/util/ExpressionToolbox.java  | 16 +++++-------
 3 files changed, 55 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7566f5ef/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertFromAlgebricksExpressionsRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertFromAlgebricksExpressionsRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertFromAlgebricksExpressionsRule.java
index 482f05d..1bc2bd6 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertFromAlgebricksExpressionsRule.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertFromAlgebricksExpressionsRule.java
@@ -39,6 +39,29 @@ import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import edu.uci.ics.hyracks.algebricks.core.algebra.functions.IFunctionInfo;
 import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
 
+/**
+ * The rule searches for where the Algebricks builtin function are temporarly in the plan in place of XQuery function. 
+ * The combination the Algebricks builtin function are replace with boolean XQuery function and the XQuery equivalent 
+ * function.
+ * 
+ * <pre>
+ * Before
+ * 
+ *   plan__parent
+ *   %OPERATOR( $v1 : algebricks_function( \@input_expression ) )
+ *   plan__child
+ *   
+ *   Where xquery_function creates an atomic value.
+ *   
+ * After 
+ * 
+ *   plan__parent
+ *   %OPERATOR( $v1 : boolean(xquery_function( \@input_expression ) ) )
+ *   plan__child
+ * </pre>
+ * 
+ * @author prestonc
+ */
 public class ConvertFromAlgebricksExpressionsRule implements IAlgebraicRewriteRule {
     final List<Mutable<ILogicalExpression>> functionList = new ArrayList<Mutable<ILogicalExpression>>();
 
@@ -74,6 +97,7 @@ public class ConvertFromAlgebricksExpressionsRule implements IAlgebraicRewriteRu
         return modified;
     }
 
+    @SuppressWarnings("unchecked")
     private boolean processExpression(Mutable<ILogicalOperator> opRef, Mutable<ILogicalExpression> search) {
         boolean modified = false;
         for (FunctionIdentifier fid : ALGEBRICKS_MAP.keySet()) {
@@ -83,7 +107,8 @@ public class ConvertFromAlgebricksExpressionsRule implements IAlgebraicRewriteRu
                 AbstractFunctionCallExpression searchFunction = (AbstractFunctionCallExpression) searchM.getValue();
                 searchFunction.setFunctionInfo(ALGEBRICKS_MAP.get(fid));
                 // Add boolean function before vxquery expression.
-                ScalarFunctionCallExpression booleanExp = new ScalarFunctionCallExpression(BuiltinFunctions.FN_BOOLEAN_1, new MutableObject<ILogicalExpression>(searchM.getValue()));
+                ScalarFunctionCallExpression booleanExp = new ScalarFunctionCallExpression(
+                        BuiltinFunctions.FN_BOOLEAN_1, new MutableObject<ILogicalExpression>(searchM.getValue()));
                 searchM.setValue(booleanExp);
                 modified = true;
             }

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7566f5ef/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertToAlgebricksExpressionsRule.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertToAlgebricksExpressionsRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertToAlgebricksExpressionsRule.java
index ebe265e..943d630 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertToAlgebricksExpressionsRule.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/ConvertToAlgebricksExpressionsRule.java
@@ -38,6 +38,29 @@ import edu.uci.ics.hyracks.algebricks.core.algebra.functions.FunctionIdentifier;
 import edu.uci.ics.hyracks.algebricks.core.algebra.functions.IFunctionInfo;
 import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule;
 
+/**
+ * The rule searches for where the XQuery function are used in place of Algebricks builtin function. 
+ * The combination the boolean XQuery function and the XQuery equivalent function are replace with 
+ * the Algebricks builtin function  .
+ * 
+ * <pre>
+ * Before
+ * 
+ *   plan__parent
+ *   %OPERATOR( $v1 : boolean(xquery_function( \@input_expression ) ) )
+ *   plan__child
+ *   
+ *   Where xquery_function creates an atomic value.
+ *   
+ * After 
+ * 
+ *   plan__parent
+ *   %OPERATOR( $v1 : algebricks_function( \@input_expression ) )
+ *   plan__child
+ * </pre>
+ * 
+ * @author prestonc
+ */
 public class ConvertToAlgebricksExpressionsRule implements IAlgebraicRewriteRule {
     final List<Mutable<ILogicalExpression>> functionList = new ArrayList<Mutable<ILogicalExpression>>();
 

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/7566f5ef/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
index d674f76..34efdd8 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/util/ExpressionToolbox.java
@@ -18,12 +18,9 @@ package org.apache.vxquery.compiler.rewriter.rules.util;
 
 import java.util.List;
 
-import javax.xml.namespace.QName;
-
 import org.apache.commons.lang3.mutable.Mutable;
 import org.apache.vxquery.compiler.algebricks.VXQueryConstantValue;
 import org.apache.vxquery.context.StaticContext;
-import org.apache.vxquery.context.StaticContextImpl;
 import org.apache.vxquery.datamodel.accessors.TaggedValuePointable;
 import org.apache.vxquery.functions.BuiltinFunctions;
 import org.apache.vxquery.functions.BuiltinOperators;
@@ -148,15 +145,14 @@ public class ExpressionToolbox {
         }
     }
 
-    public static Function getBuiltIn(Mutable<ILogicalExpression> mutableLe, StaticContext rootContext) {
+    public static Function getBuiltIn(Mutable<ILogicalExpression> mutableLe) {
         ILogicalExpression le = mutableLe.getValue();
         if (le.getExpressionTag() == LogicalExpressionTag.FUNCTION_CALL) {
             AbstractFunctionCallExpression afce = (AbstractFunctionCallExpression) le;
-            FunctionIdentifier fid = afce.getFunctionIdentifier();
-            QName functionName = new QName(fid.getNamespace(), fid.getName());
-            Function found = rootContext.lookupFunction(functionName, fid.getArity());
-            if (found != null) {
-                return found;
+            for (Function function : BuiltinFunctions.FUNCTION_COLLECTION) {
+                if (function.getFunctionIdentifier().equals(afce.getFunctionIdentifier())) {
+                    return function;
+                }
             }
             for (Function function : BuiltinOperators.OPERATOR_COLLECTION) {
                 if (function.getFunctionIdentifier().equals(afce.getFunctionIdentifier())) {
@@ -202,7 +198,7 @@ public class ExpressionToolbox {
         switch (argFirstLe.getExpressionTag()) {
             case FUNCTION_CALL:
                 // Only process defined functions.
-                Function function = ExpressionToolbox.getBuiltIn(argFirstM, dCtx);
+                Function function = ExpressionToolbox.getBuiltIn(argFirstM);
                 if (function == null) {
                     return null;
                 } else if (function.getFunctionIdentifier().equals(BuiltinOperators.CAST.getFunctionIdentifier())) {


[36/50] [abbrv] git commit: Found more places where pointables were created without the factory.

Posted by pr...@apache.org.
Found more places where pointables were created without the factory.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/f9932ab6
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/f9932ab6
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/f9932ab6

Branch: refs/heads/prestonc/hash_join
Commit: f9932ab63a93d1bc38d0bbd575ac7bfa6a48fedb
Parents: 99a4555
Author: Preston Carman <pr...@apache.org>
Authored: Mon Mar 17 18:37:51 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../functions/aggregate/FnAvgScalarEvaluatorFactory.java        | 2 +-
 .../functions/aggregate/FnCountScalarEvaluatorFactory.java      | 2 +-
 .../runtime/functions/misc/FnDataScalarEvaluatorFactory.java    | 2 +-
 .../functions/sequence/ConcatenateScalarEvaluatorFactory.java   | 2 +-
 .../functions/sequence/FnEmptyScalarEvaluatorFactory.java       | 2 +-
 .../functions/sequence/FnExactlyOneScalarEvaluatorFactory.java  | 2 +-
 .../functions/sequence/FnExistsScalarEvaluatorFactory.java      | 2 +-
 .../sequence/FnInsertBeforeScalarEvaluatorFactory.java          | 4 ++--
 .../functions/sequence/FnOneOrMoreScalarEvaluatorFactory.java   | 2 +-
 .../functions/sequence/FnRemoveScalarEvaluatorFactory.java      | 2 +-
 .../functions/sequence/FnReverseScalarEvaluatorFactory.java     | 2 +-
 .../functions/sequence/FnSubsequenceScalarEvaluatorFactory.java | 2 +-
 .../functions/sequence/FnZeroOrOneScalarEvaluatorFactory.java   | 2 +-
 .../functions/sequence/IterateUnnestingEvaluatorFactory.java    | 5 +++--
 .../functions/sequence/SequenceAggregateEvaluatorFactory.java   | 2 +-
 .../runtime/functions/strings/FnStringJoinEvaluatorFactory.java | 2 +-
 16 files changed, 19 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgScalarEvaluatorFactory.java
index 17b1b73..7ee822c 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnAvgScalarEvaluatorFactory.java
@@ -49,7 +49,7 @@ public class FnAvgScalarEvaluatorFactory extends AbstractTaggedValueArgumentScal
     protected IScalarEvaluator createEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args)
             throws AlgebricksException {
         final DynamicContext dCtx = (DynamicContext) ctx.getJobletContext().getGlobalJobData();
-        final SequencePointable seqp = new SequencePointable();
+        final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final TaggedValuePointable tvpNext = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
         final TaggedValuePointable tvpSum = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
         final TaggedValuePointable tvpCount = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnCountScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnCountScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnCountScalarEvaluatorFactory.java
index b1cd040..c96ea6e 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnCountScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnCountScalarEvaluatorFactory.java
@@ -43,7 +43,7 @@ public class FnCountScalarEvaluatorFactory extends AbstractTaggedValueArgumentSc
     @Override
     protected IScalarEvaluator createEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args)
             throws AlgebricksException {
-        final SequencePointable seqp = new SequencePointable();
+        final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         final DataOutput dOut = abvs.getDataOutput();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/misc/FnDataScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/misc/FnDataScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/misc/FnDataScalarEvaluatorFactory.java
index 7aed0b4..1a05efc 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/misc/FnDataScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/misc/FnDataScalarEvaluatorFactory.java
@@ -52,7 +52,7 @@ public class FnDataScalarEvaluatorFactory extends AbstractTaggedValueArgumentSca
         final AtomizeHelper ah = new AtomizeHelper();
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         final SequenceBuilder sb = new SequenceBuilder();
-        final SequencePointable seq = new SequencePointable();
+        final SequencePointable seq = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final TaggedValuePointable p = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
         final TaggedValuePointable tempTVP = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable();
 

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/ConcatenateScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/ConcatenateScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/ConcatenateScalarEvaluatorFactory.java
index ba1329e..b6559b9 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/ConcatenateScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/ConcatenateScalarEvaluatorFactory.java
@@ -47,7 +47,7 @@ public class ConcatenateScalarEvaluatorFactory extends AbstractTaggedValueArgume
             throws AlgebricksException {
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         final SequenceBuilder sb = new SequenceBuilder();
-        final SequencePointable seq = new SequencePointable();
+        final SequencePointable seq = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final VoidPointable p = (VoidPointable) VoidPointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {
             @Override

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnEmptyScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnEmptyScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnEmptyScalarEvaluatorFactory.java
index 8e2a0b8..bff87e3 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnEmptyScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnEmptyScalarEvaluatorFactory.java
@@ -40,7 +40,7 @@ public class FnEmptyScalarEvaluatorFactory extends AbstractTaggedValueArgumentSc
     @Override
     protected IScalarEvaluator createEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args)
             throws AlgebricksException {
-        final SequencePointable seqp = new SequencePointable();
+        final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {
             @Override
             protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExactlyOneScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExactlyOneScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExactlyOneScalarEvaluatorFactory.java
index f0e8c34..d6375a1 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExactlyOneScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExactlyOneScalarEvaluatorFactory.java
@@ -40,7 +40,7 @@ public class FnExactlyOneScalarEvaluatorFactory extends AbstractTaggedValueArgum
     @Override
     protected IScalarEvaluator createEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args)
             throws AlgebricksException {
-        final SequencePointable seqp = new SequencePointable();
+        final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {
             @Override
             protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExistsScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExistsScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExistsScalarEvaluatorFactory.java
index 4b9806f..45c9f6e 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExistsScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnExistsScalarEvaluatorFactory.java
@@ -40,7 +40,7 @@ public class FnExistsScalarEvaluatorFactory extends AbstractTaggedValueArgumentS
     @Override
     protected IScalarEvaluator createEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args)
             throws AlgebricksException {
-        final SequencePointable seqp = new SequencePointable();
+        final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {
             @Override
             protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnInsertBeforeScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnInsertBeforeScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnInsertBeforeScalarEvaluatorFactory.java
index 6192056..1571899 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnInsertBeforeScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnInsertBeforeScalarEvaluatorFactory.java
@@ -48,8 +48,8 @@ public class FnInsertBeforeScalarEvaluatorFactory extends AbstractTaggedValueArg
             throws AlgebricksException {
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         final SequenceBuilder sb = new SequenceBuilder();
-        final SequencePointable seq = new SequencePointable();
-        final SequencePointable seq2 = new SequencePointable();
+        final SequencePointable seq = (SequencePointable) SequencePointable.FACTORY.createPointable();
+        final SequencePointable seq2 = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final VoidPointable p = (VoidPointable) VoidPointable.FACTORY.createPointable();
         final LongPointable longp = (LongPointable) LongPointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnOneOrMoreScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnOneOrMoreScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnOneOrMoreScalarEvaluatorFactory.java
index 0b181d5..c81c356 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnOneOrMoreScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnOneOrMoreScalarEvaluatorFactory.java
@@ -40,7 +40,7 @@ public class FnOneOrMoreScalarEvaluatorFactory extends AbstractTaggedValueArgume
     @Override
     protected IScalarEvaluator createEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args)
             throws AlgebricksException {
-        final SequencePointable seqp = new SequencePointable();
+        final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {
             @Override
             protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnRemoveScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnRemoveScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnRemoveScalarEvaluatorFactory.java
index 5a385d4..0673341 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnRemoveScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnRemoveScalarEvaluatorFactory.java
@@ -48,7 +48,7 @@ public class FnRemoveScalarEvaluatorFactory extends AbstractTaggedValueArgumentS
             throws AlgebricksException {
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         final SequenceBuilder sb = new SequenceBuilder();
-        final SequencePointable seq = new SequencePointable();
+        final SequencePointable seq = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final VoidPointable p = (VoidPointable) VoidPointable.FACTORY.createPointable();
         final LongPointable longp = (LongPointable) LongPointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnReverseScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnReverseScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnReverseScalarEvaluatorFactory.java
index d838798..1591013 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnReverseScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnReverseScalarEvaluatorFactory.java
@@ -47,7 +47,7 @@ public class FnReverseScalarEvaluatorFactory extends AbstractTaggedValueArgument
             throws AlgebricksException {
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         final SequenceBuilder sb = new SequenceBuilder();
-        final SequencePointable seq = new SequencePointable();
+        final SequencePointable seq = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final VoidPointable p = (VoidPointable) VoidPointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {
             @Override

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnSubsequenceScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnSubsequenceScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnSubsequenceScalarEvaluatorFactory.java
index a7dbc90..6244b4f 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnSubsequenceScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnSubsequenceScalarEvaluatorFactory.java
@@ -51,7 +51,7 @@ public class FnSubsequenceScalarEvaluatorFactory extends AbstractTaggedValueArgu
             throws AlgebricksException {
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         final SequenceBuilder sb = new SequenceBuilder();
-        final SequencePointable seq = new SequencePointable();
+        final SequencePointable seq = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final VoidPointable p = (VoidPointable) VoidPointable.FACTORY.createPointable();
         final DoublePointable doublep = (DoublePointable) DoublePointable.FACTORY.createPointable();
         final LongPointable longp = (LongPointable) LongPointable.FACTORY.createPointable();

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnZeroOrOneScalarEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnZeroOrOneScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnZeroOrOneScalarEvaluatorFactory.java
index 2c25a3e..5620fc0 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnZeroOrOneScalarEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/FnZeroOrOneScalarEvaluatorFactory.java
@@ -40,7 +40,7 @@ public class FnZeroOrOneScalarEvaluatorFactory extends AbstractTaggedValueArgume
     @Override
     protected IScalarEvaluator createEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args)
             throws AlgebricksException {
-        final SequencePointable seqp = new SequencePointable();
+        final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {
             @Override
             protected void evaluate(TaggedValuePointable[] args, IPointable result) throws SystemException {

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/IterateUnnestingEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/IterateUnnestingEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/IterateUnnestingEvaluatorFactory.java
index 6093ead..aadc1d0 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/IterateUnnestingEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/IterateUnnestingEvaluatorFactory.java
@@ -37,8 +37,9 @@ public class IterateUnnestingEvaluatorFactory extends AbstractTaggedValueArgumen
     }
 
     @Override
-    protected IUnnestingEvaluator createEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args) throws AlgebricksException {
-        final SequencePointable seqp = new SequencePointable();
+    protected IUnnestingEvaluator createEvaluator(IHyracksTaskContext ctx, IScalarEvaluator[] args)
+            throws AlgebricksException {
+        final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentUnnestingEvaluator(args) {
             private int index;
             private int seqLength;

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/SequenceAggregateEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/SequenceAggregateEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/SequenceAggregateEvaluatorFactory.java
index 24762e8..555b279 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/SequenceAggregateEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/sequence/SequenceAggregateEvaluatorFactory.java
@@ -48,7 +48,7 @@ public class SequenceAggregateEvaluatorFactory extends AbstractTaggedValueArgume
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
         final GrowableIntArray slots = new GrowableIntArray();
         final ArrayBackedValueStorage dataArea = new ArrayBackedValueStorage();
-        final SequencePointable seq = new SequencePointable();
+        final SequencePointable seq = (SequencePointable) SequencePointable.FACTORY.createPointable();
         final VoidPointable p = (VoidPointable) VoidPointable.FACTORY.createPointable();
         return new AbstractTaggedValueArgumentAggregateEvaluator(args) {
             @Override

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/f9932ab6/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/FnStringJoinEvaluatorFactory.java
----------------------------------------------------------------------
diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/FnStringJoinEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/FnStringJoinEvaluatorFactory.java
index 2a1a405..11107d5 100644
--- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/FnStringJoinEvaluatorFactory.java
+++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/strings/FnStringJoinEvaluatorFactory.java
@@ -50,7 +50,7 @@ public class FnStringJoinEvaluatorFactory extends AbstractTaggedValueArgumentSca
         final UTF8StringPointable stringp1 = (UTF8StringPointable) UTF8StringPointable.FACTORY.createPointable();
         final UTF8StringPointable stringp2 = (UTF8StringPointable) UTF8StringPointable.FACTORY.createPointable();
         final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage();
-        final SequencePointable seq = new SequencePointable();
+        final SequencePointable seq = (SequencePointable) SequencePointable.FACTORY.createPointable();
 
         return new AbstractTaggedValueArgumentScalarEvaluator(args) {
             @Override


[28/50] [abbrv] git commit: Lowered the frame size for the benchmark tests. Improves available partitions for hash join.

Posted by pr...@apache.org.
Lowered the frame size for the benchmark tests. Improves available partitions for hash join.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/32f6b97c
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/32f6b97c
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/32f6b97c

Branch: refs/heads/prestonc/hash_join
Commit: 32f6b97c0de16a1b806a953048a04b781499f8a6
Parents: ea297e7
Author: Preston Carman <pr...@apache.org>
Authored: Mon Mar 17 18:09:42 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/32f6b97c/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
index bbfe35d..f283cba 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/run_benchmark.sh
@@ -40,7 +40,7 @@ do
 		log_file="$(basename ${j}).$(date +%Y%m%d).log"
 		log_base_path=$(dirname ${j/queries/query_logs})
 		mkdir -p ${log_base_path}
-		time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -frame-size 1000000 -repeatexec 10 > ${log_base_path}/${log_file} 2>&1
+		time sh ./vxquery-cli/target/appassembler/bin/vxq ${j} ${2} -timing -showquery -frame-size 10000 -repeatexec 10 > ${log_base_path}/${log_file} 2>&1
 	fi;
 done
 


[34/50] [abbrv] git commit: Changing benchmark scripts to support local partitions on a cluster.

Posted by pr...@apache.org.
Changing benchmark scripts to support local partitions on a cluster.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/ea297e72
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/ea297e72
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/ea297e72

Branch: refs/heads/prestonc/hash_join
Commit: ea297e72bd00d15649fa47991833d114c93c3821
Parents: 0b1033f
Author: Preston Carman <pr...@apache.org>
Authored: Mon Mar 17 18:08:54 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:25 2014 -0700

----------------------------------------------------------------------
 .../scripts/weather_benchmark.py                | 104 +++++++++----------
 .../scripts/weather_data_files.py               |  21 ++--
 2 files changed, 60 insertions(+), 65 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/ea297e72/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index 6374d38..fdd08ec 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -61,28 +61,32 @@ class WeatherBenchmark:
                 exit()
             
     def print_local_partition_schemes(self, test, xml_save_path):
+        node_index = 0
+        virtual_partitions = get_local_virtual_partitions(self.partitions)
         for i in self.partitions:
             scheme = self.get_local_partition_scheme(test, xml_save_path, i)
-            virtual_partitions = get_local_virtual_partitions(self.partitions)
-            self.print_partition_schemes(virtual_partitions, scheme, test, i)
+            self.print_partition_schemes(virtual_partitions, scheme, test, i, node_index)
         
     def print_cluster_partition_schemes(self, test, xml_save_path):
-        scheme = self.get_cluster_partition_scheme(test, xml_save_path)
+        node_index = self.get_current_node_index()
         virtual_partitions = get_cluster_virtual_partitions(self.nodes, self.partitions)
-        self.print_partition_schemes(virtual_partitions, scheme, test, 0)
+        for i in self.partitions:
+            scheme = self.get_cluster_partition_scheme(test, xml_save_path, i)
+            self.print_partition_schemes(virtual_partitions, scheme, test, i, node_index)
         
-    def print_partition_schemes(self, virtual_partitions, scheme, test, partitions):
+    def print_partition_schemes(self, virtual_partitions, scheme, test, partitions, node_id):
         print
         print "---------------- Partition Scheme --------------------"
         print "    Test: " + test
         print "    Virtual Partitions: " + str(virtual_partitions)
         print "    Disks: " + str(len(self.base_paths))
         print "    Partitions: " + str(partitions)
+        print "    Node Id: " + str(node_id)
         
         if len(scheme) > 0:
             folder_length = len(scheme[0][3]) + 5
-            row_format = "{:>5} {:>5} {:<" + str(folder_length) + "} {:<" + str(folder_length) + "}"
-            HEADER = ("Index", "Link", "Data Path", "Link Path")
+            row_format = "{:>5} {:>5} {:>5} {:<" + str(folder_length) + "} {:<" + str(folder_length) + "}"
+            HEADER = ("Disk", "Index", "Link", "Data Path", "Link Path")
             print row_format.format(*HEADER)
             for row in scheme:
                 print row_format.format(*row)
@@ -93,14 +97,14 @@ class WeatherBenchmark:
     def get_local_partition_scheme(self, test, xml_save_path, partition):
         scheme = []
         virtual_partitions = get_local_virtual_partitions(self.partitions)
-        data_schems = get_partition_scheme(virtual_partitions, self.base_paths)
+        data_schemes = get_partition_scheme(0, virtual_partitions, self.base_paths)
         
-        link_base_schemes = get_partition_scheme(partition, self.base_paths, "data_links/" + test)
+        link_base_schemes = get_partition_scheme(0, partition, self.base_paths, "data_links/" + test)
         # Match link paths to real data paths.
         offset = 0
         group_size = len(data_schemes) / len(link_base_schemes)
-        for link_disk, link_virtual, link_index, link_path in enumerate(link_base_schemes):
-            for data_disk, data_virtual, data_index, data_path in enumerate(data_schemes):
+        for link_node, link_disk, link_virtual, link_index, link_path in link_base_schemes:
+            for data_node, data_disk, data_virtual, data_index, data_path in data_schemes:
                 if test == "local_speed_up" and offset <= data_index and data_index < offset + group_size:
                     scheme.append([data_index, link_index, data_path, link_path])
                 elif test == "local_batch_scale_out" and data_index == link_index:
@@ -108,43 +112,39 @@ class WeatherBenchmark:
             offset += group_size
         return scheme
     
-    def get_cluster_partition_scheme(self, test, xml_save_path):
+    def get_cluster_partition_scheme(self, test, xml_save_path, partition):
         node_index = self.get_current_node_index()
         if node_index == -1:
             print "Unknown host."
             return 
         
         scheme = []
+        local_virtual_partitions = get_local_virtual_partitions(self.partitions)
         virtual_partitions = get_cluster_virtual_partitions(self.nodes, self.partitions)
-        data_paths = get_partition_paths(virtual_partitions, self.base_paths)
-        link_base_paths = get_cluster_link_paths(len(self.nodes), self.base_paths, "data_links/" + test)
+        data_schemes = get_partition_scheme(node_index, virtual_partitions, self.base_paths)
+        link_base_schemes = get_cluster_link_scheme(len(self.nodes), partition, self.base_paths, "data_links/" + test)
 
         # Match link paths to real data paths.
-        link_base_paths.sort()
-        for link_index, link_path in enumerate(link_base_paths):
+        for link_node, link_disk, link_virtual, link_index, link_path in link_base_schemes:
             # Prep
-            link_offset = link_index % len(self.nodes)
-            disk_offset = link_index // len(self.nodes)
             if test == "speed_up":
-                group_size = len(data_paths) / (link_offset + 1) / (len(self.base_paths))
+                group_size = virtual_partitions / (link_node + 1)
             elif test == "batch_scale_out":
-                group_size = len(data_paths) / len(self.nodes) / (len(self.base_paths))
+                group_size = virtual_partitions / len(self.nodes)
             else:
                 print "Unknown test."
                 return
-            node_offset = group_size * node_index
-            for j in range(disk_offset):
-                node_offset += len(data_paths) / (len(self.base_paths))
+            group_size = group_size / link_virtual
+            node_offset = group_size * (node_index * local_virtual_partitions)
+            node_offset += group_size * link_index
             has_data = True
-            if link_offset < node_index:
+            if link_node < node_index:
                 has_data = False
-                    
             # Make links
-            data_paths.sort()
-            for data_index, data_path in enumerate(data_paths):
-                if has_data and node_offset <= data_index and data_index < node_offset + group_size:
-                    scheme.append([data_index, link_index, data_path, link_path])
-            scheme.append([-1, link_index, "", link_path])
+            for date_node, data_disk, data_virtual, data_index, data_path in data_schemes:
+                if has_data and data_disk == link_disk and node_offset <= data_index and data_index < node_offset + group_size:
+                    scheme.append([link_disk, data_index, link_index, data_path, link_path])
+            scheme.append([link_disk, -1, link_index, "", link_path])
         return scheme
     
     def build_data_links(self, xml_save_path):
@@ -156,8 +156,9 @@ class WeatherBenchmark:
                     scheme = self.get_local_partition_scheme(test, xml_save_path, i)
                     self.build_data_links_scheme(scheme)
             elif test in self.BENCHMARK_CLUSTER_TESTS:
-                scheme = self.get_cluster_partition_scheme(test, xml_save_path)
-                self.build_data_links_scheme(scheme)
+                for i in self.partitions:
+                    scheme = self.get_cluster_partition_scheme(test, xml_save_path, i)
+                    self.build_data_links_scheme(scheme)
             else:
                 print "Unknown test."
                 exit()
@@ -207,13 +208,14 @@ class WeatherBenchmark:
         '''Determine the data_link path for cluster query files and copy with
         new location for collection.'''
         partitions = self.dataset.get_partitions()[0]
-        for i in range(len(self.nodes)):
-            query_path = get_cluster_query_path(self.base_paths, test, i)
-            prepare_path(query_path, reset)
-        
-            # Copy query files.
-            partition_paths = get_cluster_link_paths_for_node(i, self.base_paths, "data_links/" + test)
-            self.copy_and_replace_query(query_path, partition_paths)
+        for i in self.partitions:
+            for j in range(len(self.nodes)):
+                query_path = get_cluster_query_path(self.base_paths, test, i, j)
+                prepare_path(query_path, reset)
+            
+                # Copy query files.
+                partition_paths = get_cluster_link_paths_for_node(i, self.base_paths, "data_links/" + test)
+                self.copy_and_replace_query(query_path, partition_paths)
 
     def copy_local_query_files(self, test, reset):
         '''Determine the data_link path for local query files and copy with
@@ -223,7 +225,7 @@ class WeatherBenchmark:
             prepare_path(query_path, reset)
     
             # Copy query files.
-            partition_paths = get_partition_paths(i, self.base_paths, "data_links/" + test)
+            partition_paths = get_partition_paths(0, i, self.base_paths, "data_links/" + test)
             self.copy_and_replace_query(query_path, partition_paths)
 
     def copy_and_replace_query(self, query_path, replacement_list):
@@ -255,34 +257,26 @@ class WeatherBenchmark:
                     print "Unknown test."
                     exit()
 
-def get_cluster_link_paths(nodes, base_paths, key="partitions"):        
+def get_cluster_link_scheme(nodes, partition, base_paths, key="partitions"):        
     link_paths = []
     for i in range(0, nodes):
-        new_link_path = get_cluster_link_paths_for_node(i, base_paths, key)
+        new_link_path = get_partition_scheme(i, partition, base_paths, key + "/" + str(i) + "nodes")
         link_paths.extend(new_link_path)
     return link_paths
 
-def get_cluster_link_paths_for_node(node_id, base_paths, key="partitions"):        
-    link_paths = []
-    for j in range(0, len(base_paths)):
-        new_link_path = base_paths[j] + key + "/" + str(node_id) + "nodes/"
-        link_paths.append(new_link_path)
-    return link_paths
-
 def get_local_query_path(base_paths, test, partition):        
     return base_paths[0] + "queries/" + test + "/" + get_local_query_folder(len(base_paths), partition) + "/"
 
 def get_local_query_folder(disks, partitions):        
     return "d" + str(disks) + "_p" + str(partitions)
 
-def get_cluster_query_path(base_paths, test, nodes):        
-    return base_paths[0] + "queries/" + test + "/" + str(nodes) + "nodes/"
+def get_cluster_query_path(base_paths, test, partition, nodes):        
+    return base_paths[0] + "queries/" + test + "/" + str(nodes) + "nodes/" + get_local_query_folder(len(base_paths), partition) + "/"
 
 def get_cluster_virtual_partitions(nodes, partitions):
-    if len(partitions) != 1:
-        print "Cluster configurations must only have one partition."
-        exit()
-    return calculate_partitions(range(len(nodes), 0, -1))
+    vp = get_local_virtual_partitions(partitions)
+    vn = calculate_partitions(range(len(nodes), 0, -1))
+    return vp * vn
 
 def get_local_virtual_partitions(partitions):
     return calculate_partitions(partitions)

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/ea297e72/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
index a68cba1..64e19d6 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_data_files.py
@@ -99,7 +99,7 @@ class WeatherDataFiles:
         
         # Initialize the partition paths.
         partition_sizes = []
-        partition_paths = get_partition_paths(partitions, base_paths)
+        partition_paths = get_partition_paths(0, partitions, base_paths)
         for path in partition_paths:
             partition_sizes.append(0)
             # Make sure the xml folder is available.
@@ -319,24 +319,25 @@ class WeatherDataFiles:
     
     
 # Index values of each field details.
-PARTITION_INDEX_DISK = 0
-PARTITION_INDEX_VIRTUAL = 1
-PARTITION_INDEX = 2
-PARTITION_INDEX_PATH = 3
-PARTITION_HEADER = ("Disk", "Virtual", "Index", "Path")
+PARTITION_INDEX_NODE = 0
+PARTITION_INDEX_DISK = 1
+PARTITION_INDEX_VIRTUAL = 2
+PARTITION_INDEX = 3
+PARTITION_INDEX_PATH = 4
+PARTITION_HEADER = ("Node", "Disk", "Virtual", "Index", "Path")
             
-def get_partition_paths(partitions, base_paths, key="partitions"):        
+def get_partition_paths(node_id, partitions, base_paths, key="partitions"):        
     partition_paths = []
-    for scheme in get_partition_scheme(partitions, base_paths, key):
+    for scheme in get_partition_scheme(node_id, partitions, base_paths, key):
         partition_paths.append(scheme[PARTITION_INDEX_PATH])
     return partition_paths
 
-def get_partition_scheme(partitions, base_paths, key="partitions"):        
+def get_partition_scheme(node_id, partitions, base_paths, key="partitions"):        
     partition_scheme = []
     for i in range(0, partitions):
         for j in range(0, len(base_paths)):
             new_partition_path = base_paths[j] + key + "/" + get_partition_folder(j, partitions, i) + "/"
-            partition_scheme.append((j, partitions, i, new_partition_path))
+            partition_scheme.append((node_id, j, partitions, i, new_partition_path))
     return partition_scheme
 
 def get_partition_folder(disks, partitions, index):        


[23/50] [abbrv] git commit: Query update to work with generated data on smaller data sizes.

Posted by pr...@apache.org.
Query update to work with generated data on smaller data sizes.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/50594209
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/50594209
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/50594209

Branch: refs/heads/prestonc/hash_join
Commit: 50594209505f6f1207386da5574fc3d3c8a668cf
Parents: 5771ac4
Author: Preston Carman <pr...@apache.org>
Authored: Wed Mar 12 13:11:25 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../src/main/resources/noaa-ghcn-daily/queries/q04.xq   | 12 ++++++------
 .../src/main/resources/noaa-ghcn-daily/queries/q05.xq   | 10 +++++-----
 2 files changed, 11 insertions(+), 11 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/50594209/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
index c20c973..174a9f7 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q04.xq
@@ -1,14 +1,14 @@
 (: XQuery Join Query :)
-(: Find all the weather readings for Los Angeles county for a specific day    :)
+(: Find all the weather readings for King county for a specific day    :)
 (: 1976/7/4.                                                                  :)
-let $collection1 := "/tmp/1.0_partition_ghcnd_all_xml/stations"
-for $s in collection($collection1)/stationCollection/station
+let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+for $s in collection($station_collection)/stationCollection/station
 
-let $collection2 := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-for $r in collection($collection2)/dataCollection/data
+let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+for $r in collection($sensor_collection)/dataCollection/data
     
 let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
 where $s/id eq $r/station 
-    and (some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and $x/displayName eq "Los Angeles County, CA"))
+    and (some $x in $s/locationLabels satisfies ($x/type eq "CNTY" and fn:contains(fn:upper-case(fn:data($x/displayName)), "KING")))
     and $date eq xs:date("1976-07-04")
 return $r
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/50594209/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
index 3348d04..23bbaf4 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/queries/q05.xq
@@ -2,15 +2,15 @@
 (: Find the lowest recorded temperature (TMIN) in the state of Oregon for     :)
 (: 2001.                                                                      :)
 fn:min(
-    let $collection1 := "/tmp/1.0_partition_ghcnd_all_xml/stations"
-    for $s in collection($collection1)/stationCollection/station
+    let $station_collection := "/tmp/1.0_partition_ghcnd_all_xml/stations"
+    for $s in collection($station_collection)/stationCollection/station
     
-    let $collection2 := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
-    for $r in collection($collection2)/dataCollection/data
+    let $sensor_collection := "/tmp/1.0_partition_ghcnd_all_xml/sensors"
+    for $r in collection($sensor_collection)/dataCollection/data
     
     let $date := xs:date(fn:substring(xs:string(fn:data($r/date)), 0, 11))
     where $s/id eq $r/station
-        and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and $x/displayName eq "Oregon"))
+        and (some $x in $s/locationLabels satisfies ($x/type eq "ST" and fn:upper-case(fn:data($x/displayName)) eq "OREGON"))
         and $r/dataType eq "TMIN" 
         and fn:year-from-date($date) eq 2001
     return $r/value


[17/50] [abbrv] git commit: Switched ssh commands to use hostname instead of ip address.

Posted by pr...@apache.org.
Switched ssh commands to use hostname instead of ip address.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/73875c67
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/73875c67
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/73875c67

Branch: refs/heads/prestonc/hash_join
Commit: 73875c673ab03f8d3f75154aea4bb38806232f22
Parents: 75d6077
Author: Preston Carman <pr...@apache.org>
Authored: Thu Mar 13 23:07:34 2014 -0700
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:24 2014 -0700

----------------------------------------------------------------------
 .../main/resources/scripts/cluster_actions.py   | 26 ++++++++++----------
 1 file changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/73875c67/vxquery-server/src/main/resources/scripts/cluster_actions.py
----------------------------------------------------------------------
diff --git a/vxquery-server/src/main/resources/scripts/cluster_actions.py b/vxquery-server/src/main/resources/scripts/cluster_actions.py
index 066aa4f..cef5db1 100644
--- a/vxquery-server/src/main/resources/scripts/cluster_actions.py
+++ b/vxquery-server/src/main/resources/scripts/cluster_actions.py
@@ -87,52 +87,52 @@ class ClusterActions:
         # Push the information out to each server.    
         print "  - Add new file."
         remove_tar_command = "rm " + tar_file + ""
-        self.run_remote_command(machine.get_username(), machine.get_ip(), remove_tar_command)
-        copy_command = "scp " + tar_file + " " + machine.get_username() + "@" + machine.get_ip() + ":"
+        self.run_remote_command(machine.get_username(), machine.get_id(), remove_tar_command)
+        copy_command = "scp " + tar_file + " " + machine.get_username() + "@" + machine.get_id() + ":"
         subprocess.call(copy_command, shell=True)
         
         print "  - Expand new file."
         base_folder = tar_file.split('.')[0]
         remove_folder_command = "rm -rf " + base_folder + ""
-        self.run_remote_command(machine.get_username(), machine.get_ip(), remove_folder_command)
+        self.run_remote_command(machine.get_username(), machine.get_id(), remove_folder_command)
         unpack_command = "tar -zxf " + tar_file + ""
-        self.run_remote_command(machine.get_username(), machine.get_ip(), unpack_command)
+        self.run_remote_command(machine.get_username(), machine.get_id(), unpack_command)
         # Make the bin files executable.
         chmod_command = "chmod u+x " + base_folder + "/target/appassembler/bin/vxq*"
-        self.run_remote_command(machine.get_username(), machine.get_ip(), chmod_command)
+        self.run_remote_command(machine.get_username(), machine.get_id(), chmod_command)
         chmod_command = "chmod u+x " + base_folder + "/target/appassembler/bin/*.sh"
-        self.run_remote_command(machine.get_username(), machine.get_ip(), chmod_command)
+        self.run_remote_command(machine.get_username(), machine.get_id(), chmod_command)
         
         print "  - Server clean up."
-        self.run_remote_command(machine.get_username(), machine.get_ip(), remove_tar_command)
+        self.run_remote_command(machine.get_username(), machine.get_id(), remove_tar_command)
         
     
     def start_cc(self, machine):
         print "Start Cluster Controller."
         print "  " + machine.get_id() + " " + machine.get_ip()
         command = "./vxquery-server/target/appassembler/bin/startcc.sh " + machine.get_ip()
-        self.run_remote_command(machine.get_username(), machine.get_ip(), command)
+        self.run_remote_command(machine.get_username(), machine.get_id(), command)
     
     def start_nc(self, machine, cc):
         print "Start Node Controller."
         print "  " + machine.get_id() + " " + machine.get_ip()
         command = "./vxquery-server/target/appassembler/bin/startnc.sh " + cc.get_ip() + " " + machine.get_ip() + " " + machine.get_id()
-        self.run_remote_command(machine.get_username(), machine.get_ip(), command)
+        self.run_remote_command(machine.get_username(), machine.get_id(), command)
 
     def stop_cc(self, machine):
         print "Stop Cluster Controller."
         print "  " + machine.get_id() + " " + machine.get_ip()
         command = "./vxquery-server/target/appassembler/bin/stopcc.sh " + machine.get_username()
-        self.run_remote_command(machine.get_username(), machine.get_ip(), command)
+        self.run_remote_command(machine.get_username(), machine.get_id(), command)
     
     def stop_nc(self, machine):
         print "Stop Node Controller."
         print "  " + machine.get_id() + " " + machine.get_ip()
         command = "./vxquery-server/target/appassembler/bin/stopnc.sh " + machine.get_username()
-        self.run_remote_command(machine.get_username(), machine.get_ip(), command)
+        self.run_remote_command(machine.get_username(), machine.get_id(), command)
         
-    def run_remote_command(self, username, ip_address, command):
-        remote_command = "ssh -x " + username + "@" + ip_address + " '" + command + "' "
+    def run_remote_command(self, username, host, command):
+        remote_command = "ssh -x " + username + "@" + host + " '" + command + "' "
 #         print remote_command
         os.system(remote_command)
 


[10/50] [abbrv] git commit: A few more tweaks to the weather scripts.

Posted by pr...@apache.org.
A few more tweaks to the weather scripts.

* now supports all queries.
* example has been update to a single partition.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/9f14f927
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/9f14f927
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/9f14f927

Branch: refs/heads/prestonc/hash_join
Commit: 9f14f927055b2eab85d49e2429013fa231e3482c
Parents: bd297af
Author: Preston Carman <pr...@apache.org>
Authored: Tue Mar 4 17:26:00 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 .../main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py  | 3 +--
 .../noaa-ghcn-daily/scripts/weather_example_cluster.xml          | 4 ++--
 2 files changed, 3 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/9f14f927/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index 4813bd9..a812a1f 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -35,8 +35,7 @@ class WeatherBenchmark:
 
     QUERY_REPLACEMENT_KEY = "/tmp/1.0_partition_ghcnd_all_xml/"
     QUERY_MASTER_FOLDER = "../queries/"
-    QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq"] 
-#     QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq", "q04.xq", "q05.xq"] 
+    QUERY_FILE_LIST = ["q00.xq", "q01.xq", "q02.xq", "q03.xq", "q04.xq", "q05.xq"] 
     BENCHMARK_LOCAL_TESTS = ["local_speed_up", "local_batch_scale_out"] 
     BENCHMARK_CLUSTER_TESTS = ["speed_up", "batch_scale_out"] 
     QUERY_COLLECTIONS = ["sensors", "stations"]

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/9f14f927/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
index 87be4e3..c8d253f 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_example_cluster.xml
@@ -43,7 +43,7 @@
         <test>speed_up</test>
         <test>batch_scale_out</test>
         <save_path>/data</save_path>
-        <partitions_per_path>4</partitions_per_path>
+        <partitions_per_path>1</partitions_per_path>
     </dataset>
     <dataset>
         <name>small-2drives</name>
@@ -51,6 +51,6 @@
         <test>batch_scale_out</test>
         <save_path>/data</save_path>
         <save_path>/data2</save_path>
-        <partitions_per_path>2</partitions_per_path>
+        <partitions_per_path>1</partitions_per_path>
     </dataset>
 </data>


[08/50] [abbrv] git commit: Clean up items for the weather scripts.

Posted by pr...@apache.org.
Clean up items for the weather scripts.


Project: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/commit/b7061722
Tree: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/tree/b7061722
Diff: http://git-wip-us.apache.org/repos/asf/incubator-vxquery/diff/b7061722

Branch: refs/heads/prestonc/hash_join
Commit: b706172249fbcb50e92ce8f96d09c13281737e70
Parents: 735140b
Author: Preston Carman <pr...@apache.org>
Authored: Tue Mar 4 17:39:53 2014 -0800
Committer: Preston Carman <pr...@apache.org>
Committed: Tue Apr 1 20:56:23 2014 -0700

----------------------------------------------------------------------
 .../resources/noaa-ghcn-daily/scripts/weather_benchmark.py   | 8 ++++----
 .../main/resources/noaa-ghcn-daily/scripts/weather_cli.py    | 2 +-
 .../noaa-ghcn-daily/scripts/weather_convert_to_xml.py        | 2 +-
 3 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/b7061722/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
index a812a1f..8a032c2 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_benchmark.py
@@ -14,7 +14,6 @@
 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 # See the License for the specific language governing permissions and
 # limitations under the License.
-import glob
 import os.path
 import linecache
 import distutils.core
@@ -135,9 +134,6 @@ class WeatherBenchmark:
             if index >= 0:
                 os.symlink(real_path + collection + "/", collection_path + "index" + str(index))
             
-    def get_partition_folders(self, base_path):
-        glob.glob(base_path + "partitions/d*_p*_i*")
-            
     def copy_query_files(self):
         for test in self.dataset.get_tests():
             if test in self.BENCHMARK_LOCAL_TESTS:
@@ -149,6 +145,8 @@ class WeatherBenchmark:
                 exit()
             
     def copy_cluster_query_files(self, test):
+        '''Determine the data_link path for cluster query files and copy with
+        new location for collection.'''
         partitions = self.dataset.get_partitions()[0]
         for i in range(len(self.nodes)):
             query_path = get_cluster_query_path(self.base_paths, test, i)
@@ -161,6 +159,8 @@ class WeatherBenchmark:
             self.copy_and_replace_query(query_path, partition_paths)
 
     def copy_local_query_files(self, test):
+        '''Determine the data_link path for local query files and copy with
+        new location for collection.'''
         for i in self.partitions:
             query_path = get_local_query_path(self.base_paths, test, i)
         

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/b7061722/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
index 0f529f2..103c0d1 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_cli.py
@@ -119,7 +119,7 @@ def main(argv):
     
     # Required fields to run the script.
     if config.get_save_path() == "" or not os.path.exists(config.get_save_path()):
-        print 'Error: The save directory option must be supplied: --save_directory (-d).'
+        print 'Error: The save directory option must be supplied in the config file.'
         sys.exit()
 
     # Set up downloads folder.

http://git-wip-us.apache.org/repos/asf/incubator-vxquery/blob/b7061722/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
----------------------------------------------------------------------
diff --git a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
index 514f5f9..36aff16 100644
--- a/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
+++ b/vxquery-benchmark/src/main/resources/noaa-ghcn-daily/scripts/weather_convert_to_xml.py
@@ -472,7 +472,7 @@ class WeatherWebServiceMonthlyXMLFile(WeatherConvertToXML):
     # Station data
     def download_station_data(self, station_id, token, reset = False):
         import time
-        time.sleep(5)
+        time.sleep(10)
         # Make sure the station folder is available.
         ghcnd_xml_station_path = self.get_base_folder(station_id, "stations")
         if not os.path.isdir(ghcnd_xml_station_path):