Feedback from review and maven now runs the previous passing XQTS with maven test. (Saving work)
- Still need to fix an issue with maven test opening to many files. Project: http://git-wip-us.apache.org/repos/asf/vxquery/repo Commit: http://git-wip-us.apache.org/repos/asf/vxquery/commit/fccce23d Tree: http://git-wip-us.apache.org/repos/asf/vxquery/tree/fccce23d Diff: http://git-wip-us.apache.org/repos/asf/vxquery/diff/fccce23d Branch: refs/heads/prestonc/november_update Commit: fccce23d046fa232a69bf6a235ae56ca186c84ff Parents: f13d378 Author: Preston Carman <[email protected]> Authored: Fri Feb 13 20:44:41 2015 -0800 Committer: Preston Carman <[email protected]> Committed: Fri Feb 13 20:44:41 2015 -0800 ---------------------------------------------------------------------- .gitignore | 1 + README | 22 + docs/README | 67 - src/site/apt/development_benchmarks.apt | 20 + .../apt/development_update_xqts_results.apt | 54 + src/site/apt/user_installation.apt | 6 +- src/site/apt/user_query.apt | 4 +- src/site/site.xml | 121 +- .../java/org/apache/vxquery/cli/VXQuery.java | 3 +- .../compiler/rewriter/RewriteRuleset.java | 11 +- .../DelayMaterializationForJoinProbeRule.java | 142 -- .../accessors/atomic/XSDecimalPointable.java | 4 +- .../builders/nodes/UTF8StringBuilder.java | 53 - .../metadata/VXQueryMetadataProvider.java | 14 +- ...AbstractMaxMinAggregateEvaluatorFactory.java | 6 +- .../AbstractMaxMinScalarEvaluatorFactory.java | 5 +- .../AvgGlobalAggregateEvaluatorFactory.java | 6 +- .../AvgLocalAggregateEvaluatorFactory.java | 4 +- .../FnAvgAggregateEvaluatorFactory.java | 4 +- .../aggregate/FnAvgScalarEvaluatorFactory.java | 4 +- .../FnSumAggregateEvaluatorFactory.java | 4 +- .../aggregate/FnSumScalarEvaluatorFactory.java | 4 +- .../functions/numeric/FnFloorOperation.java | 4 +- .../vxquery/xmlparser/SAXContentHandler.java | 1 - .../src/main/resources/scripts/startcc.sh | 12 +- .../src/main/resources/scripts/startnc.sh | 10 +- vxquery-xtest/results/README.md | 5 +- vxquery-xtest/results/xqts.txt | 2110 +++++++++--------- .../vxquery/xtest/AbstractTestCaseFactory.java | 51 +- .../vxquery/xtest/HTMLFileReporterImpl.java | 1 - .../vxquery/xtest/ServletReporterImpl.java | 2 +- .../apache/vxquery/xtest/TestCaseFactory.java | 6 +- .../org/apache/vxquery/xtest/TestRunner.java | 1 + .../org/apache/vxquery/xtest/XTestOptions.java | 3 + .../vxquery/xtest/JUnitTestCaseFactory.java | 7 +- .../org/apache/vxquery/xtest/VXQueryTest.java | 34 +- .../ExpectedTestResults/Numerics/fn:abs.txt | 8 - .../ExpectedTestResults/Numerics/fn:ceiling.txt | 8 - .../ExpectedTestResults/Numerics/fn_abs.txt | 8 + .../ExpectedTestResults/Numerics/fn_ceiling.txt | 8 + .../resources/Queries/XQuery/Numerics/fn:abs.xq | 22 - .../Queries/XQuery/Numerics/fn:ceiling.xq | 22 - .../resources/Queries/XQuery/Numerics/fn_abs.xq | 22 + .../Queries/XQuery/Numerics/fn_ceiling.xq | 22 + .../FunctionsAndOperatorsOnNumericsQueries.xml | 12 +- 45 files changed, 1434 insertions(+), 1504 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/.gitignore ---------------------------------------------------------------------- diff --git a/.gitignore b/.gitignore index f69f244..fdde96a 100644 --- a/.gitignore +++ b/.gitignore @@ -2,3 +2,4 @@ .settings .classpath target +/ClusterControllerService/ http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/README ---------------------------------------------------------------------- diff --git a/README b/README new file mode 100644 index 0000000..e709f00 --- /dev/null +++ b/README @@ -0,0 +1,22 @@ +~~ 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. + +VXQuery documentation can be found in src/main/site/apt. +The folder contains documents that detail how to install VXQuery, +execute a query and run the test suite. + +The vxquery.apache.org website details both user and developer documentation. +In addition you can subscribe to our mailing list or post issues to our bug +tracking software. http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/docs/README ---------------------------------------------------------------------- diff --git a/docs/README b/docs/README deleted file mode 100644 index baa177e..0000000 --- a/docs/README +++ /dev/null @@ -1,67 +0,0 @@ - Apache VXQuery - -What is it? -=========== - -Apache VXQuery aims to be a standards compliant XML Query processor -implemented in Java. The focus is on the evaluation of queries on large -amounts of XML data. Specifically the goal is to evaluate queries on large -collections of relatively small XML documents. To achieve this, queries are -evaluated on a cluster of shared nothing machines. VXQuery levarages the -runtime facilities provided by Hyracks (http://hyracks.org) and the algebraic -framework provided by Algebricks. - - -Building -======== - -Requirements ------------- -1. JDK >= 1.6 -2. Apache Maven >= 2.0 - -Setup ------ -VXQuery is currently only located in SVN. The following instructions are to -check out the active version under active development. - -1. Create a folder for all the VXQuery files. - -$ mkdir /path/to/VXQuery -$ cd /path/to/VXQuery - -2. Download and install the Apache VXQuery Incubating. - -$ svn checkout https://svn.apache.org/repos/asf/incubator/vxquery/trunk/ apache_vxquery_incubating -(Accept the certificate information for *.apache.org.) -$ cd apache_vxquery_incubating/vxquery -$ mvn package -DskipTests -$ cd ../.. - - -Running -======= - -There are two ways to run VXQuery: -Note: shell scripts exist for running VXQuery for Un*x like systems. - -1. Command line client (vxq) - -Run -$ sh apache_vxquery_incubating/vxquery/vxquery-cli/target/appassembler/bin/vxq -without any arguments for help on executing the command line client. - -2. XQTS test driver (xtest) - -The xtest test driver can be used to execute XQuery tests from the XQTS suite. - -Run -$ sh apache_vxquery_incubating/vxquery/vxquery-xtest/target/appassembler/bin/xtest -without any arguments for help on executing xtest. - -Typically the test suite will need extra memory to run and output can be -written in html for easy viewing. Sample Test Command: -$ JAVA_OPTS="-Xmx1024m -Djava.util.logging.config.file=/path/to/logging.properties" sh apache_vxquery_incubating/vxquery/vxquery-xtest/target/appassembler/bin/xtest -xqtsbase apache_vxquery_incubating/testsuites/XQTS/ -htmlreport /tmp/full_report.html -The result can be viewed at /tmp/full_report.html - -Note: XQTS test suite is set up as part of the Apache VXQuery setup process. http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/src/site/apt/development_benchmarks.apt ---------------------------------------------------------------------- diff --git a/src/site/apt/development_benchmarks.apt b/src/site/apt/development_benchmarks.apt new file mode 100644 index 0000000..3892fdb --- /dev/null +++ b/src/site/apt/development_benchmarks.apt @@ -0,0 +1,20 @@ +~~ 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. + +Benchmarks + +* Weather Benchmark + +* XMark Benchmark http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/src/site/apt/development_update_xqts_results.apt ---------------------------------------------------------------------- diff --git a/src/site/apt/development_update_xqts_results.apt b/src/site/apt/development_update_xqts_results.apt new file mode 100644 index 0000000..55377a7 --- /dev/null +++ b/src/site/apt/development_update_xqts_results.apt @@ -0,0 +1,54 @@ +~~ 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. + +Update the XQTS Results + + VXQuery stores the latest XQTS result for the last release. + The file can be used to verify that all the previous test still passing. + The following instructions show how to update the XQTS results file. + +* Instructions + + * Verify current XQTS results are all passing before updating to the new XQTS test results. + The following command should produce all passing results. + They can be viewed at {{{file:///tmp/full_report_previous.html}file:///tmp/full_report_previous.html}}. + +---------------------------------------- +sh ./vxquery-xtest/target/appassembler/bin/xtest -catalog vxquery-xtest/test-suites/xqts/XQTSCatalog.xml -htmlreport /tmp/full_report_previous.html -previous-test-results vxquery-xtest/results/xqts.txt +---------------------------------------- + + * Remove the old results file. + +---------------------------------------- +rm vxquery-xtest/results/xqts.txt +---------------------------------------- + + * Generate the new XQTS result file and save it in the text format. + +---------------------------------------- +sh ./vxquery-xtest/target/appassembler/bin/xtest -catalog vxquery-xtest/test-suites/xqts/XQTSCatalog.xml -textreport vxquery-xtest/results/xqts_temp.txt +---------------------------------------- + + * Sort the results so they can be compared with previous results. + +---------------------------------------- +sort vxquery-xtest/results/xqts_temp.txt --output=vxquery-xtest/results/xqts.txt +---------------------------------------- + + * Clean up (remove) the temporary results files. + +---------------------------------------- +rm vxquery-xtest/results/xqts_temp.txt +---------------------------------------- http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/src/site/apt/user_installation.apt ---------------------------------------------------------------------- diff --git a/src/site/apt/user_installation.apt b/src/site/apt/user_installation.apt index 8713c60..559b3a3 100644 --- a/src/site/apt/user_installation.apt +++ b/src/site/apt/user_installation.apt @@ -17,7 +17,7 @@ Installation * Requirements - * Apache VXQuery\x99 source archive (apache-vxquery-X.Y-incubating-source-release.zip) + * Apache VXQuery\x99 source archive (apache-vxquery-X.Y.zip) * JDK >= 1.7 @@ -26,8 +26,8 @@ Installation * Steps --- -$ unzip apache-vxquery-X.Y-incubating-source-release.zip -$ cd apache-vxquery-X.Y-incubating +$ unzip apache-vxquery-X.Y.zip +$ cd apache-vxquery-X.Y $ mvn package -DskipTests $ cd .. --- http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/src/site/apt/user_query.apt ---------------------------------------------------------------------- diff --git a/src/site/apt/user_query.apt b/src/site/apt/user_query.apt index 44621e1..b86b4dd 100644 --- a/src/site/apt/user_query.apt +++ b/src/site/apt/user_query.apt @@ -19,7 +19,7 @@ Executing a Query * Command ---------------------------------------- -sh ./apache-vxquery-X.Y-incubating/vxquery-cli/target/appassembler/bin/vxq +sh ./apache-vxquery-X.Y/vxquery-cli/target/appassembler/bin/vxq ---------------------------------------- * Command Line Options @@ -65,5 +65,5 @@ return $x/title [[i]] Command line ---------------------------------------- -JAVA_OPTS="-Xmx1024m" sh ./apache-vxquery-X.Y-incubating/vxquery-cli/target/appassembler/bin/vxq test.xq +JAVA_OPTS="-Xmx1024m" sh ./apache-vxquery-X.Y/vxquery-cli/target/appassembler/bin/vxq test.xq ---------------------------------------- http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/src/site/site.xml ---------------------------------------------------------------------- diff --git a/src/site/site.xml b/src/site/site.xml index 45f34f6..8b32624 100644 --- a/src/site/site.xml +++ b/src/site/site.xml @@ -15,60 +15,85 @@ See the License for the specific language governing permissions and limitations under the License. --> <project name="VXQuery"> - <bannerLeft> - <name>VXQuery</name> - <src>images/VXQuery.png</src> - <href>http://vxquery.apache.org/</href> - </bannerLeft> + <bannerLeft> + <name>VXQuery</name> + <src>images/VXQuery.png</src> + <href>http://vxquery.apache.org/</href> + </bannerLeft> - <bannerRight> - <name>Apache Software Foundation</name> - <src>images/asf_logo_wide.png</src> - <href>http://www.apache.org/</href> - </bannerRight> + <bannerRight> + <name>Apache Software Foundation</name> + <src>images/asf_logo_wide.png</src> + <href>http://www.apache.org/</href> + </bannerRight> - <skin> - <groupId>org.apache.maven.skins</groupId> - <artifactId>maven-fluido-skin</artifactId> - <version>1.3.1</version> - </skin> + <skin> + <groupId>org.apache.maven.skins</groupId> + <artifactId>maven-fluido-skin</artifactId> + <version>1.3.1</version> + </skin> - <body> - <menu name="Apache Software Foundation"> - <item name="Home" href="http://www.apache.org/"/> - <item name="Donate" href="http://www.apache.org/foundation/sponsorship.html"/> - <item name="Thanks" href="http://www.apache.org/foundation/thanks.html"/> - <item name="Security" href="http://www.apache.org/security/"/> - </menu> + <body> + <menu name="Apache Software Foundation"> + <item + name="Home" + href="http://www.apache.org/" /> + <item + name="Donate" + href="http://www.apache.org/foundation/sponsorship.html" /> + <item + name="Thanks" + href="http://www.apache.org/foundation/thanks.html" /> + <item + name="Security" + href="http://www.apache.org/security/" /> + </menu> - <menu name="Get VXQuery"> - <item name="Download" href="http://www.apache.org/dyn/closer.cgi/vxquery/" /> - </menu> - - <menu name="For Users"> - <item name="Installation" href="user_installation.html"/> - <item name="Executing a Query" href="user_query.html"/> - <item name="Running the Test Suite" href="user_running_tests.html"/> - </menu> + <menu name="Get VXQuery"> + <item + name="Download" + href="http://www.apache.org/dyn/closer.cgi/vxquery/" /> + </menu> - <menu name="For Developers"> - <item name="Data Basic Types" href="development_tips.html"/> - <item name="Data XML and Node Types" href="development_xml_node_details.html"/> - <item name="Eclipse Setup" href="development_eclipse_setup.html"/> - <item name="Release steps" href="release.html"/> - </menu> + <menu name="For Users"> + <item + name="Installation" + href="user_installation.html" /> + <item + name="Executing a Query" + href="user_query.html" /> + <item + name="Running the Test Suite" + href="user_running_tests.html" /> + </menu> - <menu ref="reports"/> - <menu ref="modules"/> + <menu name="For Developers"> + <item + name="Data Basic Types" + href="development_tips.html" /> + <item + name="Data XML and Node Types" + href="development_xml_node_details.html" /> + <item + name="Eclipse Setup" + href="development_eclipse_setup.html" /> + <item + name="Release steps" + href="release.html" /> + </menu> - <footer> - <div class="row-fluid">Apache VXQuery, VXQuery, Apache, the Apache - feather logo, and the Apache VXQuery project logo are either - registered trademarks or trademarks of The Apache Software - Foundation in the United States and other countries. - All other marks mentioned may be trademarks or registered - trademarks of their respective owners.</div> - </footer> - </body> + <menu ref="reports" /> + <menu ref="modules" /> + + <footer> + <div class="row-fluid">Apache VXQuery, VXQuery, Apache, the Apache + feather logo, and the Apache VXQuery project logo are either + registered trademarks or trademarks of The Apache Software + Foundation in the United States and other countries. + All other marks mentioned may be trademarks or registered + trademarks of their respective owners. + </div> + </footer> + </body> </project> http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/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 ca91636..fdf2b05 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 @@ -19,6 +19,7 @@ import java.io.IOException; import java.io.PrintWriter; import java.io.StringReader; import java.nio.ByteBuffer; +import java.nio.file.Files; import java.util.ArrayList; import java.util.Date; import java.util.EnumSet; @@ -388,7 +389,7 @@ public class VXQuery { ncConfig.dataIPAddress = "127.0.0.1"; ncConfig.datasetIPAddress = "127.0.0.1"; ncConfig.nodeId = "nc" + (i + 1); - ncConfig.ioDevices = "/tmp"; + ncConfig.ioDevices = Files.createTempDirectory(ncConfig.nodeId).toString(); ncs[i] = new NodeControllerService(ncConfig); ncs[i].start(); } http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/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 12b0780..d551932 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,19 +20,17 @@ 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.DelayMaterializationForJoinProbeRule; -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; import org.apache.vxquery.compiler.rewriter.rules.ConvertAssignToUnnestRule; +import org.apache.vxquery.compiler.rewriter.rules.ConvertFromAlgebricksExpressionsRule; +import org.apache.vxquery.compiler.rewriter.rules.ConvertToAlgebricksExpressionsRule; import org.apache.vxquery.compiler.rewriter.rules.EliminateSubplanForSingleItemsRule; import org.apache.vxquery.compiler.rewriter.rules.EliminateUnnestAggregateSequencesRule; import org.apache.vxquery.compiler.rewriter.rules.EliminateUnnestAggregateSubplanRule; +import org.apache.vxquery.compiler.rewriter.rules.InlineNestedVariablesRule; import org.apache.vxquery.compiler.rewriter.rules.IntroduceCollectionRule; import org.apache.vxquery.compiler.rewriter.rules.IntroduceTwoStepAggregateRule; +import org.apache.vxquery.compiler.rewriter.rules.PushChildIntoDataScanRule; import org.apache.vxquery.compiler.rewriter.rules.PushFunctionsOntoEqJoinBranches; import org.apache.vxquery.compiler.rewriter.rules.RemoveRedundantBooleanExpressionsRule; import org.apache.vxquery.compiler.rewriter.rules.RemoveRedundantCastExpressionsRule; @@ -43,7 +41,6 @@ import org.apache.vxquery.compiler.rewriter.rules.RemoveUnusedSortDistinctNodesR import org.apache.vxquery.compiler.rewriter.rules.RemoveUnusedTreatRule; import org.apache.vxquery.compiler.rewriter.rules.SetCollectionDataSourceRule; import org.apache.vxquery.compiler.rewriter.rules.SetVariableIdContextRule; -import org.apache.vxquery.compiler.rewriter.rules.VXQueryExtractCommonOperatorsRule; import edu.uci.ics.hyracks.algebricks.core.rewriter.base.HeuristicOptimizer; import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule; http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/DelayMaterializationForJoinProbeRule.java ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/DelayMaterializationForJoinProbeRule.java b/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/DelayMaterializationForJoinProbeRule.java deleted file mode 100644 index 341b7ec..0000000 --- a/vxquery-core/src/main/java/org/apache/vxquery/compiler/rewriter/rules/DelayMaterializationForJoinProbeRule.java +++ /dev/null @@ -1,142 +0,0 @@ -/* - * 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 org.apache.commons.lang3.mutable.Mutable; -import org.apache.commons.lang3.mutable.MutableObject; - -import edu.uci.ics.hyracks.algebricks.common.exceptions.AlgebricksException; -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.LogicalOperatorTag; -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.AbstractLogicalOperator.ExecutionMode; -import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.ExchangeOperator; -import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.MaterializeOperator; -import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.ReplicateOperator; -import edu.uci.ics.hyracks.algebricks.core.algebra.operators.logical.visitors.IsomorphismUtilities; -import edu.uci.ics.hyracks.algebricks.core.algebra.operators.physical.MaterializePOperator; -import edu.uci.ics.hyracks.algebricks.core.algebra.operators.physical.OneToOneExchangePOperator; -import edu.uci.ics.hyracks.algebricks.core.algebra.operators.physical.ReplicatePOperator; -import edu.uci.ics.hyracks.algebricks.core.rewriter.base.IAlgebraicRewriteRule; - -public class DelayMaterializationForJoinProbeRule 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 - && op.getOperatorTag() != LogicalOperatorTag.LEFTOUTERJOIN) { - return false; - } - - AbstractBinaryJoinOperator abjo = (AbstractBinaryJoinOperator) op; - if (abjo.getInputs().size() != 2) { - return false; - } - - Mutable<ILogicalOperator> branchProbeRO = findReplicateOperator(abjo.getInputs().get(0)); - Mutable<ILogicalOperator> branchBuildRO = findReplicateOperator(abjo.getInputs().get(1)); - if (branchBuildRO == null || branchBuildRO == null - || !IsomorphismUtilities.isOperatorIsomorphic(branchProbeRO.getValue(), branchBuildRO.getValue())) { - return false; - } - - // Turn off materialization in replicate operator. - boolean found = false; - ReplicateOperator ro = (ReplicateOperator) branchProbeRO.getValue(); - boolean[] outputMaterializationFlags = ro.getOutputMaterializationFlags(); - for (int i = 0; i < outputMaterializationFlags.length; ++i) { - if (outputMaterializationFlags[i]) { - found = true; - outputMaterializationFlags[i] = false; - } - } - if (!found) { - return false; - } - ro.setOutputMaterializationFlags(outputMaterializationFlags); - - // Set up references to one level down - Mutable<ILogicalOperator> parentOp = abjo.getInputs().get(0); - Mutable<ILogicalOperator> childOpRef = parentOp; - parentOp = parentOp.getValue().getInputs().get(0); - - // New plan operators - AbstractLogicalOperator exchange = new ExchangeOperator(); - exchange.setPhysicalOperator(new OneToOneExchangePOperator()); - exchange.setExecutionMode(ExecutionMode.PARTITIONED); - MutableObject<ILogicalOperator> exchangeRef = new MutableObject<ILogicalOperator>(exchange); - exchange.getInputs().add(parentOp); - - MaterializeOperator mop = new - MaterializeOperator(); - mop.setPhysicalOperator(new MaterializePOperator(false)); - mop.setExecutionMode(ExecutionMode.PARTITIONED); - Mutable<ILogicalOperator> mopRef = new MutableObject<ILogicalOperator>(mop); - mop.getInputs().add(exchangeRef); - AbstractLogicalOperator childOp = (AbstractLogicalOperator) childOpRef.getValue(); - childOp.getInputs().set(0, mopRef); - -// boolean[] materializeFlag = new boolean[1]; -// materializeFlag[0] = true; -// ReplicateOperator rop = new ReplicateOperator(1, materializeFlag); -// rop.setPhysicalOperator(new ReplicatePOperator()); -// rop.setExecutionMode(ExecutionMode.PARTITIONED); -// Mutable<ILogicalOperator> ropRef = new MutableObject<ILogicalOperator>(rop); -// rop.getInputs().add(exchangeRef); -// -// // Output -// rop.getOutputs().add(childOpRef); -// AbstractLogicalOperator childOp = (AbstractLogicalOperator) childOpRef.getValue(); -// childOp.getInputs().set(0, ropRef); - - context.computeAndSetTypeEnvironmentForOperator(exchange); - context.computeAndSetTypeEnvironmentForOperator(mop); - context.computeAndSetTypeEnvironmentForOperator(childOp); - return true; - } - - private Mutable<ILogicalOperator> findReplicateOperator(Mutable<ILogicalOperator> input) { - AbstractLogicalOperator op = (AbstractLogicalOperator) input.getValue(); - if (op.getOperatorTag() == LogicalOperatorTag.REPLICATE) { - return input; - } - if (op.getInputs().size() == 1) { - return findReplicateOperator(op.getInputs().get(0)); - } - return null; - } - -// private void updateBranchContext(Mutable<ILogicalOperator> input, IOptimizationContext context) -// throws AlgebricksException { -// AbstractLogicalOperator op = (AbstractLogicalOperator) input.getValue(); -// if (op.getOperatorTag() != LogicalOperatorTag.REPLICATE) { -// updateBranchContext(op.getInputs().get(0), context); -// } -// op.setExecutionMode(ExecutionMode.PARTITIONED); -// // context.invalidateTypeEnvironmentForOperator(op); -// context.computeAndSetTypeEnvironmentForOperator(op); -// op.computeOutputTypeEnvironment(context); -// } - -} http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/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 b05e27f..f60d9bd 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) { - ov = Math.round(ov / Math.pow(10, diff)); + ov = (long) (ov * Math.pow(10, diff)); } else if (diff < 0) { - v = Math.round(v / Math.pow(10, diff)); + v = (long) (v * Math.pow(10, Math.abs(diff))); } return v < ov ? -1 : (v > ov ? 1 : 0); http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/nodes/UTF8StringBuilder.java ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/nodes/UTF8StringBuilder.java b/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/nodes/UTF8StringBuilder.java deleted file mode 100644 index 3b4eea0..0000000 --- a/vxquery-core/src/main/java/org/apache/vxquery/datamodel/builders/nodes/UTF8StringBuilder.java +++ /dev/null @@ -1,53 +0,0 @@ -/* - * 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.datamodel.builders.nodes; - -import java.io.DataOutput; -import java.io.IOException; -import java.io.UTFDataFormatException; - -import org.apache.vxquery.runtime.functions.util.FunctionHelper; - -import edu.uci.ics.hyracks.data.std.api.IMutableValueStorage; -import edu.uci.ics.hyracks.data.std.primitive.BytePointable; - -public class UTF8StringBuilder extends AbstractNodeBuilder { - private IMutableValueStorage mvs; - private DataOutput out; - - @Override - public void reset(IMutableValueStorage mvs) throws IOException { - this.mvs = mvs; - out = mvs.getDataOutput(); - out.write(0); - out.write(0); - } - - @Override - public void finish() throws IOException { - int utflen = mvs.getLength() - 2; - BytePointable.setByte(mvs.getByteArray(), 0, (byte) ((utflen >>> 8) & 0xFF)); - BytePointable.setByte(mvs.getByteArray(), 1, (byte) ((utflen >>> 0) & 0xFF)); - } - - public void appendCharArray(char[] ch, int start, int length) throws IOException { - FunctionHelper.writeCharArray(ch, start, length, out); - if (mvs.getLength() > 65535) { - throw new UTFDataFormatException("encoded string too long: " + mvs.getLength() + " bytes"); - } - } -} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/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 0599ea9..60bfb51 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 @@ -118,7 +118,7 @@ public class VXQueryMetadataProvider implements IMetadataProvider<String, String public Pair<IPushRuntimeFactory, AlgebricksPartitionConstraint> getWriteFileRuntime(IDataSink sink, int[] printColumns, IPrinterFactory[] printerFactories, RecordDescriptor inputDesc) throws AlgebricksException { - return null; + throw new UnsupportedOperationException(); } @Override @@ -126,7 +126,7 @@ public class VXQueryMetadataProvider implements IMetadataProvider<String, String IDataSource<String> dataSource, IOperatorSchema propagatedSchema, List<LogicalVariable> keys, LogicalVariable payLoadVar, List<LogicalVariable> additionalNonKeyFields, JobGenContext context, JobSpecification jobSpec) throws AlgebricksException { - return null; + throw new UnsupportedOperationException(); } @Override @@ -134,7 +134,7 @@ public class VXQueryMetadataProvider implements IMetadataProvider<String, String IOperatorSchema propagatedSchema, IVariableTypeEnvironment typeEnv, List<LogicalVariable> keys, LogicalVariable payLoadVar, List<LogicalVariable> additionalNonKeyFields, RecordDescriptor recordDesc, JobGenContext context, JobSpecification jobSpec) throws AlgebricksException { - return null; + throw new UnsupportedOperationException(); } @Override @@ -144,7 +144,7 @@ public class VXQueryMetadataProvider implements IMetadataProvider<String, String List<LogicalVariable> secondaryKeys, List<LogicalVariable> additionalNonKeyFields, ILogicalExpression filterExpr, RecordDescriptor recordDesc, JobGenContext context, JobSpecification spec) throws AlgebricksException { - return null; + throw new UnsupportedOperationException(); } @Override @@ -195,7 +195,7 @@ public class VXQueryMetadataProvider implements IMetadataProvider<String, String IOperatorSchema propagatedSchema, IVariableTypeEnvironment typeEnv, List<LogicalVariable> keys, LogicalVariable payLoadVar, List<LogicalVariable> additionalNonKeyFields, RecordDescriptor recordDesc, JobGenContext context, JobSpecification jobSpec, boolean bulkload) throws AlgebricksException { - return null; + throw new UnsupportedOperationException(); } @Override @@ -205,7 +205,7 @@ public class VXQueryMetadataProvider implements IMetadataProvider<String, String List<LogicalVariable> secondaryKeys, List<LogicalVariable> additionalNonKeyFields, ILogicalExpression filterExpr, RecordDescriptor recordDesc, JobGenContext context, JobSpecification spec, boolean bulkload) throws AlgebricksException { - return null; + throw new UnsupportedOperationException(); } @Override @@ -214,7 +214,7 @@ public class VXQueryMetadataProvider implements IMetadataProvider<String, String IOperatorSchema[] inputSchemas, IVariableTypeEnvironment typeEnv, List<LogicalVariable> primaryKeys, List<LogicalVariable> secondaryKeys, ILogicalExpression filterExpr, RecordDescriptor recordDesc, JobGenContext context, JobSpecification spec, boolean bulkload) throws AlgebricksException { - return null; + throw new UnsupportedOperationException(); } } \ No newline at end of file http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinAggregateEvaluatorFactory.java ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinAggregateEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinAggregateEvaluatorFactory.java index 1278e63..ba31783 100644 --- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinAggregateEvaluatorFactory.java +++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinAggregateEvaluatorFactory.java @@ -47,7 +47,7 @@ public abstract class AbstractMaxMinAggregateEvaluatorFactory extends } protected IAggregateEvaluator createEvaluator(IScalarEvaluator[] args) throws AlgebricksException { - final AbstractValueComparisonOperation aOp = createValueComparisonOperation(); + final AbstractValueComparisonOperation aOpComparison = createValueComparisonOperation(); final TaggedValuePointable tvp2 = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable(); final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable(); final TypedPointables tp1 = new TypedPointables(); @@ -92,7 +92,9 @@ public abstract class AbstractMaxMinAggregateEvaluatorFactory extends if (count != 0) { tvp2.set(abvs.getByteArray(), abvs.getStartOffset(), abvs.getLength()); } - if (count == 0 || FunctionHelper.transformThenCompareMinMaxTaggedValues(aOp, tvp1, tvp2, dCtx, tp1, tp2)) { + if (count == 0 + || FunctionHelper.transformThenCompareMinMaxTaggedValues(aOpComparison, tvp1, tvp2, dCtx, + tp1, tp2)) { try { abvs.reset(); dOut.write(tvp1.getByteArray(), tvp1.getStartOffset(), tvp1.getLength()); http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinScalarEvaluatorFactory.java ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinScalarEvaluatorFactory.java index 5f91cd9..b2aa0b9 100644 --- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinScalarEvaluatorFactory.java +++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/AbstractMaxMinScalarEvaluatorFactory.java @@ -47,7 +47,7 @@ public abstract class AbstractMaxMinScalarEvaluatorFactory extends AbstractTagge throws AlgebricksException { final DynamicContext dCtx = (DynamicContext) ctx.getJobletContext().getGlobalJobData(); final SequencePointable seqp = (SequencePointable) SequencePointable.FACTORY.createPointable(); - final AbstractValueComparisonOperation aOp = createValueComparisonOperation(); + final AbstractValueComparisonOperation aOpComparison = createValueComparisonOperation(); final TaggedValuePointable tvpReturn = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable(); final TaggedValuePointable tvpNext = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable(); final VoidPointable p = (VoidPointable) VoidPointable.FACTORY.createPointable(); @@ -72,7 +72,8 @@ public abstract class AbstractMaxMinScalarEvaluatorFactory extends AbstractTagge // Init. tvpReturn.set(tvpNext); } - if (FunctionHelper.transformThenCompareMinMaxTaggedValues(aOp, tvpNext, tvpReturn, dCtx, tp1, tp2)) { + if (FunctionHelper.transformThenCompareMinMaxTaggedValues(aOpComparison, tvpNext, + tvpReturn, dCtx, tp1, tp2)) { tvpReturn.set(tvpNext); } } http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/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 index 8d589ed..00756bf 100644 --- 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 @@ -51,9 +51,9 @@ public class AvgGlobalAggregateEvaluatorFactory extends AbstractTaggedValueArgum final DataOutput dOutCount = abvsCount.getDataOutput(); final ArrayBackedValueStorage abvsSum = new ArrayBackedValueStorage(); final DataOutput dOutSum = abvsSum.getDataOutput(); - final AddOperation aOp = new AddOperation(); - final ArithmeticHelper add1 = new ArithmeticHelper(aOp, dCtx); - final ArithmeticHelper add2 = new ArithmeticHelper(aOp, dCtx); + final AddOperation aOpAdd = new AddOperation(); + final ArithmeticHelper add1 = new ArithmeticHelper(aOpAdd, dCtx); + final ArithmeticHelper add2 = new ArithmeticHelper(aOpAdd, dCtx); final DivideOperation aOpDivide = new DivideOperation(); final ArithmeticHelper divide = new ArithmeticHelper(aOpDivide, dCtx); final LongPointable longp = (LongPointable) LongPointable.FACTORY.createPointable(); http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/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 6eac723..010b96f 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 @@ -51,8 +51,8 @@ public class AvgLocalAggregateEvaluatorFactory extends AbstractTaggedValueArgume final DataOutput dOutSum = abvsSum.getDataOutput(); final ArrayBackedValueStorage abvsSeq = new ArrayBackedValueStorage(); final SequenceBuilder sb = new SequenceBuilder(); - final AddOperation aOp = new AddOperation(); - final ArithmeticHelper add = new ArithmeticHelper(aOp, dCtx); + final AddOperation aOpAdd = new AddOperation(); + final ArithmeticHelper add = new ArithmeticHelper(aOpAdd, dCtx); return new AbstractTaggedValueArgumentAggregateEvaluator(args) { long count; http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/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 5717174..6489fe3 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 @@ -51,8 +51,8 @@ public class FnAvgAggregateEvaluatorFactory extends AbstractTaggedValueArgumentA final DataOutput dOutSum = abvsSum.getDataOutput(); final ArrayBackedValueStorage abvsCount = new ArrayBackedValueStorage(); final DataOutput dOutCount = abvsCount.getDataOutput(); - final AddOperation aOp = new AddOperation(); - final ArithmeticHelper add = new ArithmeticHelper(aOp, dCtx); + final AddOperation aOpAdd = new AddOperation(); + final ArithmeticHelper add = new ArithmeticHelper(aOpAdd, dCtx); final DivideOperation aOpDivide = new DivideOperation(); final ArithmeticHelper divide = new ArithmeticHelper(aOpDivide, dCtx); http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/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 31fcecc..daa7715 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 @@ -55,8 +55,8 @@ public class FnAvgScalarEvaluatorFactory extends AbstractTaggedValueArgumentScal final TaggedValuePointable tvpCount = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable(); final ArrayBackedValueStorage abvs = new ArrayBackedValueStorage(); final DataOutput dOut = abvs.getDataOutput(); - final AddOperation aOp = new AddOperation(); - final ArithmeticHelper add = new ArithmeticHelper(aOp, dCtx); + final AddOperation aOpAdd = new AddOperation(); + final ArithmeticHelper add = new ArithmeticHelper(aOpAdd, dCtx); final DivideOperation aOpDivide = new DivideOperation(); final ArithmeticHelper divide = new ArithmeticHelper(aOpDivide, dCtx); http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/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 631b575..6e96fe7 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 @@ -45,8 +45,8 @@ public class FnSumAggregateEvaluatorFactory extends AbstractTaggedValueArgumentA protected IAggregateEvaluator createEvaluator(IScalarEvaluator[] args) throws AlgebricksException { final ArrayBackedValueStorage abvsSum = new ArrayBackedValueStorage(); final DataOutput dOutSum = abvsSum.getDataOutput(); - final AddOperation aOp = new AddOperation(); - final ArithmeticHelper add = new ArithmeticHelper(aOp, dCtx); + final AddOperation aOpAdd = new AddOperation(); + final ArithmeticHelper add = new ArithmeticHelper(aOpAdd, dCtx); return new AbstractTaggedValueArgumentAggregateEvaluator(args) { TaggedValuePointable tvpSum = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable(); http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumScalarEvaluatorFactory.java ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumScalarEvaluatorFactory.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumScalarEvaluatorFactory.java index e70efbe..2088e1f 100644 --- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumScalarEvaluatorFactory.java +++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/aggregate/FnSumScalarEvaluatorFactory.java @@ -54,8 +54,8 @@ public class FnSumScalarEvaluatorFactory extends AbstractTaggedValueArgumentScal final TaggedValuePointable tvpNext = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable(); final TaggedValuePointable tvpSum = (TaggedValuePointable) TaggedValuePointable.FACTORY.createPointable(); final VoidPointable p = (VoidPointable) VoidPointable.FACTORY.createPointable(); - final AddOperation aOp = new AddOperation(); - final ArithmeticHelper add = new ArithmeticHelper(aOp, dCtx); + final AddOperation aOpAdd = new AddOperation(); + final ArithmeticHelper add = new ArithmeticHelper(aOpAdd, dCtx); return new AbstractTaggedValueArgumentScalarEvaluator(args) { @Override http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/FnFloorOperation.java ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/FnFloorOperation.java b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/FnFloorOperation.java index 9501d21..a8675e7 100644 --- a/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/FnFloorOperation.java +++ b/vxquery-core/src/main/java/org/apache/vxquery/runtime/functions/numeric/FnFloorOperation.java @@ -32,8 +32,8 @@ public class FnFloorOperation extends AbstractNumericOperation { @Override public void operateDecimal(XSDecimalPointable decp, DataOutput dOut) throws SystemException, IOException { dOut.write(ValueTag.XS_DECIMAL_TAG); - dOut.write(decp.getDecimalPlace()); - dOut.writeLong((long) Math.floor(decp.getDecimalValue())); + dOut.write(0); + dOut.writeLong(decp.getBeforeDecimalPlace()); } @Override http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/SAXContentHandler.java ---------------------------------------------------------------------- diff --git a/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/SAXContentHandler.java b/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/SAXContentHandler.java index d4d3bd1..296d062 100644 --- a/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/SAXContentHandler.java +++ b/vxquery-core/src/main/java/org/apache/vxquery/xmlparser/SAXContentHandler.java @@ -31,7 +31,6 @@ import org.apache.vxquery.datamodel.builders.nodes.DocumentNodeBuilder; import org.apache.vxquery.datamodel.builders.nodes.ElementNodeBuilder; import org.apache.vxquery.datamodel.builders.nodes.PINodeBuilder; import org.apache.vxquery.datamodel.builders.nodes.TextNodeBuilder; -import org.apache.vxquery.datamodel.builders.nodes.UTF8StringBuilder; import org.apache.vxquery.datamodel.values.ValueTag; import org.apache.vxquery.types.BuiltinTypeQNames; import org.apache.vxquery.types.ElementType; http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-server/src/main/resources/scripts/startcc.sh ---------------------------------------------------------------------- diff --git a/vxquery-server/src/main/resources/scripts/startcc.sh b/vxquery-server/src/main/resources/scripts/startcc.sh index 44b08eb..281c0d6 100755 --- a/vxquery-server/src/main/resources/scripts/startcc.sh +++ b/vxquery-server/src/main/resources/scripts/startcc.sh @@ -51,15 +51,13 @@ mkdir -p ${CCLOGS_DIR} # Set up the options for the cc. CC_OPTIONS=" -client-net-ip-address ${CCHOST} -cluster-net-ip-address ${CCHOST} " -if [ ! -z "${CCPORT}" ] -then +[ "${CCPORT}" ] { CC_OPTIONS=" ${CC_OPTIONS} -client-net-port ${CCPORT} " -fi +} -if [ ! -z "${CCOPTS}" ] -then - CC_OPTIONS=" ${CC_OPTIONS} ${CCOPTS} " -fi +[ "$CCOPTS" ] && { + CC_OPTIONS=" ${CC_OPTIONS} ${CCOPTS}" +} echo "${JAVA_OPTS}" &> ${CCLOGS_DIR}/cc.log http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-server/src/main/resources/scripts/startnc.sh ---------------------------------------------------------------------- diff --git a/vxquery-server/src/main/resources/scripts/startnc.sh b/vxquery-server/src/main/resources/scripts/startnc.sh index 7d944f0..acf62c0 100755 --- a/vxquery-server/src/main/resources/scripts/startnc.sh +++ b/vxquery-server/src/main/resources/scripts/startnc.sh @@ -53,15 +53,13 @@ mkdir -p $NCLOGS_DIR # Set up the options for the cc. NC_OPTIONS=" -cc-host ${CCHOST} -cluster-net-ip-address ${IPADDR} -data-ip-address ${IPADDR} -result-ip-address ${IPADDR} -node-id ${NODEID} " -if [ ! -z "${CCPORT}" ] -then +[ "${CCPORT}" ] { NC_OPTIONS=" ${NC_OPTIONS} -cc-port ${CCPORT} " -fi +} -if [ ! -z "${NCOPTS}" ] -then +[ "${NCOPTS}" ] { NC_OPTIONS=" ${NC_OPTIONS} ${NCOPTS} " -fi +} echo "${JAVA_OPTS}" &> ${NCLOGS_DIR}/nc.log http://git-wip-us.apache.org/repos/asf/vxquery/blob/fccce23d/vxquery-xtest/results/README.md ---------------------------------------------------------------------- diff --git a/vxquery-xtest/results/README.md b/vxquery-xtest/results/README.md index 59e3a0a..229606b 100644 --- a/vxquery-xtest/results/README.md +++ b/vxquery-xtest/results/README.md @@ -17,5 +17,6 @@ = XQTS Text Results = -The xqts.txt file holds the results from running the XQTS tests. The results -have been sorted through the linux sort command. \ No newline at end of file +The xqts.txt file holds the sorted results from running the XQTS tests. + +Check the Apache VXQuery website for instructions on how to update this file. \ No newline at end of file
