Murtadha Hubail has uploaded this change for review. ( https://asterix-gerrit.ics.uci.edu/3354
Change subject: [ASTERIXDB-2553][SQL] Make DIV and MOD Operators Case Insensitive ...................................................................... [ASTERIXDB-2553][SQL] Make DIV and MOD Operators Case Insensitive - user model changes: yes - storage format changes: no - interface changes: no Details: - Make DIV and MOD operators case insensitive. - Add test case. Change-Id: I3f28a8324aeedcb05bef628751f1ff8e33ee08a0 --- M asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml A asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/numeric/div_mod_case_insensitive/div_mod_case_insensitive.1.query.sqlpp A asterixdb/asterix-app/src/test/resources/runtimets/results/numeric/div_mod_case_insensitive/div_mod_case_insensitive.1.adm M asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml M asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj 5 files changed, 32 insertions(+), 2 deletions(-) git pull ssh://asterix-gerrit.ics.uci.edu:29418/asterixdb refs/changes/54/3354/1 diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml b/asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml index 334dd52..8c03ecf 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml +++ b/asterixdb/asterix-app/src/test/resources/runtimets/only_sqlpp.xml @@ -19,5 +19,10 @@ !--> <test-suite xmlns="urn:xml.testframework.asterix.apache.org" ResultOffsetPath="results" QueryOffsetPath="queries_sqlpp" QueryFileExtension=".sqlpp"> <test-group name="failed"> + <test-case FilePath="numeric"> + <compilation-unit name="div_mod_case_insensitive"> + <output-dir compare="Text">div_mod_case_insensitive</output-dir> + </compilation-unit> + </test-case> </test-group> </test-suite> diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/numeric/div_mod_case_insensitive/div_mod_case_insensitive.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/numeric/div_mod_case_insensitive/div_mod_case_insensitive.1.query.sqlpp new file mode 100644 index 0000000..4e4ff57 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/numeric/div_mod_case_insensitive/div_mod_case_insensitive.1.query.sqlpp @@ -0,0 +1,19 @@ +/* + * 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 10 DIV 1 MOD 1 div 10 mod 1; diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/numeric/div_mod_case_insensitive/div_mod_case_insensitive.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/numeric/div_mod_case_insensitive/div_mod_case_insensitive.1.adm new file mode 100644 index 0000000..c227083 --- /dev/null +++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/numeric/div_mod_case_insensitive/div_mod_case_insensitive.1.adm @@ -0,0 +1 @@ +0 \ No newline at end of file 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 5bb25f8..50793df 100644 --- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml +++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml @@ -6849,6 +6849,11 @@ </compilation-unit> </test-case> <test-case FilePath="numeric"> + <compilation-unit name="div_mod_case_insensitive"> + <output-dir compare="Text">div_mod_case_insensitive</output-dir> + </compilation-unit> + </test-case> + <test-case FilePath="numeric"> <compilation-unit name="floor0"> <output-dir compare="Text">floor0</output-dir> </compilation-unit> diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj index 765e97b..f817f17 100644 --- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj +++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj @@ -3606,6 +3606,7 @@ | <DESC : "desc"> | <DISCONNECT : "disconnect"> | <DISTINCT : "distinct"> + | <DIV : "div"> | <DROP : "drop"> | <ELEMENT : "element"> | <EXPLAIN : "explain"> @@ -3647,6 +3648,7 @@ | <LIKE : "like"> | <LIMIT : "limit"> | <LOAD : "load"> + | <MOD : "mod"> | <NODEGROUP : "nodegroup"> | <NGRAM : "ngram"> | <NOT : "not"> @@ -3700,9 +3702,7 @@ <CARET : "^"> | <CONCAT : "||"> | <DIVIDE : "/"> - | <DIV : "div"> | <MINUS : "-"> - | <MOD : "mod"> | <MUL : "*"> | <PLUS : "+"> -- To view, visit https://asterix-gerrit.ics.uci.edu/3354 To unsubscribe, visit https://asterix-gerrit.ics.uci.edu/settings Gerrit-Project: asterixdb Gerrit-Branch: master Gerrit-MessageType: newchange Gerrit-Change-Id: I3f28a8324aeedcb05bef628751f1ff8e33ee08a0 Gerrit-Change-Number: 3354 Gerrit-PatchSet: 1 Gerrit-Owner: Murtadha Hubail <[email protected]>
