asterixdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From buyin...@apache.org
Subject asterixdb git commit: Add IS (NOT) NULL/MISSING/UNKOWN.
Date Wed, 29 Jun 2016 07:58:47 GMT
Repository: asterixdb
Updated Branches:
  refs/heads/master 6dc71486b -> daa549c2a


Add IS (NOT) NULL/MISSING/UNKOWN.

Change-Id: I7e4008d97f0d3a92816b90492dd8c887b05bac27
Reviewed-on: https://asterix-gerrit.ics.uci.edu/963
Reviewed-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Tested-by: Jenkins <jenkins@fulliautomatix.ics.uci.edu>
Reviewed-by: Yingyi Bu <buyingyi@gmail.com>


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

Branch: refs/heads/master
Commit: daa549c2a30f7e16d4d02ce27b3b7392db99ce01
Parents: 6dc7148
Author: Yingyi Bu <yingyi@couchbase.com>
Authored: Tue Jun 28 22:30:52 2016 -0700
Committer: Yingyi Bu <buyingyi@gmail.com>
Committed: Wed Jun 29 00:58:21 2016 -0700

----------------------------------------------------------------------
 .../queries_sqlpp/query-issue697.sqlpp          |   2 +-
 .../results_parser_sqlpp/query-issue697.ast     |   4 +-
 .../sum_null-with-pred.3.query.sqlpp            |   5 +-
 .../sum_null-with-pred.3.query.sqlpp            |   4 +-
 .../boolean/not_01/not_01.3.query.sqlpp         |   4 +-
 .../misc/is-null_01/is-null_01.3.query.sqlpp    |   2 +-
 .../null-missing/is/is.1.query.sqlpp            |  39 ++++++
 .../everysat_04/everysat_04.3.query.sqlpp       |   5 +-
 .../somesat_06/somesat_06.3.query.sqlpp         |   2 +-
 .../has-param1/has-param1.3.query.sqlpp         |   2 +-
 .../tinysocial-suite.12.query.sqlpp             |   2 +-
 .../tinysocial-suite.13.query.sqlpp             |   2 +-
 .../tinysocial-suite.12.query.sqlpp             |   2 +-
 .../tinysocial-suite.13.query.sqlpp             |   2 +-
 .../q13_customer_distribution.3.query.sqlpp     |   2 +-
 ...16_parts_supplier_relationship.3.query.sqlpp |   4 +-
 .../q13_customer_distribution.3.query.sqlpp     |   2 +-
 ...16_parts_supplier_relationship.3.query.sqlpp |   5 +-
 .../q13_customer_distribution.3.query.sqlpp     |   2 +-
 ...16_parts_supplier_relationship.3.query.sqlpp |   4 +-
 .../q13_customer_distribution.3.query.sqlpp     |   2 +-
 ...16_parts_supplier_relationship.3.query.sqlpp |   4 +-
 .../udf18/udf18.3.query.sqlpp                   |   5 +-
 .../runtimets/results/null-missing/is/is.1.adm  |   1 +
 .../sum_null-with-pred/sum_null-with-pred.3.ast |   5 +-
 .../sum_null-with-pred/sum_null-with-pred.3.ast |   5 +-
 .../boolean/not_01/not_01.3.ast                 |   7 +-
 .../misc/is-null_01/is-null_01.3.ast            |   4 +-
 .../quantifiers/everysat_04/everysat_04.3.ast   |   9 +-
 .../quantifiers/somesat_06/somesat_06.3.ast     |   8 +-
 .../semistructured/has-param1/has-param1.3.ast  |   4 +-
 .../date_functions/date_functions.3.ast         |   2 +-
 .../tinysocial-suite.12.ast                     |   2 +-
 .../tinysocial-suite.13.ast                     |   4 +-
 .../tinysocial-suite/tinysocial-suite.12.ast    |   2 +-
 .../tinysocial-suite/tinysocial-suite.13.ast    |   4 +-
 .../q13_customer_distribution.3.ast             |   2 +-
 .../q16_parts_supplier_relationship.3.ast       |   4 +-
 .../q13_customer_distribution.3.ast             |   2 +-
 .../q16_parts_supplier_relationship.3.ast       |   4 +-
 .../user-defined-functions/udf18/udf18.3.ast    |   3 +-
 .../resources/runtimets/testsuite_sqlpp.xml     |   5 +
 .../src/main/javacc/SQLPP.html                  | 136 ++++++++++---------
 .../asterix-lang-sqlpp/src/main/javacc/SQLPP.jj |  77 ++++++++---
 44 files changed, 234 insertions(+), 163 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/optimizerts/queries_sqlpp/query-issue697.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/queries_sqlpp/query-issue697.sqlpp b/asterixdb/asterix-app/src/test/resources/optimizerts/queries_sqlpp/query-issue697.sqlpp
index ed862f6..abdec5e 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/queries_sqlpp/query-issue697.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/queries_sqlpp/query-issue697.sqlpp
@@ -40,7 +40,7 @@ create  table test(TestType) primary key key1;
 select element {'gid':aid,'avg':test.coll_avg((
         select element j.`value`
         from  i as j
-        where test.not(test.`is-null`(j.`value`))
+        where j.`value` is not null
     ))}
 from  test as i
 group by i.key1 as aid

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/query-issue697.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/query-issue697.ast b/asterixdb/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/query-issue697.ast
index 4826e62..0a1e13f 100644
--- a/asterixdb/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/query-issue697.ast
+++ b/asterixdb/asterix-app/src/test/resources/optimizerts/results_parser_sqlpp/query-issue697.ast
@@ -29,8 +29,8 @@ RecordConstructor [
           AS Variable [ Name=$j ]
         ]
         Where
-          FunctionCall test.not@1[
-            FunctionCall test.is-null@1[
+          FunctionCall null.not@1[
+            FunctionCall null.is-null@1[
               FieldAccessor [
                 Variable [ Name=$j ]
                 Field=value

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp
index 38f613c..028c1bb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp
@@ -25,11 +25,8 @@
 
 use test;
 
-
-set `import-private-functions` `true`;
-
 select element test.`coll_sql-sum`((
     select element l.sal
     from  tdst as l
-    where test.not(test.`is-null`(l.sal))
+    where l.sal IS NOT NULL
 ));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp
index f3f9a22..263ce45 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.query.sqlpp
@@ -26,10 +26,8 @@
 use test;
 
 
-set `import-private-functions` `true`;
-
 select element test.coll_sum((
     select element l.sal
     from  tdst as l
-    where test.not(test.`is-null`(l.sal))
+    where l.sal IS NOT NULL
 ));

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/boolean/not_01/not_01.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/boolean/not_01/not_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/boolean/not_01/not_01.3.query.sqlpp
index 94a14ac..c6ca3a3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/boolean/not_01/not_01.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/boolean/not_01/not_01.3.query.sqlpp
@@ -20,6 +20,4 @@
 use test;
 
 
-set `import-private-functions` `true`;
-
-{'not_x':test.not(true),'not_y':test.not(false),'not_z':test.not(null)};
+{'not_x': NOT true,'not_y': NOT false ,'not_z': NOT null};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/is-null_01/is-null_01.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/is-null_01/is-null_01.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/is-null_01/is-null_01.3.query.sqlpp
index a02ffe4..e754ec0 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/is-null_01/is-null_01.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/misc/is-null_01/is-null_01.3.query.sqlpp
@@ -22,4 +22,4 @@ use test;
 
 set `import-private-functions` `true`;
 
-select element [test.`is-null`(null),test.`is-null`(10)];
+select element [null IS NULL, 10 is null];

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/is/is.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/is/is.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/is/is.1.query.sqlpp
new file mode 100644
index 0000000..4c4a2fc
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/is/is.1.query.sqlpp
@@ -0,0 +1,39 @@
+/*
+ * 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.
+ */
+
+{
+  "1": null is null,
+  "2": missing is null,
+  "3": 1 is null,
+  "4": null is not null,
+  "5": missing is not null,
+  "6": 1 is not null,
+  "7": null is missing,
+  "8": missing is missing,
+  "9": 1 is missing,
+  "10": null is not missing,
+  "11": missing is not missing,
+  "12": 1 is not missing,
+  "13": null is unknown,
+  "14": missing is unknown,
+  "15": 1 is unknown,
+  "16": null is not unknown,
+  "17": missing is not unknown,
+  "18": 1 is not unknown
+};

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp
index 5707fc3..06eb088 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/everysat_04/everysat_04.3.query.sqlpp
@@ -23,10 +23,7 @@
 
 use test;
 
-
-set `import-private-functions` `true`;
-
-with  x as [every x in [false,false] satisfies x,every x in [true,false] satisfies x,every x in [false,true] satisfies x,every x in [true,true] satisfies x,every x in [false,false] satisfies test.not(x),every x in [true,false] satisfies test.not(x),every x in [false,true] satisfies test.not(x),every x in [true,true] satisfies test.not(x)]
+with  x as [every x in [false,false] satisfies x,every x in [true,false] satisfies x,every x in [false,true] satisfies x,every x in [true,true] satisfies x,every x in [false,false] satisfies not x,every x in [true,false] satisfies not x,every x in [false,true] satisfies not x,every x in [true,true] satisfies not x]
 select element i
 from  x as i
 ;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp
index 88c6b60..8186a43 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/quantifiers/somesat_06/somesat_06.3.query.sqlpp
@@ -26,7 +26,7 @@ use test;
 
 set `import-private-functions` `true`;
 
-with  x as [some x in [false,false] satisfies x,some x in [true,false] satisfies x,some x in [false,true] satisfies x,some x in [true,true] satisfies x,some x in [false,false] satisfies test.not(x),some x in [true,false] satisfies test.not(x),some x in [false,true] satisfies test.not(x),some x in [true,true] satisfies test.not(x)]
+with  x as [some x in [false,false] satisfies x,some x in [true,false] satisfies x,some x in [false,true] satisfies x,some x in [true,true] satisfies x,some x in [false,false] satisfies NOT x,some x in [true,false] satisfies not x,some x in [false,true] satisfies NOT x,some x in [true,true] satisfies not x]
 select element i
 from  x as i
 ;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/semistructured/has-param1/has-param1.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/semistructured/has-param1/has-param1.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/semistructured/has-param1/has-param1.3.query.sqlpp
index 56ba48b..37d129f 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/semistructured/has-param1/has-param1.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/semistructured/has-param1/has-param1.3.query.sqlpp
@@ -24,6 +24,6 @@ set `import-private-functions` `true`;
 
 select element o
 from  Orders as o
-where not(`is-missing`(o.param1))
+where o.param1 IS NOT MISSING
 order by o.oid
 ;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.query.sqlpp
index 68431d3..948f427 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.query.sqlpp
@@ -25,6 +25,6 @@ use TinySocial;
 
 select element fbu
 from  FacebookUsers as fbu
-where some e in fbu.employment satisfies TinySocial.`is-missing`(e.`end-date`)
+where some e in fbu.employment satisfies e.`end-date` is missing
 order by fbu.id
 ;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.query.sqlpp
index 197f257..eb5a377 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.query.sqlpp
@@ -25,6 +25,6 @@ use TinySocial;
 
 select element fbu
 from  FacebookUsers as fbu
-where every e in fbu.employment satisfies TinySocial.not(TinySocial.`is-missing`(e.`end-date`))
+where every e in fbu.employment satisfies e.`end-date` IS NOT MISSING
 order by fbu.id
 ;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.query.sqlpp
index 68431d3..32e6ea4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.query.sqlpp
@@ -25,6 +25,6 @@ use TinySocial;
 
 select element fbu
 from  FacebookUsers as fbu
-where some e in fbu.employment satisfies TinySocial.`is-missing`(e.`end-date`)
+where some e in fbu.employment satisfies e.`end-date` IS MISSING
 order by fbu.id
 ;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.query.sqlpp
index 197f257..7582ec4 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.query.sqlpp
@@ -25,6 +25,6 @@ use TinySocial;
 
 select element fbu
 from  FacebookUsers as fbu
-where every e in fbu.employment satisfies TinySocial.not(TinySocial.`is-missing`(e.`end-date`))
+where every e in fbu.employment satisfies e.`end-date` is not missing
 order by fbu.id
 ;

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
index c0aa73a..45888f3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
@@ -32,7 +32,7 @@ from  (
         select element {'c_custkey':c.c_custkey,'o_orderkey_count':coll_count((
                 select element o.o_orderkey
                 from  Orders as o
-                where ((c.c_custkey = o.o_custkey) and tpch.not(tpch.like(o.o_comment,'%special%requests%')))
+                where c.c_custkey = o.o_custkey and NOT like(o.o_comment,'%special%requests%')
             ))}
         from  Customer as c
     ) as co

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
index acf3281..a6a53bb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
@@ -27,10 +27,10 @@ declare function tmp() {
         select element {'p_brand':p.p_brand,'p_type':p.p_type,'p_size':p.p_size,'ps_suppkey':ps.ps_suppkey}
         from  Partsupp as ps,
               Part as p
-        where ((p.p_partkey = ps.ps_partkey) and (p.p_brand != 'Brand#45') and tpch.not(tpch.like(p.p_type,'MEDIUM POLISHED%')))
+        where p.p_partkey = ps.ps_partkey and p.p_brand != 'Brand#45' and not like(p.p_type,'MEDIUM POLISHED%')
     ) as psp,
           Supplier as s
-    where ((psp.ps_suppkey = s.s_suppkey) and tpch.not(tpch.like(s.s_comment,'%Customer%Complaints%')))
+    where psp.ps_suppkey = s.s_suppkey and not like(s.s_comment,'%Customer%Complaints%')
 )
 };
 select element {'p_brand':p_brand,'p_type':p_type,'p_size':p_size,'supplier_cnt':supplier_cnt}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
index e069759..3124fdc 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
@@ -28,7 +28,7 @@ FROM  (
                            (
                             select element o.o_orderkey
                             from  Orders as o
-                            where c.c_custkey = o.o_custkey and not(like(o.o_comment,'%special%requests%'))
+                            where c.c_custkey = o.o_custkey and NOT like(o.o_comment,'%special%requests%')
                            )
                          ) AS o_orderkey_count
                 from  Customer c

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
index 1d154a6..c96b23b 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-sql/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
@@ -27,11 +27,10 @@ declare function tmp() {
             SELECT p.p_brand p_brand, p.p_type p_type, p.p_size p_size, ps.ps_suppkey ps_suppkey
             FROM  Partsupp AS ps,
                   Part AS p
-            WHERE p.p_partkey = ps.ps_partkey AND p.p_brand != 'Brand#45' AND
-              not(tpch.like(p.p_type,'MEDIUM POLISHED%'))
+            WHERE p.p_partkey = ps.ps_partkey AND p.p_brand != 'Brand#45' AND NOT like(p.p_type,'MEDIUM POLISHED%')
            ) AS psp,
            Supplier AS s
-    WHERE psp.ps_suppkey = s.s_suppkey AND not(like(s.s_comment,'%Customer%Complaints%'))
+    WHERE psp.ps_suppkey = s.s_suppkey AND NOT like(s.s_comment,'%Customer%Complaints%')
 )
 };
 

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
index c0aa73a..45888f3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
@@ -32,7 +32,7 @@ from  (
         select element {'c_custkey':c.c_custkey,'o_orderkey_count':coll_count((
                 select element o.o_orderkey
                 from  Orders as o
-                where ((c.c_custkey = o.o_custkey) and tpch.not(tpch.like(o.o_comment,'%special%requests%')))
+                where c.c_custkey = o.o_custkey and NOT like(o.o_comment,'%special%requests%')
             ))}
         from  Customer as c
     ) as co

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
index acf3281..a6a53bb 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch-with-index/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
@@ -27,10 +27,10 @@ declare function tmp() {
         select element {'p_brand':p.p_brand,'p_type':p.p_type,'p_size':p.p_size,'ps_suppkey':ps.ps_suppkey}
         from  Partsupp as ps,
               Part as p
-        where ((p.p_partkey = ps.ps_partkey) and (p.p_brand != 'Brand#45') and tpch.not(tpch.like(p.p_type,'MEDIUM POLISHED%')))
+        where p.p_partkey = ps.ps_partkey and p.p_brand != 'Brand#45' and not like(p.p_type,'MEDIUM POLISHED%')
     ) as psp,
           Supplier as s
-    where ((psp.ps_suppkey = s.s_suppkey) and tpch.not(tpch.like(s.s_comment,'%Customer%Complaints%')))
+    where psp.ps_suppkey = s.s_suppkey and not like(s.s_comment,'%Customer%Complaints%')
 )
 };
 select element {'p_brand':p_brand,'p_type':p_type,'p_size':p_size,'supplier_cnt':supplier_cnt}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
index 81cbce5..c5ae516 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.query.sqlpp
@@ -32,7 +32,7 @@ from  (
         select element {'c_custkey':c.c_custkey,'o_orderkey_count':coll_count((
                 select element o.o_orderkey
                 from  Orders as o
-                where ((c.c_custkey = o.o_custkey) and tpch.not(tpch.like(o.o_comment,'%special%requests%')))
+                where c.c_custkey = o.o_custkey and NOT like(o.o_comment,'%special%requests%')
             ))}
         from  Customer as c
     ) as co

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
index b9fa20e..481d4d1 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.query.sqlpp
@@ -27,10 +27,10 @@ declare function tmp() {
         select element {'p_brand':p.p_brand,'p_type':p.p_type,'p_size':p.p_size,'ps_suppkey':ps.ps_suppkey}
         from  Partsupp as ps,
               Part as p
-        where ((p.p_partkey = ps.ps_partkey) and (p.p_brand != 'Brand#45') and NOT(tpch.like(p.p_type,'MEDIUM POLISHED%')))
+        where p.p_partkey = ps.ps_partkey and p.p_brand != 'Brand#45' and not like(p.p_type,'MEDIUM POLISHED%')
     ) as psp,
           Supplier as s
-    where ((psp.ps_suppkey = s.s_suppkey) and tpch.not(LIKE(s.s_comment,'%Customer%Complaints%')))
+    where psp.ps_suppkey = s.s_suppkey and NOT LIKE(s.s_comment,'%Customer%Complaints%')
 )
 };
 select element {'p_brand':p_brand,'p_type':p_type,'p_size':p_size,'supplier_cnt':supplier_cnt}

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.3.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.3.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.3.query.sqlpp
index d99c14c..84e2623 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.3.query.sqlpp
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/user-defined-functions/udf18/udf18.3.query.sqlpp
@@ -24,7 +24,4 @@
 
 use test;
 
-
-set `import-private-functions` `true`;
-
-test.not(test.fn06());
+NOT fn06();

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/is/is.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/is/is.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/is/is.1.adm
new file mode 100644
index 0000000..79a9c5c
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/is/is.1.adm
@@ -0,0 +1 @@
+{ "1": true, "2": false, "3": false, "4": false, "5": true, "6": true, "7": false, "8": true, "9": false, "10": true, "11": false, "12": true, "13": true, "14": true, "15": false, "16": false, "17": false, "18": true }

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.ast
index acca20f..44972f8 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate-sql/sum_null-with-pred/sum_null-with-pred.3.ast
@@ -1,5 +1,4 @@
 DataverseUse test
-Set import-private-functions=true
 Query:
 SELECT ELEMENT [
 FunctionCall test.sql-sum@1[
@@ -16,8 +15,8 @@ FunctionCall test.sql-sum@1[
       AS Variable [ Name=$l ]
     ]
     Where
-      FunctionCall test.not@1[
-        FunctionCall test.is-null@1[
+      FunctionCall null.not@1[
+        FunctionCall null.is-null@1[
           FieldAccessor [
             Variable [ Name=$l ]
             Field=sal

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.ast
index 38a2b7a..9769f50 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/aggregate/sum_null-with-pred/sum_null-with-pred.3.ast
@@ -1,5 +1,4 @@
 DataverseUse test
-Set import-private-functions=true
 Query:
 SELECT ELEMENT [
 FunctionCall test.sum@1[
@@ -16,8 +15,8 @@ FunctionCall test.sum@1[
       AS Variable [ Name=$l ]
     ]
     Where
-      FunctionCall test.not@1[
-        FunctionCall test.is-null@1[
+      FunctionCall null.not@1[
+        FunctionCall null.is-null@1[
           FieldAccessor [
             Variable [ Name=$l ]
             Field=sal

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/boolean/not_01/not_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/boolean/not_01/not_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/boolean/not_01/not_01.3.ast
index 94a3893..c554923 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/boolean/not_01/not_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/boolean/not_01/not_01.3.ast
@@ -1,25 +1,24 @@
 DataverseUse test
-Set import-private-functions=true
 Query:
 RecordConstructor [
   (
     LiteralExpr [STRING] [not_x]
     :
-    FunctionCall test.not@1[
+    FunctionCall null.not@1[
       LiteralExpr [TRUE]
     ]
   )
   (
     LiteralExpr [STRING] [not_y]
     :
-    FunctionCall test.not@1[
+    FunctionCall null.not@1[
       LiteralExpr [FALSE]
     ]
   )
   (
     LiteralExpr [STRING] [not_z]
     :
-    FunctionCall test.not@1[
+    FunctionCall null.not@1[
       LiteralExpr [NULL]
     ]
   )

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/is-null_01/is-null_01.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/is-null_01/is-null_01.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/is-null_01/is-null_01.3.ast
index 8e60e20..25b715e 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/is-null_01/is-null_01.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/misc/is-null_01/is-null_01.3.ast
@@ -3,10 +3,10 @@ Set import-private-functions=true
 Query:
 SELECT ELEMENT [
 OrderedListConstructor [
-  FunctionCall test.is-null@1[
+  FunctionCall null.is-null@1[
     LiteralExpr [NULL]
   ]
-  FunctionCall test.is-null@1[
+  FunctionCall null.is-null@1[
     LiteralExpr [LONG] [10]
   ]
 ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/everysat_04/everysat_04.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/everysat_04/everysat_04.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/everysat_04/everysat_04.3.ast
index 1e81e9f..9a08a18 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/everysat_04/everysat_04.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/everysat_04/everysat_04.3.ast
@@ -1,5 +1,4 @@
 DataverseUse test
-Set import-private-functions=true
 Query:
 Let Variable [ Name=$x ]
   :=
@@ -61,7 +60,7 @@ Let Variable [ Name=$x ]
         ]
       ]
       Satifies [
-        FunctionCall test.not@1[
+        FunctionCall null.not@1[
           Variable [ Name=$x ]
         ]
       ]
@@ -75,7 +74,7 @@ Let Variable [ Name=$x ]
         ]
       ]
       Satifies [
-        FunctionCall test.not@1[
+        FunctionCall null.not@1[
           Variable [ Name=$x ]
         ]
       ]
@@ -89,7 +88,7 @@ Let Variable [ Name=$x ]
         ]
       ]
       Satifies [
-        FunctionCall test.not@1[
+        FunctionCall null.not@1[
           Variable [ Name=$x ]
         ]
       ]
@@ -103,7 +102,7 @@ Let Variable [ Name=$x ]
         ]
       ]
       Satifies [
-        FunctionCall test.not@1[
+        FunctionCall null.not@1[
           Variable [ Name=$x ]
         ]
       ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/somesat_06/somesat_06.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/somesat_06/somesat_06.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/somesat_06/somesat_06.3.ast
index e5e0e65..4a499d7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/somesat_06/somesat_06.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/quantifiers/somesat_06/somesat_06.3.ast
@@ -61,7 +61,7 @@ Let Variable [ Name=$x ]
         ]
       ]
       Satifies [
-        FunctionCall test.not@1[
+        FunctionCall null.not@1[
           Variable [ Name=$x ]
         ]
       ]
@@ -75,7 +75,7 @@ Let Variable [ Name=$x ]
         ]
       ]
       Satifies [
-        FunctionCall test.not@1[
+        FunctionCall null.not@1[
           Variable [ Name=$x ]
         ]
       ]
@@ -89,7 +89,7 @@ Let Variable [ Name=$x ]
         ]
       ]
       Satifies [
-        FunctionCall test.not@1[
+        FunctionCall null.not@1[
           Variable [ Name=$x ]
         ]
       ]
@@ -103,7 +103,7 @@ Let Variable [ Name=$x ]
         ]
       ]
       Satifies [
-        FunctionCall test.not@1[
+        FunctionCall null.not@1[
           Variable [ Name=$x ]
         ]
       ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/has-param1/has-param1.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/has-param1/has-param1.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/has-param1/has-param1.3.ast
index 1bdd63d..fb79748 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/has-param1/has-param1.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/semistructured/has-param1/has-param1.3.ast
@@ -10,8 +10,8 @@ FROM [  FunctionCall Metadata.dataset@1[
   AS Variable [ Name=$o ]
 ]
 Where
-  FunctionCall test.not@1[
-    FunctionCall test.is-missing@1[
+  FunctionCall null.not@1[
+    FunctionCall null.is-missing@1[
       FieldAccessor [
         Variable [ Name=$o ]
         Field=param1

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/date_functions/date_functions.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/date_functions/date_functions.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/date_functions/date_functions.3.ast
index 9110e70..63dc7a6 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/date_functions/date_functions.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/temporal/date_functions/date_functions.3.ast
@@ -263,4 +263,4 @@ RecordConstructor [
       LiteralExpr [NULL]
     ]
   )
-]
\ No newline at end of file
+]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.ast
index e4278c4..72f7150 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.12.ast
@@ -18,7 +18,7 @@ Where
       ]
     ]
     Satifies [
-      FunctionCall TinySocial.is-missing@1[
+      FunctionCall null.is-missing@1[
         FieldAccessor [
           Variable [ Name=$e ]
           Field=end-date

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.ast
index d82f5bd..733dc37 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite-open/tinysocial-suite.13.ast
@@ -18,8 +18,8 @@ Where
       ]
     ]
     Satifies [
-      FunctionCall TinySocial.not@1[
-        FunctionCall TinySocial.is-missing@1[
+      FunctionCall null.not@1[
+        FunctionCall null.is-missing@1[
           FieldAccessor [
             Variable [ Name=$e ]
             Field=end-date

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.ast
index e4278c4..72f7150 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.12.ast
@@ -18,7 +18,7 @@ Where
       ]
     ]
     Satifies [
-      FunctionCall TinySocial.is-missing@1[
+      FunctionCall null.is-missing@1[
         FieldAccessor [
           Variable [ Name=$e ]
           Field=end-date

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.ast
index d82f5bd..733dc37 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tinysocial/tinysocial-suite/tinysocial-suite.13.ast
@@ -18,8 +18,8 @@ Where
       ]
     ]
     Satifies [
-      FunctionCall TinySocial.not@1[
-        FunctionCall TinySocial.is-missing@1[
+      FunctionCall null.not@1[
+        FunctionCall null.is-missing@1[
           FieldAccessor [
             Variable [ Name=$e ]
             Field=end-date

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast
index e882621..38af625 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q13_customer_distribution/q13_customer_distribution.3.ast
@@ -83,7 +83,7 @@ FROM [  (
                       ]
                     ]
                     and
-                    FunctionCall tpch.not@1[
+                    FunctionCall null.not@1[
                       FunctionCall tpch.like@2[
                         FieldAccessor [
                           Variable [ Name=$o ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
index 44b1f8d..e00c9c7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch-sql-like/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
@@ -103,7 +103,7 @@ FunctionDecl tmp([]) {
               LiteralExpr [STRING] [Brand#45]
             ]
             and
-            FunctionCall tpch.not@1[
+            FunctionCall null.not@1[
               FunctionCall tpch.like@2[
                 FieldAccessor [
                   Variable [ Name=$p ]
@@ -133,7 +133,7 @@ FunctionDecl tmp([]) {
           ]
         ]
         and
-        FunctionCall tpch.not@1[
+        FunctionCall null.not@1[
           FunctionCall tpch.like@2[
             FieldAccessor [
               Variable [ Name=$s ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast
index e882621..38af625 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q13_customer_distribution/q13_customer_distribution.3.ast
@@ -83,7 +83,7 @@ FROM [  (
                       ]
                     ]
                     and
-                    FunctionCall tpch.not@1[
+                    FunctionCall null.not@1[
                       FunctionCall tpch.like@2[
                         FieldAccessor [
                           Variable [ Name=$o ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
index 44b1f8d..e00c9c7 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/tpch/q16_parts_supplier_relationship/q16_parts_supplier_relationship.3.ast
@@ -103,7 +103,7 @@ FunctionDecl tmp([]) {
               LiteralExpr [STRING] [Brand#45]
             ]
             and
-            FunctionCall tpch.not@1[
+            FunctionCall null.not@1[
               FunctionCall tpch.like@2[
                 FieldAccessor [
                   Variable [ Name=$p ]
@@ -133,7 +133,7 @@ FunctionDecl tmp([]) {
           ]
         ]
         and
-        FunctionCall tpch.not@1[
+        FunctionCall null.not@1[
           FunctionCall tpch.like@2[
             FieldAccessor [
               Variable [ Name=$s ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf18/udf18.3.ast
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf18/udf18.3.ast b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf18/udf18.3.ast
index c25ac31..c95a811 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf18/udf18.3.ast
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results_parser_sqlpp/user-defined-functions/udf18/udf18.3.ast
@@ -1,7 +1,6 @@
 DataverseUse test
-Set import-private-functions=true
 Query:
-FunctionCall test.not@1[
+FunctionCall null.not@1[
   FunctionCall test.fn06@0[
   ]
 ]

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/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 1bc4ffe..d66453d 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -3703,6 +3703,11 @@
         <output-dir compare="Text">upper</output-dir>
       </compilation-unit>
     </test-case>
+    <test-case FilePath="null-missing">
+      <compilation-unit name="is">
+        <output-dir compare="Text">is</output-dir>
+      </compilation-unit>
+    </test-case>
   </test-group>
   <test-group name="numeric">
     <test-case FilePath="numeric">

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
index e5a0cea..8aecbd9 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.html
@@ -65,6 +65,7 @@
 | &lt;INSERT: "insert"&gt;
 | &lt;INTERNAL: "internal"&gt;
 | &lt;INTERSECT: "intersect"&gt;
+| &lt;IS: "is"&gt;
 | &lt;JOIN: "join"&gt;
 | &lt;KEYWORD: "keyword"&gt;
 | &lt;KEY: "key"&gt;
@@ -76,6 +77,7 @@
 | &lt;NEST: "nest"&gt;
 | &lt;NODEGROUP: "nodegroup"&gt;
 | &lt;NGRAM: "ngram"&gt;
+| &lt;NOT: "not"&gt;
 | &lt;OFFSET: "offset"&gt;
 | &lt;ON: "on"&gt;
 | &lt;OPEN: "open"&gt;
@@ -102,15 +104,16 @@
 | &lt;TYPE: "type"&gt;
 | &lt;TO: "to"&gt;
 | &lt;UNION: "union"&gt;
+| &lt;UNKOWN: "unknown"&gt;
 | &lt;UNNEST: "unnest"&gt;
+| &lt;UPDATE: "update"&gt;
+| &lt;USE: "use"&gt;
+| &lt;USING: "using"&gt;
 | &lt;VALUE: "value"&gt;
 | &lt;WHEN: "when"&gt;
 | &lt;WHERE: "where"&gt;
 | &lt;WITH: "with"&gt;
 | &lt;WRITE: "write"&gt;
-| &lt;UPDATE: "update"&gt;
-| &lt;USE: "use"&gt;
-| &lt;USING: "using"&gt;
 }
 
    </PRE>
@@ -465,7 +468,7 @@
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod28">IfNotExists</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;IF&gt; ( "not exists" | "NOT EXISTS" ) )?</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;IF&gt; &lt;NOT&gt; &lt;EXISTS&gt; )?</TD>
 </TR>
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod45">ApplyFunction</A></TD>
@@ -685,50 +688,55 @@
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod67">RelExpr</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod68">AddExpr</A> ( ( &lt;LT&gt; | &lt;GT&gt; | &lt;LE&gt; | &lt;GE&gt; | &lt;EQ&gt; | &lt;NE&gt; | &lt;SIMILAR&gt; ) <A HREF="#prod68">AddExpr</A> )?</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod68">IsExpr</A> ( ( &lt;LT&gt; | &lt;GT&gt; | &lt;LE&gt; | &lt;GE&gt; | &lt;EQ&gt; | &lt;NE&gt; | &lt;SIMILAR&gt; ) <A HREF="#prod68">IsExpr</A> )?</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod68">IsExpr</A></TD>
+<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod69">AddExpr</A> ( &lt;IS&gt; ( &lt;NOT&gt; )? ( &lt;NULL&gt; | &lt;MISSING&gt; | &lt;UNKOWN&gt; ) )?</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod68">AddExpr</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod69">AddExpr</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod69">MultExpr</A> ( ( &lt;PLUS&gt; | &lt;MINUS&gt; ) <A HREF="#prod69">MultExpr</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod70">MultExpr</A> ( ( &lt;PLUS&gt; | &lt;MINUS&gt; ) <A HREF="#prod70">MultExpr</A> )*</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod69">MultExpr</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod70">MultExpr</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod70">UnaryExpr</A> ( ( &lt;MUL&gt; | &lt;DIV&gt; | &lt;MOD&gt; | &lt;CARET&gt; | &lt;IDIV&gt; ) <A HREF="#prod70">UnaryExpr</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod71">UnaryExpr</A> ( ( &lt;MUL&gt; | &lt;DIV&gt; | &lt;MOD&gt; | &lt;CARET&gt; | &lt;IDIV&gt; ) <A HREF="#prod71">UnaryExpr</A> )*</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod70">UnaryExpr</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod71">UnaryExpr</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( ( &lt;PLUS&gt; | &lt;MINUS&gt; ) )? <A HREF="#prod71">ValueExpr</A></TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( ( &lt;PLUS&gt; | &lt;MINUS&gt; | &lt;NOT&gt; ) )? <A HREF="#prod72">ValueExpr</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod71">ValueExpr</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod72">ValueExpr</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod72">PrimaryExpr</A> ( <A HREF="#prod73">Field</A> | <A HREF="#prod74">Index</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod73">PrimaryExpr</A> ( <A HREF="#prod74">Field</A> | <A HREF="#prod75">Index</A> )*</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod73">Field</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod74">Field</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;DOT&gt; <A HREF="#prod18">Identifier</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod74">Index</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod75">Index</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;LEFTBRACKET&gt; ( <A HREF="#prod44">Expression</A> | &lt;QUES&gt; ) &lt;RIGHTBRACKET&gt;</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod72">PrimaryExpr</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod73">PrimaryExpr</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod75">FunctionCallExpr</A> | <A HREF="#prod76">Literal</A> | <A HREF="#prod77">VariableRef</A> | <A HREF="#prod78">ListConstructor</A> | <A HREF="#prod79">RecordConstructor</A> | <A HREF="#prod80">ParenthesizedExpression</A> )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod76">FunctionCallExpr</A> | <A HREF="#prod77">Literal</A> | <A HREF="#prod78">VariableRef</A> | <A HREF="#prod79">ListConstructor</A> | <A HREF="#prod80">RecordConstructor</A> | <A HREF="#prod81">ParenthesizedExpression</A> )</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod76">Literal</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod77">Literal</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod54">StringLiteral</A> | &lt;INTEGER_LITERAL&gt; | &lt;FLOAT_LITERAL&gt; | &lt;DOUBLE_LITERAL&gt; | &lt;MISSING&gt; | &lt;NULL&gt; | &lt;TRUE&gt; | &lt;FALSE&gt; )</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod77">VariableRef</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod78">VariableRef</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>( &lt;IDENTIFIER&gt; | <A HREF="#prod61">QuotedString</A> )</TD>
 </TR>
@@ -738,49 +746,49 @@
 <TD ALIGN=LEFT VALIGN=BASELINE>( &lt;IDENTIFIER&gt; | <A HREF="#prod61">QuotedString</A> )</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod78">ListConstructor</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod79">ListConstructor</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod81">OrderedListConstructor</A> | <A HREF="#prod82">UnorderedListConstructor</A> )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod82">OrderedListConstructor</A> | <A HREF="#prod83">UnorderedListConstructor</A> )</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod81">OrderedListConstructor</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod82">OrderedListConstructor</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>&lt;LEFTBRACKET&gt; <A HREF="#prod83">ExpressionList</A> &lt;RIGHTBRACKET&gt;</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;LEFTBRACKET&gt; <A HREF="#prod84">ExpressionList</A> &lt;RIGHTBRACKET&gt;</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod82">UnorderedListConstructor</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod83">UnorderedListConstructor</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>&lt;LEFTDBLBRACE&gt; <A HREF="#prod83">ExpressionList</A> &lt;RIGHTDBLBRACE&gt;</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;LEFTDBLBRACE&gt; <A HREF="#prod84">ExpressionList</A> &lt;RIGHTDBLBRACE&gt;</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod83">ExpressionList</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod84">ExpressionList</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod44">Expression</A> ( &lt;COMMA&gt; <A HREF="#prod83">ExpressionList</A> )? )? ( <A HREF="#prod84">Comma</A> )?</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod44">Expression</A> ( &lt;COMMA&gt; <A HREF="#prod84">ExpressionList</A> )? )? ( <A HREF="#prod85">Comma</A> )?</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod84">Comma</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod85">Comma</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;COMMA&gt;</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod79">RecordConstructor</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod80">RecordConstructor</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>&lt;LEFTBRACE&gt; ( <A HREF="#prod85">FieldBinding</A> ( &lt;COMMA&gt; <A HREF="#prod85">FieldBinding</A> )* )? &lt;RIGHTBRACE&gt;</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;LEFTBRACE&gt; ( <A HREF="#prod86">FieldBinding</A> ( &lt;COMMA&gt; <A HREF="#prod86">FieldBinding</A> )* )? &lt;RIGHTBRACE&gt;</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod85">FieldBinding</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod86">FieldBinding</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod44">Expression</A> &lt;COLON&gt; <A HREF="#prod44">Expression</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod75">FunctionCallExpr</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod76">FunctionCallExpr</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod42">FunctionName</A> &lt;LEFTPAREN&gt; ( <A HREF="#prod44">Expression</A> ( &lt;COMMA&gt; <A HREF="#prod44">Expression</A> )* )? &lt;RIGHTPAREN&gt;</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod80">ParenthesizedExpression</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod81">ParenthesizedExpression</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;LEFTPAREN&gt; <A HREF="#prod44">Expression</A> &lt;RIGHTPAREN&gt; | <A HREF="#prod86">Subquery</A> )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( &lt;LEFTPAREN&gt; <A HREF="#prod44">Expression</A> &lt;RIGHTPAREN&gt; | <A HREF="#prod87">Subquery</A> )</TD>
 </TR>
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod64">IfThenElse</A></TD>
@@ -790,100 +798,100 @@
 <TR>
 <TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod62">SelectExpression</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod87">LetClause</A> )? <A HREF="#prod88">SelectSetOperation</A> ( <A HREF="#prod89">OrderbyClause</A> )? ( <A HREF="#prod90">LimitClause</A> )?</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod88">LetClause</A> )? <A HREF="#prod89">SelectSetOperation</A> ( <A HREF="#prod90">OrderbyClause</A> )? ( <A HREF="#prod91">LimitClause</A> )?</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod88">SelectSetOperation</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod89">SelectSetOperation</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod91">SelectBlock</A> ( ( &lt;UNION&gt; | &lt;INTERSECT&gt; | &lt;EXCEPT&gt; ) ( &lt;ALL&gt; )? ( <A HREF="#prod91">SelectBlock</A> | <A HREF="#prod86">Subquery</A> ) )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod92">SelectBlock</A> ( ( &lt;UNION&gt; | &lt;INTERSECT&gt; | &lt;EXCEPT&gt; ) ( &lt;ALL&gt; )? ( <A HREF="#prod92">SelectBlock</A> | <A HREF="#prod87">Subquery</A> ) )*</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod86">Subquery</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod87">Subquery</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;LEFTPAREN&gt; <A HREF="#prod62">SelectExpression</A> &lt;RIGHTPAREN&gt;</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod91">SelectBlock</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod92">SelectBlock</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod92">SelectClause</A> ( <A HREF="#prod93">FromClause</A> ( <A HREF="#prod87">LetClause</A> )? )? ( <A HREF="#prod94">WhereClause</A> )? ( <A HREF="#prod95">GroupbyClause</A> ( <A HREF="#prod87">LetClause</A> )? ( <A HREF="#prod96">HavingClause</A> )? )? | <A HREF="#prod93">FromClause</A> ( <A HREF="#prod87">LetClause</A> )? ( <A HREF="#prod94">WhereClause</A> )? ( <A HREF="#prod95">GroupbyClause</A> ( <A HREF="#prod87">LetClause</A> )? ( <A HREF="#prod96">HavingClause</A> )? )? <A HREF="#prod92">SelectClause</A> )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod93">SelectClause</A> ( <A HREF="#prod94">FromClause</A> ( <A HREF="#prod88">LetClause</A> )? )? ( <A HREF="#prod95">WhereClause</A> )? ( <A HREF="#prod96">GroupbyClause</A> ( <A HREF="#prod88">LetClause</A> )? ( <A HREF="#prod97">HavingClause</A> )? )? | <A HREF="#prod94">FromClause</A> ( <A HREF="#prod88">LetClause</A> )? ( <A HREF="#prod95">WhereClause</A> )? ( <A HREF="#prod96">GroupbyClause</A> ( <A HREF="#prod88">LetClause</A> )? ( <A HREF="#prod97">HavingClause</A> )? )? <A HREF="#prod93">SelectClause</A> )</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod92">SelectClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod93">SelectClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>&lt;SELECT&gt; ( &lt;ALL&gt; | &lt;DISTINCT&gt; )? ( <A HREF="#prod97">SelectRegular</A> | <A HREF="#prod98">SelectElement</A> )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;SELECT&gt; ( &lt;ALL&gt; | &lt;DISTINCT&gt; )? ( <A HREF="#prod98">SelectRegular</A> | <A HREF="#prod99">SelectElement</A> )</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod97">SelectRegular</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod98">SelectRegular</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod99">Projection</A> ( &lt;COMMA&gt; <A HREF="#prod99">Projection</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod100">Projection</A> ( &lt;COMMA&gt; <A HREF="#prod100">Projection</A> )*</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod98">SelectElement</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod99">SelectElement</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>( &lt;RAW&gt; | &lt;ELEMENT&gt; | &lt;VALUE&gt; ) <A HREF="#prod44">Expression</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod99">Projection</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod100">Projection</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod44">Expression</A> ( &lt;AS&gt; )? <A HREF="#prod18">Identifier</A> | <A HREF="#prod44">Expression</A> &lt;DOT&gt; &lt;MUL&gt; | &lt;MUL&gt; )</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod93">FromClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod94">FromClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>&lt;FROM&gt; <A HREF="#prod100">FromTerm</A> ( &lt;COMMA&gt; <A HREF="#prod100">FromTerm</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;FROM&gt; <A HREF="#prod101">FromTerm</A> ( &lt;COMMA&gt; <A HREF="#prod101">FromTerm</A> )*</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod100">FromTerm</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod101">FromTerm</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod44">Expression</A> ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> ( &lt;AT&gt; <A HREF="#prod50">Variable</A> )? ( ( <A HREF="#prod101">JoinType</A> )? ( <A HREF="#prod102">JoinClause</A> | <A HREF="#prod103">NestClause</A> | <A HREF="#prod104">UnnestClause</A> ) )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod44">Expression</A> ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> ( &lt;AT&gt; <A HREF="#prod50">Variable</A> )? ( ( <A HREF="#prod102">JoinType</A> )? ( <A HREF="#prod103">JoinClause</A> | <A HREF="#prod104">NestClause</A> | <A HREF="#prod105">UnnestClause</A> ) )*</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod102">JoinClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod103">JoinClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;JOIN&gt; <A HREF="#prod44">Expression</A> ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> ( &lt;AT&gt; <A HREF="#prod50">Variable</A> )? &lt;ON&gt; <A HREF="#prod44">Expression</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod103">NestClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod104">NestClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;NEST&gt; <A HREF="#prod44">Expression</A> ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> ( &lt;AT&gt; <A HREF="#prod50">Variable</A> )? &lt;ON&gt; <A HREF="#prod44">Expression</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod104">UnnestClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod105">UnnestClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>( &lt;UNNEST&gt; | &lt;CORRELATE&gt; | &lt;FLATTEN&gt; ) <A HREF="#prod44">Expression</A> ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> ( &lt;AT&gt; <A HREF="#prod50">Variable</A> )?</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod101">JoinType</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod102">JoinType</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>( &lt;INNER&gt; | &lt;LEFT&gt; ( &lt;OUTER&gt; )? )</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod87">LetClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod88">LetClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( ( &lt;LET&gt; | &lt;LETTING&gt; ) <A HREF="#prod105">LetElement</A> ( &lt;COMMA&gt; <A HREF="#prod105">LetElement</A> )* | &lt;WITH&gt; <A HREF="#prod106">WithElement</A> ( &lt;COMMA&gt; <A HREF="#prod106">WithElement</A> )* )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( ( &lt;LET&gt; | &lt;LETTING&gt; ) <A HREF="#prod106">LetElement</A> ( &lt;COMMA&gt; <A HREF="#prod106">LetElement</A> )* | &lt;WITH&gt; <A HREF="#prod107">WithElement</A> ( &lt;COMMA&gt; <A HREF="#prod107">WithElement</A> )* )</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod94">WhereClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod95">WhereClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;WHERE&gt; <A HREF="#prod44">Expression</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod89">OrderbyClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod90">OrderbyClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;ORDER&gt; &lt;BY&gt; <A HREF="#prod44">Expression</A> ( ( &lt;ASC&gt; ) | ( &lt;DESC&gt; ) )? ( &lt;COMMA&gt; <A HREF="#prod44">Expression</A> ( ( &lt;ASC&gt; ) | ( &lt;DESC&gt; ) )? )*</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod95">GroupbyClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod96">GroupbyClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>&lt;GROUP&gt; &lt;BY&gt; ( <A HREF="#prod44">Expression</A> ( ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> )? ( &lt;COMMA&gt; <A HREF="#prod44">Expression</A> ( ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> )? )* ) ( &lt;GROUP&gt; &lt;AS&gt; <A HREF="#prod50">Variable</A> ( &lt;LEFTPAREN&gt; <A HREF="#prod77">VariableRef</A> &lt;AS&gt; <A HREF="#prod18">Identifier</A> ( &lt;COMMA&gt; <A HREF="#prod77">VariableRef</A> &lt;AS&gt; <A HREF="#prod18">Identifier</A> )* &lt;RIGHTPAREN&gt; )? )?</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>&lt;GROUP&gt; &lt;BY&gt; ( <A HREF="#prod44">Expression</A> ( ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> )? ( &lt;COMMA&gt; <A HREF="#prod44">Expression</A> ( ( &lt;AS&gt; )? <A HREF="#prod50">Variable</A> )? )* ) ( &lt;GROUP&gt; &lt;AS&gt; <A HREF="#prod50">Variable</A> ( &lt;LEFTPAREN&gt; <A HREF="#prod78">VariableRef</A> &lt;AS&gt; <A HREF="#prod18">Identifier</A> ( &lt;COMMA&gt; <A HREF="#prod78">VariableRef</A> &lt;AS&gt; <A HREF="#prod18">Identifier</A> )* &lt;RIGHTPAREN&gt; )? )?</TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod96">HavingClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod97">HavingClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;HAVING&gt; <A HREF="#prod44">Expression</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod90">LimitClause</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod91">LimitClause</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE>&lt;LIMIT&gt; <A HREF="#prod44">Expression</A> ( &lt;OFFSET&gt; <A HREF="#prod44">Expression</A> )?</TD>
 </TR>
@@ -893,12 +901,12 @@
 <TD ALIGN=LEFT VALIGN=BASELINE>( ( &lt;SOME&gt; ) | ( &lt;EVERY&gt; ) ) <A HREF="#prod50">Variable</A> &lt;IN&gt; <A HREF="#prod44">Expression</A> ( &lt;COMMA&gt; <A HREF="#prod50">Variable</A> &lt;IN&gt; <A HREF="#prod44">Expression</A> )* &lt;SATISFIES&gt; <A HREF="#prod44">Expression</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod105">LetElement</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod106">LetElement</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod50">Variable</A> &lt;EQ&gt; <A HREF="#prod44">Expression</A></TD>
 </TR>
 <TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod106">WithElement</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod107">WithElement</A></TD>
 <TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
 <TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod50">Variable</A> &lt;AS&gt; <A HREF="#prod44">Expression</A></TD>
 </TR>

http://git-wip-us.apache.org/repos/asf/asterixdb/blob/daa549c2/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
index 4961834..df01fa0 100644
--- a/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
+++ b/asterixdb/asterix-lang-sqlpp/src/main/javacc/SQLPP.jj
@@ -22,6 +22,7 @@ import java.io.InputStreamReader;
 import java.io.Reader;
 import java.io.StringReader;
 import java.util.ArrayList;
+import java.util.Collections;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.LinkedHashMap;
@@ -776,7 +777,7 @@ boolean IfNotExists() throws ParseException:
 {
 }
 {
-  ( LOOKAHEAD(1) <IF> ("not exists"|"NOT EXISTS")
+  ( LOOKAHEAD(1) <IF> <NOT> <EXISTS>
     {
       return true;
     }
@@ -1666,7 +1667,7 @@ Expression RelExpr()throws ParseException:
   IExpressionAnnotation annotation = null;
 }
 {
-    operand = AddExpr()
+    operand = IsExpr()
     {
       if (operand instanceof VariableExpr) {
         String hint = getHint(token);
@@ -1696,7 +1697,7 @@ Expression RelExpr()throws ParseException:
         op.addOperator(token.image);
       }
 
-       operand = AddExpr()
+       operand = IsExpr()
       {
          broadcast = false;
          if (operand instanceof VariableExpr) {
@@ -1717,6 +1718,31 @@ Expression RelExpr()throws ParseException:
      }
 }
 
+Expression IsExpr() throws ParseException:
+{
+    Expression expr = null;
+    Expression operand = null;
+    boolean not = false;
+}
+{
+    operand = AddExpr()
+    ( <IS> (<NOT> { not = true; })? (<NULL> | <MISSING> | <UNKOWN>)
+      {
+        String functionName = "is-" + token.image.toLowerCase();
+        FunctionSignature signature = new FunctionSignature(null, functionName, 1);
+        expr = new CallExpr(signature, new ArrayList<Expression>(Collections.singletonList(operand)));
+        if(not) {
+           FunctionSignature notSignature = new FunctionSignature(null, "not", 1);
+           expr = new CallExpr(notSignature, new ArrayList<Expression>(Collections.singletonList(expr)));
+        }
+      }
+    )?
+    {
+        return expr = expr==null? operand : expr;
+    }
+}
+
+
 Expression AddExpr()throws ParseException:
 {
   OperatorExpr op = null;
@@ -1724,7 +1750,7 @@ Expression AddExpr()throws ParseException:
 }
 {
     operand = MultExpr()
-    ( 
+    (
        LOOKAHEAD(1)
       (<PLUS> | <MINUS>)
       {
@@ -1779,17 +1805,24 @@ Expression UnaryExpr() throws ParseException:
 {
     Expression uexpr = null;
     Expression expr = null;
-}
-{   
-    ( (<PLUS> | <MINUS>)
-    {
-        uexpr = new UnaryExpr();
-        if("+".equals(token.image))
-            ((UnaryExpr)uexpr).setSign(Sign.POSITIVE);
-        else if("-".equals(token.image))
-            ((UnaryExpr)uexpr).setSign(Sign.NEGATIVE);
-        else
-            throw new ParseException();
+    FunctionSignature signature = null;
+}
+{
+    ( (<PLUS> | <MINUS> | <NOT>)
+    {
+        switch(token.image){
+            case "+":
+                uexpr = new UnaryExpr();
+                ((UnaryExpr)uexpr).setSign(Sign.POSITIVE);
+                break;
+            case "-":
+                uexpr = new UnaryExpr();
+                ((UnaryExpr)uexpr).setSign(Sign.NEGATIVE);
+                break;
+            default:
+                signature = new FunctionSignature(null, "not", 1);
+                break;
+        }
     }
     )?
 
@@ -1798,8 +1831,9 @@ Expression UnaryExpr() throws ParseException:
         if(uexpr!=null){
             ((UnaryExpr)uexpr).setExpr(expr);
             return uexpr;
-        }
-        else{
+        } else if (signature!=null){
+            return new CallExpr(signature, new ArrayList<Expression>(Collections.singletonList(expr)));
+        } else{
             return expr;
         }
     }
@@ -2757,6 +2791,7 @@ TOKEN [IGNORE_CASE]:
   | <INSERT : "insert">
   | <INTERNAL : "internal">
   | <INTERSECT : "intersect">
+  | <IS : "is">
   | <JOIN : "join">
   | <KEYWORD : "keyword">
   | <KEY : "key">
@@ -2768,6 +2803,7 @@ TOKEN [IGNORE_CASE]:
   | <NEST : "nest">
   | <NODEGROUP : "nodegroup">
   | <NGRAM : "ngram">
+  | <NOT : "not">
   | <OFFSET : "offset">
   | <ON : "on">
   | <OPEN : "open">
@@ -2794,15 +2830,16 @@ TOKEN [IGNORE_CASE]:
   | <TYPE : "type">
   | <TO : "to">
   | <UNION : "union">
+  | <UNKOWN : "unknown">
   | <UNNEST : "unnest">
+  | <UPDATE : "update">
+  | <USE : "use">
+  | <USING : "using">
   | <VALUE : "value">
   | <WHEN : "when">
   | <WHERE : "where">
   | <WITH : "with">
   | <WRITE : "write">
-  | <UPDATE : "update">
-  | <USE : "use">
-  | <USING : "using">
 }
 
 <DEFAULT,IN_DBL_BRACE>


Mime
View raw message