asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ti...@apache.org
Subject asterixdb git commit: fix error message for union with set semantics
Date Fri, 30 Sep 2016 15:29:12 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 2685b60d9 -> 8053af8a8


fix error message for union with set semantics

Change-Id: I2b69ab843795221ef5c9a533839ed6d359b7c8e3
Reviewed-on: https://asterix-gerrit.ics.uci.edu/1229
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>
Sonar-Qube: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Integration-Tests: Jenkins <jenkins@fulliautomatix.ics.uci.edu>


Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/8053af8a
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/8053af8a
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/8053af8a

Branch: refs/heads/master
Commit: 8053af8a80d650fd9981ee0abc37e927972719d6
Parents: 2685b60
Author: Till Westmann <tillw@apache.org>
Authored: Thu Sep 29 23:46:26 2016 -0700
Committer: Till Westmann <tillw@apache.org>
Committed: Fri Sep 30 08:28:21 2016 -0700

----------------------------------------------------------------------
 .../SqlppExpressionToPlanTranslator.java        |  2 +-
 .../union_negative_3.1.query.sqlpp              | 20 ++++++++++++++++++++
 .../resources/runtimets/testsuite_sqlpp.xml     |  6 ++++++
 3 files changed, 27 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/8053af8a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
index f2ba140..2e79225 100644
--- a/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
+++ b/asterixdb/asterix-algebra/src/main/java/org/apache/asterix/translator/SqlppExpressionToPlanTranslator.java
@@ -194,7 +194,7 @@ class SqlppExpressionToPlanTranslator extends LangExpressionToPlanTranslator
imp
             SetOpType setOpType = setOperationRight.getSetOpType();
             if (setOpType != SetOpType.UNION || setOperationRight.isSetSemantics()) {
                 throw new AsterixException("Operation " + setOpType
-                        + (setOperationRight.isSetSemantics() ? "with set semantics" : "ALL")
+ " is not supported.");
+                        + (setOperationRight.isSetSemantics() ? " with set semantics" : "ALL")
+ " is not supported.");
             }
             SetOperationInput rightInput = setOperationRight.getSetOperationRightInput();
             inputExprs.add(rightInput.selectBlock()

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/8053af8a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/union/union_negative_3/union_negative_3.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/union/union_negative_3/union_negative_3.1.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/union/union_negative_3/union_negative_3.1.query.sqlpp
new file mode 100644
index 0000000..297edd6
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/union/union_negative_3/union_negative_3.1.query.sqlpp
@@ -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.
+ */
+
+select value 1 union select value 1;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/8053af8a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index 0aeca6c..2838f1f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -8134,6 +8134,12 @@
       </compilation-unit>
     </test-case>
     <test-case FilePath="union">
+      <compilation-unit name="union_negative_3">
+        <output-dir compare="Text">union</output-dir>
+        <expected-error>Operation UNION with set semantics is not supported.</expected-error>
+      </compilation-unit>
+    </test-case>
+    <test-case FilePath="union">
       <compilation-unit name="union_orderby">
         <output-dir compare="Text">union_orderby</output-dir>
       </compilation-unit>


Mime
View raw message