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>
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 @@
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
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 @@
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
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
));
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
));
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};
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 @@
set `import-private-functions` `true`;
-select element [test.`is-null`(null),test.`is-null`(10)];
+select element [null IS NULL, 10 is null];
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
+};
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
;
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 @@
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
;
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 @@
select element o
from Orders as o
-where not(`is-missing`(o.param1))
+where o.param1 IS NOT MISSING
order by o.oid
;
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 @@
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
;
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 @@
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
;
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 @@
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
;
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 @@
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
;
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 @@
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
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 @@
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}
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 @@
(
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
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 @@
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%')
)
};
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 @@
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
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 @@
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}
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 @@
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
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 @@
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}
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();
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 }
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 @@
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
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 @@
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
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]
]
)
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 @@
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]
]
]
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 @@
]
]
Satifies [
- FunctionCall test.not@1[
+ FunctionCall null.not@1[
Variable [ Name=$x ]
]
]
@@ -75,7 +74,7 @@
]
]
Satifies [
- FunctionCall test.not@1[
+ FunctionCall null.not@1[
Variable [ Name=$x ]
]
]
@@ -89,7 +88,7 @@
]
]
Satifies [
- FunctionCall test.not@1[
+ FunctionCall null.not@1[
Variable [ Name=$x ]
]
]
@@ -103,7 +102,7 @@
]
]
Satifies [
- FunctionCall test.not@1[
+ FunctionCall null.not@1[
Variable [ Name=$x ]
]
]
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 @@
]
]
Satifies [
- FunctionCall test.not@1[
+ FunctionCall null.not@1[
Variable [ Name=$x ]
]
]
@@ -75,7 +75,7 @@
]
]
Satifies [
- FunctionCall test.not@1[
+ FunctionCall null.not@1[
Variable [ Name=$x ]
]
]
@@ -89,7 +89,7 @@
]
]
Satifies [
- FunctionCall test.not@1[
+ FunctionCall null.not@1[
Variable [ Name=$x ]
]
]
@@ -103,7 +103,7 @@
]
]
Satifies [
- FunctionCall test.not@1[
+ FunctionCall null.not@1[
Variable [ Name=$x ]
]
]
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 @@
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
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 @@
LiteralExpr [NULL]
]
)
-]
\ No newline at end of file
+]
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 @@
]
]
Satifies [
- FunctionCall TinySocial.is-missing@1[
+ FunctionCall null.is-missing@1[
FieldAccessor [
Variable [ Name=$e ]
Field=end-date
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 @@
]
]
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
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 @@
]
]
Satifies [
- FunctionCall TinySocial.is-missing@1[
+ FunctionCall null.is-missing@1[
FieldAccessor [
Variable [ Name=$e ]
Field=end-date
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 @@
]
]
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
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 @@
]
]
and
- FunctionCall tpch.not@1[
+ FunctionCall null.not@1[
FunctionCall tpch.like@2[
FieldAccessor [
Variable [ Name=$o ]
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 @@
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 @@
]
]
and
- FunctionCall tpch.not@1[
+ FunctionCall null.not@1[
FunctionCall tpch.like@2[
FieldAccessor [
Variable [ Name=$s ]
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 @@
]
]
and
- FunctionCall tpch.not@1[
+ FunctionCall null.not@1[
FunctionCall tpch.like@2[
FieldAccessor [
Variable [ Name=$o ]
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 @@
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 @@
]
]
and
- FunctionCall tpch.not@1[
+ FunctionCall null.not@1[
FunctionCall tpch.like@2[
FieldAccessor [
Variable [ Name=$s ]
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[
]
]
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">
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 @@
| <INSERT: "insert">
| <INTERNAL: "internal">
| <INTERSECT: "intersect">
+| <IS: "is">
| <JOIN: "join">
| <KEYWORD: "keyword">
| <KEY: "key">
@@ -76,6 +77,7 @@
| <NEST: "nest">
| <NODEGROUP: "nodegroup">
| <NGRAM: "ngram">
+| <NOT: "not">
| <OFFSET: "offset">
| <ON: "on">
| <OPEN: "open">
@@ -102,15 +104,16 @@
| <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">
}
</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>( <IF> ( "not exists" | "NOT EXISTS" ) )?</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( <IF> <NOT> <EXISTS> )?</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> | <GT> | <LE> | <GE> | <EQ> | <NE> | <SIMILAR> ) <A HREF="#prod68">AddExpr</A> )?</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod68">IsExpr</A> ( ( <LT> | <GT> | <LE> | <GE> | <EQ> | <NE> | <SIMILAR> ) <A HREF="#prod68">IsExpr</A> )?</TD>
</TR>
<TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod68">AddExpr</A></TD>
+<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">MultExpr</A> ( ( <PLUS> | <MINUS> ) <A HREF="#prod69">MultExpr</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod69">AddExpr</A> ( <IS> ( <NOT> )? ( <NULL> | <MISSING> | <UNKOWN> ) )?</TD>
</TR>
<TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod69">MultExpr</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="#prod70">UnaryExpr</A> ( ( <MUL> | <DIV> | <MOD> | <CARET> | <IDIV> ) <A HREF="#prod70">UnaryExpr</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod70">MultExpr</A> ( ( <PLUS> | <MINUS> ) <A HREF="#prod70">MultExpr</A> )*</TD>
</TR>
<TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod70">UnaryExpr</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod70">MultExpr</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
-<TD ALIGN=LEFT VALIGN=BASELINE>( ( <PLUS> | <MINUS> ) )? <A HREF="#prod71">ValueExpr</A></TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod71">UnaryExpr</A> ( ( <MUL> | <DIV> | <MOD> | <CARET> | <IDIV> ) <A HREF="#prod71">UnaryExpr</A> )*</TD>
</TR>
<TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod71">ValueExpr</A></TD>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod71">UnaryExpr</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>( ( <PLUS> | <MINUS> | <NOT> ) )? <A HREF="#prod72">ValueExpr</A></TD>
</TR>
<TR>
-<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod73">Field</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="#prod73">PrimaryExpr</A> ( <A HREF="#prod74">Field</A> | <A HREF="#prod75">Index</A> )*</TD>
+</TR>
+<TR>
+<TD ALIGN=RIGHT VALIGN=BASELINE><A NAME="prod74">Field</A></TD>
<TD ALIGN=CENTER VALIGN=BASELINE>::=</TD>
<TD ALIGN=LEFT VALIGN=BASELINE><DOT> <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><LEFTBRACKET> ( <A HREF="#prod44">Expression</A> | <QUES> ) <RIGHTBRACKET></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> | <INTEGER_LITERAL> | <FLOAT_LITERAL> | <DOUBLE_LITERAL> | <MISSING> | <NULL> | <TRUE> | <FALSE> )</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>( <IDENTIFIER> | <A HREF="#prod61">QuotedString</A> )</TD>
</TR>
@@ -738,49 +746,49 @@
<TD ALIGN=LEFT VALIGN=BASELINE>( <IDENTIFIER> | <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><LEFTBRACKET> <A HREF="#prod83">ExpressionList</A> <RIGHTBRACKET></TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><LEFTBRACKET> <A HREF="#prod84">ExpressionList</A> <RIGHTBRACKET></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><LEFTDBLBRACE> <A HREF="#prod83">ExpressionList</A> <RIGHTDBLBRACE></TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><LEFTDBLBRACE> <A HREF="#prod84">ExpressionList</A> <RIGHTDBLBRACE></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> ( <COMMA> <A HREF="#prod83">ExpressionList</A> )? )? ( <A HREF="#prod84">Comma</A> )?</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( <A HREF="#prod44">Expression</A> ( <COMMA> <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><COMMA></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><LEFTBRACE> ( <A HREF="#prod85">FieldBinding</A> ( <COMMA> <A HREF="#prod85">FieldBinding</A> )* )? <RIGHTBRACE></TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><LEFTBRACE> ( <A HREF="#prod86">FieldBinding</A> ( <COMMA> <A HREF="#prod86">FieldBinding</A> )* )? <RIGHTBRACE></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> <COLON> <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> <LEFTPAREN> ( <A HREF="#prod44">Expression</A> ( <COMMA> <A HREF="#prod44">Expression</A> )* )? <RIGHTPAREN></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>( <LEFTPAREN> <A HREF="#prod44">Expression</A> <RIGHTPAREN> | <A HREF="#prod86">Subquery</A> )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( <LEFTPAREN> <A HREF="#prod44">Expression</A> <RIGHTPAREN> | <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> ( ( <UNION> | <INTERSECT> | <EXCEPT> ) ( <ALL> )? ( <A HREF="#prod91">SelectBlock</A> | <A HREF="#prod86">Subquery</A> ) )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod92">SelectBlock</A> ( ( <UNION> | <INTERSECT> | <EXCEPT> ) ( <ALL> )? ( <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><LEFTPAREN> <A HREF="#prod62">SelectExpression</A> <RIGHTPAREN></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><SELECT> ( <ALL> | <DISTINCT> )? ( <A HREF="#prod97">SelectRegular</A> | <A HREF="#prod98">SelectElement</A> )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><SELECT> ( <ALL> | <DISTINCT> )? ( <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> ( <COMMA> <A HREF="#prod99">Projection</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><A HREF="#prod100">Projection</A> ( <COMMA> <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>( <RAW> | <ELEMENT> | <VALUE> ) <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> ( <AS> )? <A HREF="#prod18">Identifier</A> | <A HREF="#prod44">Expression</A> <DOT> <MUL> | <MUL> )</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><FROM> <A HREF="#prod100">FromTerm</A> ( <COMMA> <A HREF="#prod100">FromTerm</A> )*</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><FROM> <A HREF="#prod101">FromTerm</A> ( <COMMA> <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> ( <AS> )? <A HREF="#prod50">Variable</A> ( <AT> <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> ( <AS> )? <A HREF="#prod50">Variable</A> ( <AT> <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><JOIN> <A HREF="#prod44">Expression</A> ( <AS> )? <A HREF="#prod50">Variable</A> ( <AT> <A HREF="#prod50">Variable</A> )? <ON> <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><NEST> <A HREF="#prod44">Expression</A> ( <AS> )? <A HREF="#prod50">Variable</A> ( <AT> <A HREF="#prod50">Variable</A> )? <ON> <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>( <UNNEST> | <CORRELATE> | <FLATTEN> ) <A HREF="#prod44">Expression</A> ( <AS> )? <A HREF="#prod50">Variable</A> ( <AT> <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>( <INNER> | <LEFT> ( <OUTER> )? )</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>( ( <LET> | <LETTING> ) <A HREF="#prod105">LetElement</A> ( <COMMA> <A HREF="#prod105">LetElement</A> )* | <WITH> <A HREF="#prod106">WithElement</A> ( <COMMA> <A HREF="#prod106">WithElement</A> )* )</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE>( ( <LET> | <LETTING> ) <A HREF="#prod106">LetElement</A> ( <COMMA> <A HREF="#prod106">LetElement</A> )* | <WITH> <A HREF="#prod107">WithElement</A> ( <COMMA> <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><WHERE> <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><ORDER> <BY> <A HREF="#prod44">Expression</A> ( ( <ASC> ) | ( <DESC> ) )? ( <COMMA> <A HREF="#prod44">Expression</A> ( ( <ASC> ) | ( <DESC> ) )? )*</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><GROUP> <BY> ( <A HREF="#prod44">Expression</A> ( ( <AS> )? <A HREF="#prod50">Variable</A> )? ( <COMMA> <A HREF="#prod44">Expression</A> ( ( <AS> )? <A HREF="#prod50">Variable</A> )? )* ) ( <GROUP> <AS> <A HREF="#prod50">Variable</A> ( <LEFTPAREN> <A HREF="#prod77">VariableRef</A> <AS> <A HREF="#prod18">Identifier</A> ( <COMMA> <A HREF="#prod77">VariableRef</A> <AS> <A HREF="#prod18">Identifier</A> )* <RIGHTPAREN> )? )?</TD>
+<TD ALIGN=LEFT VALIGN=BASELINE><GROUP> <BY> ( <A HREF="#prod44">Expression</A> ( ( <AS> )? <A HREF="#prod50">Variable</A> )? ( <COMMA> <A HREF="#prod44">Expression</A> ( ( <AS> )? <A HREF="#prod50">Variable</A> )? )* ) ( <GROUP> <AS> <A HREF="#prod50">Variable</A> ( <LEFTPAREN> <A HREF="#prod78">VariableRef</A> <AS> <A HREF="#prod18">Identifier</A> ( <COMMA> <A HREF="#prod78">VariableRef</A> <AS> <A HREF="#prod18">Identifier</A> )* <RIGHTPAREN> )? )?</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><HAVING> <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><LIMIT> <A HREF="#prod44">Expression</A> ( <OFFSET> <A HREF="#prod44">Expression</A> )?</TD>
</TR>
@@ -893,12 +901,12 @@
<TD ALIGN=LEFT VALIGN=BASELINE>( ( <SOME> ) | ( <EVERY> ) ) <A HREF="#prod50">Variable</A> <IN> <A HREF="#prod44">Expression</A> ( <COMMA> <A HREF="#prod50">Variable</A> <IN> <A HREF="#prod44">Expression</A> )* <SATISFIES> <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> <EQ> <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> <AS> <A HREF="#prod44">Expression</A></TD>
</TR>
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.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 @@
{
}
{
- ( LOOKAHEAD(1) <IF> ("not exists"|"NOT EXISTS")
+ ( LOOKAHEAD(1) <IF> <NOT> <EXISTS>
{
return true;
}
@@ -1666,7 +1667,7 @@
IExpressionAnnotation annotation = null;
}
{
- operand = AddExpr()
+ operand = IsExpr()
{
if (operand instanceof VariableExpr) {
String hint = getHint(token);
@@ -1696,7 +1697,7 @@
op.addOperator(token.image);
}
- operand = AddExpr()
+ operand = IsExpr()
{
broadcast = false;
if (operand instanceof VariableExpr) {
@@ -1717,6 +1718,31 @@
}
}
+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 @@
}
{
operand = MultExpr()
- (
+ (
LOOKAHEAD(1)
(<PLUS> | <MINUS>)
{
@@ -1779,17 +1805,24 @@
{
Expression uexpr = null;
Expression expr = null;
+ FunctionSignature signature = null;
}
-{
- ( (<PLUS> | <MINUS>)
+{
+ ( (<PLUS> | <MINUS> | <NOT>)
{
- 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();
+ 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 @@
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 @@
| <INSERT : "insert">
| <INTERNAL : "internal">
| <INTERSECT : "intersect">
+ | <IS : "is">
| <JOIN : "join">
| <KEYWORD : "keyword">
| <KEY : "key">
@@ -2768,6 +2803,7 @@
| <NEST : "nest">
| <NODEGROUP : "nodegroup">
| <NGRAM : "ngram">
+ | <NOT : "not">
| <OFFSET : "offset">
| <ON : "on">
| <OPEN : "open">
@@ -2794,15 +2830,16 @@
| <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>