asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject [12/34] incubator-asterixdb git commit: SQL++ support in AsterixDB: 1. implemented SQL++ expression to logical plan translator; 2. refactored REST API to be agnostic of query languages; 3. disabled fuzzy join queries for SQL++ runtime tests; 4. fixed sev
Date Tue, 17 Nov 2015 00:56:44 GMT
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf05/udf05.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf05/udf05.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf05/udf05.1.ddl.sqlpp
index abf4af3..82bafda 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf05/udf05.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf05/udf05.1.ddl.sqlpp
@@ -22,3 +22,11 @@
  * Date         : Sep 4th 2012
  */
 
+
+drop database test if exists;
+create database test;
+use test;
+
+create function test.echo(a){
+a
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf06/udf06.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf06/udf06.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf06/udf06.1.ddl.sqlpp
index befcd67..0d41cd2 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf06/udf06.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf06/udf06.1.ddl.sqlpp
@@ -22,3 +22,12 @@
  * Date         : 4th September 2012
  */
 
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.echo(a){
+a
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf07/udf07.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf07/udf07.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf07/udf07.1.ddl.sqlpp
index ae66d5d..5078a03 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf07/udf07.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf07/udf07.1.ddl.sqlpp
@@ -22,3 +22,11 @@
  * Date         : Sep 4th 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.echo(a){
+a
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf08/udf08.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf08/udf08.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf08/udf08.1.ddl.sqlpp
index 36bf955..f70a1eb 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf08/udf08.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf08/udf08.1.ddl.sqlpp
@@ -22,3 +22,11 @@
  * Date         : 4th September 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.echo(a){
+a
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.1.ddl.sqlpp
index 414d6d2..3ae6afe 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.1.ddl.sqlpp
@@ -22,3 +22,17 @@
  * Date         : Sep 4th 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create type test.TestType as open {
+id : int64
+}
+
+create table test.t1(TestType) primary key id;
+
+create function test.readDataset(a) {
+a
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.2.update.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.2.update.sqlpp
index 2fd8a28..f02cdd9 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.2.update.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.2.update.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 /*
- * Description  : Create UDF to read from internal dataset 
+ * Description  : Create UDF to read from internal dataset
  * Expected Res : Success
  * Date         : Sep 4th 2012
  */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.3.query.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.3.query.sqlpp
index 66e1db3..5d46eb3 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.3.query.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf09/udf09.3.query.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 /*
- * Description  : Create UDF to read from internal dataset 
+ * Description  : Create UDF to read from internal dataset
  * Expected Res : Success
  * Date         : Sep 4th 2012
  */

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf10/udf10.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf10/udf10.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf10/udf10.1.ddl.sqlpp
index aa78721..7d2836e 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf10/udf10.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf10/udf10.1.ddl.sqlpp
@@ -22,3 +22,11 @@
  * Date         : 4th September 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.echo(uolist){
+uolist
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf11/udf11.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf11/udf11.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf11/udf11.1.ddl.sqlpp
index 9170318..06e7cdb 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf11/udf11.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf11/udf11.1.ddl.sqlpp
@@ -22,3 +22,12 @@
  * Date         : Sep 4th 2012
  */
 
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.OList(){
+[1,2,3,4,5,6,7,8,9,10]
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf12/udf12.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf12/udf12.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf12/udf12.1.ddl.sqlpp
index 26f68f9..f67bc3a 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf12/udf12.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf12/udf12.1.ddl.sqlpp
@@ -22,3 +22,12 @@
  * Date         : 4th September 2012
  */
 
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.foo(a,b) {
+a+b
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf13/udf13.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf13/udf13.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf13/udf13.1.ddl.sqlpp
index 4b35b6c..a6e4d54 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf13/udf13.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf13/udf13.1.ddl.sqlpp
@@ -22,3 +22,11 @@
  * Date         : 4th September 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.foo(a,b) {
+a - b
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf14/udf14.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf14/udf14.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf14/udf14.1.ddl.sqlpp
index 558cc74..bec1de4 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf14/udf14.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf14/udf14.1.ddl.sqlpp
@@ -22,3 +22,11 @@
  * Date         : 4th September 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.foo(a,b) {
+a*b
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf15/udf15.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf15/udf15.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf15/udf15.1.ddl.sqlpp
index 83ecf21..8f13eeb 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf15/udf15.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf15/udf15.1.ddl.sqlpp
@@ -24,3 +24,13 @@
  * Ignored      : Not part of current tests because of Issue 200
  */
 
+// this test resturns NPE:Issue 166
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.OList2(){
+[[1,2,3,4,5,6,7,8,9,10],['a','b','c','d','e','f','g','h','y']]
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf16/udf16.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf16/udf16.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf16/udf16.1.ddl.sqlpp
index ec2336e..5907265 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf16/udf16.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf16/udf16.1.ddl.sqlpp
@@ -23,3 +23,12 @@
  * Date         : Sep 5th 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.fn02(){
+'Welcome to the world of Asterix'
+}
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.1.ddl.sqlpp
index c209960..30c17f5 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.1.ddl.sqlpp
@@ -17,9 +17,22 @@
  * under the License.
  */
 /*
- * Description  : Create UDF and invoke it from another UDF and 
+ * Description  : Create UDF and invoke it from another UDF and
  *              : child UDF returns a string to the parent.
  * Expected Res : Success
  * Date         : Sep 5th 2012
  */
 
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.parent(){
+test.child()
+}
+
+create function test.child() {
+'This data is from the child function'
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.2.update.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.2.update.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.2.update.sqlpp
index c209960..a3ee4d2 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.2.update.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.2.update.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 /*
- * Description  : Create UDF and invoke it from another UDF and 
+ * Description  : Create UDF and invoke it from another UDF and
  *              : child UDF returns a string to the parent.
  * Expected Res : Success
  * Date         : Sep 5th 2012

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.3.query.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.3.query.sqlpp
index afd98ad..d059180 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.3.query.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf17/udf17.3.query.sqlpp
@@ -17,7 +17,7 @@
  * under the License.
  */
 /*
- * Description  : Create UDF and invoke it from another UDF and 
+ * Description  : Create UDF and invoke it from another UDF and
  *              : child UDF returns a string to the parent.
  * Expected Res : Success
  * Date         : Sep 5th 2012

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.1.ddl.sqlpp
index 9bbef2f..79baf30 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.1.ddl.sqlpp
@@ -22,3 +22,11 @@
  * Date         : Sep 5th 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.fn06(){
+false
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf19/udf19.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf19/udf19.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf19/udf19.1.ddl.sqlpp
index 84deb19..f83e912 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf19/udf19.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf19/udf19.1.ddl.sqlpp
@@ -22,3 +22,16 @@
  * Date         : Sep 5th 2012
  */
 
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.pie(){
+3.14
+}
+
+create function test.area(radius){
+test.pie() * radius * radius
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf20/udf20.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf20/udf20.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf20/udf20.1.ddl.sqlpp
index 84deb19..f83e912 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf20/udf20.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf20/udf20.1.ddl.sqlpp
@@ -22,3 +22,16 @@
  * Date         : Sep 5th 2012
  */
 
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.pie(){
+3.14
+}
+
+create function test.area(radius){
+test.pie() * radius * radius
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf21/udf21.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf21/udf21.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf21/udf21.1.ddl.sqlpp
index 211e12c..562aac1 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf21/udf21.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf21/udf21.1.ddl.sqlpp
@@ -22,3 +22,13 @@
  * Date         : Sep 5th 2012
  */
 
+
+drop database test if exists;
+create database test;
+
+use test;
+
+
+create function test.isOdd(b){
+b%2 != 0
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf22/udf22.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf22/udf22.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf22/udf22.1.ddl.sqlpp
index 67c9c5f..ec982a1 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf22/udf22.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf22/udf22.1.ddl.sqlpp
@@ -22,3 +22,12 @@
  * Date         : Sep 5th 2012
  */
 
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.getFullName(fname,lname){
+"string-concat"([fname,lname])
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf23/udf23.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf23/udf23.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf23/udf23.1.ddl.sqlpp
index f038f5b..02a73aa 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf23/udf23.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf23/udf23.1.ddl.sqlpp
@@ -22,3 +22,11 @@
  * Date         : Sep 5th 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.numRows(){
+6
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf24/udf24.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf24/udf24.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf24/udf24.1.ddl.sqlpp
index e13a2cf..b068c18 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf24/udf24.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf24/udf24.1.ddl.sqlpp
@@ -16,10 +16,14 @@
  * specific language governing permissions and limitations
  * under the License.
  */
-/*
- * Description  : Create UDF that returns a range
- * Expected Res : Success
- * Date         : Sep 5 2012
- * Ignored      : Not part of current test build because of Issue 201
- */
+// Returns java.lang.ClassCastException : Issue 195
+
+drop database test if exists;
+create database test;
+
+use test;
 
+create function test.myRangeFn(n)
+{
+   range(1,n)
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf25/udf25.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf25/udf25.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf25/udf25.1.ddl.sqlpp
index 8bce363..ac9f6d9 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf25/udf25.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf25/udf25.1.ddl.sqlpp
@@ -22,3 +22,17 @@
  * Date         : 5th Sep 2012
  */
 
+// This one returns NPE...
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.computeBonus(pbcRating,salary)
+{
+   if (pbcRating = 1) then
+        salary * 0.25
+   else
+        salary * 0.10
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf26/udf26.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf26/udf26.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf26/udf26.1.ddl.sqlpp
index 62a7a0b..728ff07 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf26/udf26.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf26/udf26.1.ddl.sqlpp
@@ -22,3 +22,11 @@
  * Date         : Sep 6th 2012
  */
 
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.needs_f1(x){
+ x + f1()
+}

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf27/udf27.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf27/udf27.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf27/udf27.1.ddl.sqlpp
index 4e255e3..101f70d 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf27/udf27.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf27/udf27.1.ddl.sqlpp
@@ -22,3 +22,16 @@
  * Date         : Sep 6th 2012
  */
 
+// this test is not giving expected results.
+// issue 194 reported to track this
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.f1(){
+100
+}
+
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf28/udf28.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf28/udf28.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf28/udf28.1.ddl.sqlpp
index eb5ed5d..bcd744f 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf28/udf28.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf28/udf28.1.ddl.sqlpp
@@ -22,3 +22,15 @@
  * Date         : Sep 6th 2012
  */
 
+// this test is not giving expected results.
+// issue 194 reported to track this
+
+drop database test if exists;
+create database test;
+
+use test;
+
+create function test.f1(){
+100
+};
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
index 9cf7dd9..5f0148b 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf30/udf30.1.query.sqlpp
@@ -23,3 +23,10 @@
  * Date         : Apr 10th 2013
  */
 
+declare function abc(y) {
+ 3
+};
+
+let z =y
+select element z
+

http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/caea8f0e/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf31/udf31.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf31/udf31.1.ddl.sqlpp
b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf31/udf31.1.ddl.sqlpp
index bd244d0..b4783d7 100644
--- a/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf31/udf31.1.ddl.sqlpp
+++ b/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf31/udf31.1.ddl.sqlpp
@@ -17,3 +17,29 @@
  * under the License.
  */
 
+/*
+ * Description  : Declare a UDF that has a LIMIT in it and try to execute that function.
+ * Expected Res : Success
+ */
+
+drop database emergencyTest if exists;
+create database emergencyTest;
+use emergencyTest;
+
+create type EmergencyReport as
+{
+  "id": int,
+  "intensity": int,
+  "message": string
+}
+
+create table EmergencyReports(EmergencyReport)
+primary key id;
+
+create function mostIntenseEarthquakeNearLocation()
+{
+  from EmergencyReports as emergency
+  order by emergency.id
+  limit 1
+  select element emergency.message
+}
\ No newline at end of file


Mime
View raw message