Rewrite SQL++ functions.
-Maps SQL function names to internal names.
-Allows SQL++ builtin functions to be case-insensitive.
-Rewrites SQL-92 global aggregates.
-Refactors SQL++ AST visitors.
-Cleans up semantics of COLL_AGG and SQL-92 AGG.
Change-Id: Idb5a7c6780669b27065b0928bec7e4700cfb53a9
Reviewed-on: https://asterix-gerrit.ics.uci.edu/759
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Till Westmann <tillw@apache.org>
diff --git a/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml b/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
index f5bb7ce..f9d1a0e 100644
--- a/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -2253,6 +2253,51 @@
</compilation-unit>
</test-case>
</test-group> -->
+ <test-group name="global-aggregate">
+ <test-case FilePath="global-aggregate">
+ <compilation-unit name="q01">
+ <output-dir compare="Text">q01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="global-aggregate">
+ <compilation-unit name="q02">
+ <output-dir compare="Text">q02</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="global-aggregate">
+ <compilation-unit name="q03">
+ <output-dir compare="Text">q01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="global-aggregate">
+ <compilation-unit name="q04">
+ <output-dir compare="Text">q01</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="global-aggregate">
+ <compilation-unit name="q05_error">
+ <output-dir compare="Text">q01</output-dir>
+ <expected-error>org.apache.hyracks.algebricks.common.exceptions.AlgebricksException: Unsupported type</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="global-aggregate">
+ <compilation-unit name="q06_error">
+ <output-dir compare="Text">q01</output-dir>
+ <expected-error>Caused by: org.apache.asterix.common.exceptions.AsterixException: Unsupported type: STRING</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="global-aggregate">
+ <compilation-unit name="q07_error">
+ <output-dir compare="Text">q01</output-dir>
+ <expected-error>org.apache.asterix.common.exceptions.AsterixException: COUNT is a SQL-92 aggregate function. The SQL++ core aggregate function coll_count could potentially express the intent.</expected-error>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="global-aggregate">
+ <compilation-unit name="q08">
+ <output-dir compare="Text">q08</output-dir>
+ </compilation-unit>
+ </test-case>
+ </test-group>
<test-group name="group-by">
<test-case FilePath="group-by">
<compilation-unit name="core-01">