You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@asterixdb.apache.org by bu...@apache.org on 2016/05/24 01:31:38 UTC
[20/22] incubator-asterixdb git commit: ASTERIXDB-1228: Add MISSING
into the data model.
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/lower/lower.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/lower/lower.1.query.sqlpp
new file mode 100644
index 0000000..7c0e51e
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/lower/lower.1.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+{
+ 'null': LOWER(null),
+ 'missing': LOWER(missing)
+};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/scan-collection/scan-collection.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/scan-collection/scan-collection.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/scan-collection/scan-collection.1.query.sqlpp
new file mode 100644
index 0000000..66c8960
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/scan-collection/scan-collection.1.query.sqlpp
@@ -0,0 +1,24 @@
+/*
+ * 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.
+ */
+
+{
+ 'null': (SELECT ELEMENT item FROM null AS item),
+ 'missing': (SELECT ELEMENT item FROM missing AS item),
+ 'empty_list': (SELECT ELEMENT item FROM [] AS item)
+};
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/substr/substr.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/substr/substr.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/substr/substr.1.query.sqlpp
new file mode 100644
index 0000000..d6bb472
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/substr/substr.1.query.sqlpp
@@ -0,0 +1,43 @@
+/*
+ * 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.
+ */
+
+{
+ 'a': SUBSTR(null, 1),
+ 'b': SUBSTR('abc', null),
+ 'c': SUBSTR(null, null),
+ 'd': SUBSTR(null, 1, 2),
+ 'e': substr('abc', null, 2),
+ 'f': SUBSTR('abc', 1, null),
+ 'g': SUBSTR(null, null, 2),
+ 'h': substr(null, 1, null),
+ 'i': SUBSTR(null, null, null),
+ 'j': SUBSTR('abc', null, null),
+ 'k': SUBSTR(missing, 1),
+ 'l': SUBSTR('abc', missing),
+ 'm': SUBSTR(missing, missing),
+ 'o': SUBSTR(missing, 1, 2),
+ 'p': substr('abc', missing, 2),
+ 'q': SUBSTR('abc', 1, missing),
+ 'r': SUBSTR(missing, missing, 2),
+ 's': substr(missing, 1, missing),
+ 't': SUBSTR(missing, missing, missing),
+ 'u': SUBSTR('abc', missing, missing),
+ 'v': SUBSTR(null, missing, missing),
+ 'w': SUBSTR(null, null, missing)
+};
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/upper/upper.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/upper/upper.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/upper/upper.1.query.sqlpp
new file mode 100644
index 0000000..7c8e4f3
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null-missing/upper/upper.1.query.sqlpp
@@ -0,0 +1,23 @@
+/*
+ * 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.
+ */
+
+{
+ 'null': UPPER(null),
+ 'missing': UPPER(missing)
+};
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/ceil/ceil.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/ceil/ceil.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/ceil/ceil.1.query.sqlpp
deleted file mode 100644
index c880e2d..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/ceil/ceil.1.query.sqlpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- */
-
-CEIL(null);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/length/length.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/length/length.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/length/length.1.query.sqlpp
deleted file mode 100644
index 034ea1b..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/length/length.1.query.sqlpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- */
-
-LENGTH(null);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
deleted file mode 100644
index fbf98ef..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/lower/lower.1.query.sqlpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- */
-
-LOWER(null);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/substr/substr.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/substr/substr.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/substr/substr.1.query.sqlpp
deleted file mode 100644
index bece63a..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/substr/substr.1.query.sqlpp
+++ /dev/null
@@ -1,31 +0,0 @@
-/*
- * 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.
- */
-
-{
- 'a': SUBSTR(null, 1),
- 'b': SUBSTR('abc', null),
- 'c': SUBSTR(null, null),
- 'd': SUBSTR(null, 1, 2),
- 'e': substr('abc', null, 2),
- 'f': SUBSTR('abc', 1, null),
- 'g': SUBSTR(null, null, 2),
- 'h': substr(null, 1, null),
- 'i': SUBSTR(null, null, null),
- 'j': SUBSTR('abc', null, null)
-};
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/upper/upper.1.query.sqlpp
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/upper/upper.1.query.sqlpp b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/upper/upper.1.query.sqlpp
deleted file mode 100644
index 367ee62..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/null/upper/upper.1.query.sqlpp
+++ /dev/null
@@ -1,20 +0,0 @@
-/*
- * 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.
- */
-
-UPPER(null);
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/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 ba8ebd4..55123af 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 test.not(test."is-null"(o.param1))
+where not("is-missing"(o.param1))
order by o.oid
;
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/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 c4119f1..a8f49a9 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-null"(e."end-date")
+where some e in fbu.employment satisfies TinySocial."is-missing"(e."end-date")
order by fbu.id
;
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/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 5611b99..2de3e41 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-null"(e."end-date"))
+where every e in fbu.employment satisfies TinySocial.not(TinySocial."is-missing"(e."end-date"))
order by fbu.id
;
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_04/order_q_04.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_04/order_q_04.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_04/order_q_04.1.adm
index aa5c557..fb2d326 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_04/order_q_04.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_04/order_q_04.1.adm
@@ -1,4 +1,4 @@
-{ "orderid": 1000, "ordertot": 97.20656f, "list": [ [ "1.0f", "yassser" ], [ 11, 14, "yasir", 1.6f ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ "1.0f", "yassser" ], "item2": [ 11, 14, "yasir", 1.6f ], "item5": null, "item10": null }
-{ "orderid": 1, "ordertot": 7.206f, "list": [ [ 1.0f, "5.2f", "60" ], [ 13231, "foo", null, 13.25d, 13.2f ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ 1.0f, "5.2f", "60" ], "item2": [ 13231, "foo", null, 13.25d, 13.2f ], "item5": null, "item10": null }
-{ "orderid": 100, "ordertot": 124.26f, "list": [ [ 1.3f, 5.2f, "60", 12.32f ], [ 10, 2.0f, 3.0d, 40 ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ 1.3f, 5.2f, "60", 12.32f ], "item2": [ 10, 2.0f, 3.0d, 40 ], "item5": null, "item10": null }
-{ "orderid": 10, "ordertot": 14.2326f, "list": [ [ 2.4f, "15" ], [ 110 ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), { "oid": 75, "total": 87.61863f } ], "item1": [ 2.4f, "15" ], "item2": [ 110 ], "item5": { "oid": 75, "total": 87.61863f }, "item10": null }
+{ "orderid": 1000, "ordertot": 97.20656f, "list": [ [ "1.0f", "yassser" ], [ 11, 14, "yasir", 1.6f ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ "1.0f", "yassser" ], "item2": [ 11, 14, "yasir", 1.6f ], "item5": null }
+{ "orderid": 1, "ordertot": 7.206f, "list": [ [ 1.0f, "5.2f", "60" ], [ 13231, "foo", null, 13.25d, 13.2f ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ 1.0f, "5.2f", "60" ], "item2": [ 13231, "foo", null, 13.25d, 13.2f ], "item5": null }
+{ "orderid": 100, "ordertot": 124.26f, "list": [ [ 1.3f, 5.2f, "60", 12.32f ], [ 10, 2.0f, 3.0d, 40 ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), null ], "item1": [ 1.3f, 5.2f, "60", 12.32f ], "item2": [ 10, 2.0f, 3.0d, 40 ], "item5": null }
+{ "orderid": 10, "ordertot": 14.2326f, "list": [ [ 2.4f, "15" ], [ 110 ], point("10.1,11.1"), line("10.1,11.1 10.2,11.2"), polygon("1.2,1.3 2.1,2.5 3.5,3.6 4.6,4.8"), { "oid": 75, "total": 87.61863f } ], "item1": [ 2.4f, "15" ], "item2": [ 110 ], "item5": { "oid": 75, "total": 87.61863f } }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_05/order_q_05.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_05/order_q_05.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_05/order_q_05.1.adm
index 4d0e0c0..7314f94 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_05/order_q_05.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/custord/order_q_05/order_q_05.1.adm
@@ -1,4 +1,4 @@
-{ "orderid": 1000, "ordertot": 97.20656f, "emptyorderedlist": [ ], "emptyunorderedlist": {{ }}, "olist_item1": null, "olist_item5": null, "ulist_item1": null }
-{ "orderid": 1, "ordertot": 7.206f, "emptyorderedlist": [ ], "emptyunorderedlist": {{ }}, "olist_item1": null, "olist_item5": null, "ulist_item1": null }
-{ "orderid": 100, "ordertot": 124.26f, "emptyorderedlist": [ ], "emptyunorderedlist": {{ }}, "olist_item1": null, "olist_item5": null, "ulist_item1": null }
-{ "orderid": 10, "ordertot": 14.2326f, "emptyorderedlist": [ ], "emptyunorderedlist": {{ }}, "olist_item1": null, "olist_item5": null, "ulist_item1": null }
+{ "orderid": 1000, "ordertot": 97.20656f, "emptyorderedlist": [ ], "emptyunorderedlist": {{ }} }
+{ "orderid": 1, "ordertot": 7.206f, "emptyorderedlist": [ ], "emptyunorderedlist": {{ }} }
+{ "orderid": 100, "ordertot": 124.26f, "emptyorderedlist": [ ], "emptyunorderedlist": {{ }} }
+{ "orderid": 10, "ordertot": 14.2326f, "emptyorderedlist": [ ], "emptyunorderedlist": {{ }} }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/array/array.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/array/array.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/array/array.1.adm
new file mode 100644
index 0000000..c239a54
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/array/array.1.adm
@@ -0,0 +1 @@
+[ 1, null, null ]
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/boolean/boolean.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/boolean/boolean.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/boolean/boolean.1.adm
new file mode 100644
index 0000000..feb539b
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/boolean/boolean.1.adm
@@ -0,0 +1 @@
+{ "2": null, "3": null, "4": false, "6": false, "7": true, "8": null, "9": true, "11": null, "12": null, "15": false, "16": true }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/ceil/ceil.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/ceil/ceil.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/ceil/ceil.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/ceil/ceil.1.adm
@@ -0,0 +1 @@
+{ "null": null }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/field-access/field-access.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/field-access/field-access.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/field-access/field-access.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/field-access/field-access.1.adm
@@ -0,0 +1 @@
+{ "null": null }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/length/length.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/length/length.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/length/length.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/length/length.1.adm
@@ -0,0 +1 @@
+{ "null": null }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/lower/lower.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/lower/lower.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/lower/lower.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/lower/lower.1.adm
@@ -0,0 +1 @@
+{ "null": null }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/scan-collection/scan-collection.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/scan-collection/scan-collection.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/scan-collection/scan-collection.1.adm
new file mode 100644
index 0000000..3a7ad17
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/scan-collection/scan-collection.1.adm
@@ -0,0 +1 @@
+{ "null": null, "empty_list": [ ] }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/substr/substr.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/substr/substr.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/substr/substr.1.adm
new file mode 100644
index 0000000..92f6a06
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/substr/substr.1.adm
@@ -0,0 +1 @@
+{ "a": null, "b": null, "c": null, "d": null, "e": null, "f": null, "g": null, "h": null, "i": null, "j": null }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/upper/upper.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/upper/upper.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/upper/upper.1.adm
new file mode 100644
index 0000000..d7a20ef
--- /dev/null
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/null-missing/upper/upper.1.adm
@@ -0,0 +1 @@
+{ "null": null }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null/ceil/ceil.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/ceil/ceil.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null/ceil/ceil.1.adm
deleted file mode 100644
index ec747fa..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/ceil/ceil.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-null
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null/length/length.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/length/length.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null/length/length.1.adm
deleted file mode 100644
index ec747fa..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/length/length.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-null
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null/lower/lower.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/lower/lower.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null/lower/lower.1.adm
deleted file mode 100644
index ec747fa..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/lower/lower.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-null
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null/substr/substr.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/substr/substr.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null/substr/substr.1.adm
deleted file mode 100644
index 92f6a06..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/substr/substr.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-{ "a": null, "b": null, "c": null, "d": null, "e": null, "f": null, "g": null, "h": null, "i": null, "j": null }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/null/upper/upper.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/upper/upper.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/null/upper/upper.1.adm
deleted file mode 100644
index ec747fa..0000000
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/null/upper/upper.1.adm
+++ /dev/null
@@ -1 +0,0 @@
-null
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite-open/query-ASTERIXDB-1329.24.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite-open/query-ASTERIXDB-1329.24.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite-open/query-ASTERIXDB-1329.24.adm
index 19da672..72e7ff3 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite-open/query-ASTERIXDB-1329.24.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/tinysocial/tinysocial-suite-open/query-ASTERIXDB-1329.24.adm
@@ -1,9 +1,9 @@
-{ "uname": "BramHatch", "alias": "Bram", "msg": "cemail-service is OMG:(" }
-{ "uname": "BramHatch", "alias": "Bram", "msg": "mand is bad:(" }
-{ "uname": "EmoryUnk", "alias": "Emory", "msg": "u is awesome:)" }
-{ "uname": "IsbelDull", "alias": "Isbel", "msg": "s mind-blowing" }
-{ "uname": "IsbelDull", "alias": "Isbel", "msg": "zing" }
-{ "uname": "MargaritaStoddard", "alias": "Margarita", "msg": " is horrible:(" }
-{ "uname": "MargaritaStoddard", "alias": "Margarita", "msg": " terrible" }
-{ "uname": "MargaritaStoddard", "alias": "Margarita", "msg": "een is horrible" }
-{ "uname": "WillisWynne", "alias": "Willis", "msg": "n is mind-blowing" }
+{ "msg": "cemail-service is OMG:(", "uname": "BramHatch", "alias": "Bram" }
+{ "msg": "mand is bad:(", "uname": "BramHatch", "alias": "Bram" }
+{ "msg": "u is awesome:)", "uname": "EmoryUnk", "alias": "Emory" }
+{ "msg": "s mind-blowing", "uname": "IsbelDull", "alias": "Isbel" }
+{ "msg": "zing", "uname": "IsbelDull", "alias": "Isbel" }
+{ "msg": " is horrible:(", "uname": "MargaritaStoddard", "alias": "Margarita" }
+{ "msg": " terrible", "uname": "MargaritaStoddard", "alias": "Margarita" }
+{ "msg": "een is horrible", "uname": "MargaritaStoddard", "alias": "Margarita" }
+{ "msg": "n is mind-blowing", "uname": "WillisWynne", "alias": "Willis" }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-app/src/test/resources/runtimets/results/types/opentype_orderby_01/opentype_orderby_01.1.adm
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/src/test/resources/runtimets/results/types/opentype_orderby_01/opentype_orderby_01.1.adm b/asterixdb/asterix-app/src/test/resources/runtimets/results/types/opentype_orderby_01/opentype_orderby_01.1.adm
index 3181666..3486483 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/results/types/opentype_orderby_01/opentype_orderby_01.1.adm
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/results/types/opentype_orderby_01/opentype_orderby_01.1.adm
@@ -1,49 +1,49 @@
-{ "emp.id": 1, "emp.supvrid": null }
+{ "emp.id": 1 }
{ "emp.id": 2, "emp.supvrid": 1 }
{ "emp.id": 3, "emp.supvrid": 1 }
{ "emp.id": 4, "emp.supvrid": "1" }
{ "emp.id": 5, "emp.supvrid": 1.0d }
-{ "emp.id": 6, "emp.supvrid": null }
+{ "emp.id": 6 }
{ "emp.id": 7, "emp.supvrid": 2 }
{ "emp.id": 8, "emp.supvrid": 2 }
{ "emp.id": 9, "emp.supvrid": "2" }
{ "emp.id": 10, "emp.supvrid": 2.0d }
-{ "emp.id": 11, "emp.supvrid": null }
+{ "emp.id": 11 }
{ "emp.id": 12, "emp.supvrid": 3 }
{ "emp.id": 13, "emp.supvrid": 3 }
{ "emp.id": 14, "emp.supvrid": "3" }
{ "emp.id": 15, "emp.supvrid": 3.0d }
-{ "emp.id": 16, "emp.supvrid": null }
+{ "emp.id": 16 }
{ "emp.id": 17, "emp.supvrid": 4 }
{ "emp.id": 18, "emp.supvrid": 4 }
{ "emp.id": 19, "emp.supvrid": "4" }
{ "emp.id": 20, "emp.supvrid": 4.0d }
-{ "emp.id": 21, "emp.supvrid": null }
+{ "emp.id": 21 }
{ "emp.id": 22, "emp.supvrid": 5 }
{ "emp.id": 23, "emp.supvrid": 5 }
{ "emp.id": 24, "emp.supvrid": "5" }
{ "emp.id": 25, "emp.supvrid": 5.0d }
-{ "emp.id": 26, "emp.supvrid": null }
+{ "emp.id": 26 }
{ "emp.id": 27, "emp.supvrid": 6 }
{ "emp.id": 28, "emp.supvrid": 6 }
{ "emp.id": 29, "emp.supvrid": "6" }
{ "emp.id": 30, "emp.supvrid": 6.0d }
-{ "emp.id": 31, "emp.supvrid": null }
+{ "emp.id": 31 }
{ "emp.id": 32, "emp.supvrid": 7 }
{ "emp.id": 33, "emp.supvrid": 7 }
{ "emp.id": 34, "emp.supvrid": "7" }
{ "emp.id": 35, "emp.supvrid": 7.0d }
-{ "emp.id": 36, "emp.supvrid": null }
+{ "emp.id": 36 }
{ "emp.id": 37, "emp.supvrid": 8 }
{ "emp.id": 38, "emp.supvrid": 8 }
{ "emp.id": 39, "emp.supvrid": "8" }
{ "emp.id": 40, "emp.supvrid": 8.0d }
-{ "emp.id": 41, "emp.supvrid": null }
+{ "emp.id": 41 }
{ "emp.id": 42, "emp.supvrid": 9 }
{ "emp.id": 43, "emp.supvrid": 9 }
{ "emp.id": 44, "emp.supvrid": "9" }
{ "emp.id": 45, "emp.supvrid": 9.0d }
-{ "emp.id": 46, "emp.supvrid": null }
+{ "emp.id": 46 }
{ "emp.id": 47, "emp.supvrid": 10 }
{ "emp.id": 48, "emp.supvrid": 10 }
{ "emp.id": 49, "emp.supvrid": "10" }
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/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 5fb8fda..1bdd63d 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
@@ -11,7 +11,7 @@ FROM [ FunctionCall Metadata.dataset@1[
]
Where
FunctionCall test.not@1[
- FunctionCall test.is-null@1[
+ FunctionCall test.is-missing@1[
FieldAccessor [
Variable [ Name=$o ]
Field=param1
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/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 c6a14c7..e4278c4 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-null@1[
+ FunctionCall TinySocial.is-missing@1[
FieldAccessor [
Variable [ Name=$e ]
Field=end-date
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/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 0bc18b9..d82f5bd 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
@@ -19,7 +19,7 @@ Where
]
Satifies [
FunctionCall TinySocial.not@1[
- FunctionCall TinySocial.is-null@1[
+ FunctionCall TinySocial.is-missing@1[
FieldAccessor [
Variable [ Name=$e ]
Field=end-date
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/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 b753974..86d5822 100644
--- a/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
+++ b/asterixdb/asterix-app/src/test/resources/runtimets/testsuite_sqlpp.xml
@@ -3582,28 +3582,48 @@
</compilation-unit>
</test-case>
</test-group>
- <test-group name="null">
- <test-case FilePath="null">
+ <test-group name="null-missing">
+ <test-case FilePath="null-missing">
+ <compilation-unit name="array">
+ <output-dir compare="Text">array</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="null-missing">
+ <compilation-unit name="boolean">
+ <output-dir compare="Text">boolean</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="null-missing">
<compilation-unit name="ceil">
<output-dir compare="Text">ceil</output-dir>
</compilation-unit>
</test-case>
- <test-case FilePath="null">
+ <test-case FilePath="null-missing">
+ <compilation-unit name="field-access">
+ <output-dir compare="Text">field-access</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="null-missing">
<compilation-unit name="length">
<output-dir compare="Text">length</output-dir>
</compilation-unit>
</test-case>
- <test-case FilePath="null">
+ <test-case FilePath="null-missing">
<compilation-unit name="lower">
<output-dir compare="Text">lower</output-dir>
</compilation-unit>
</test-case>
- <test-case FilePath="null">
+ <test-case FilePath="null-missing">
+ <compilation-unit name="scan-collection">
+ <output-dir compare="Text">scan-collection</output-dir>
+ </compilation-unit>
+ </test-case>
+ <test-case FilePath="null-missing">
<compilation-unit name="substr">
<output-dir compare="Text">substr</output-dir>
</compilation-unit>
</test-case>
- <test-case FilePath="null">
+ <test-case FilePath="null-missing">
<compilation-unit name="upper">
<output-dir compare="Text">upper</output-dir>
</compilation-unit>
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
index c7304a1..d78abb6 100644
--- a/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
+++ b/asterixdb/asterix-common/src/main/java/org/apache/asterix/common/dataflow/AsterixLSMTreeInsertDeleteOperatorDescriptor.java
@@ -21,7 +21,7 @@ package org.apache.asterix.common.dataflow;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
import org.apache.hyracks.api.dataflow.value.ITypeTraits;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -52,7 +52,8 @@ public class AsterixLSMTreeInsertDeleteOperatorDescriptor extends LSMTreeIndexIn
IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields, int[] fieldPermutation,
IndexOperation op, IIndexDataflowHelperFactory dataflowHelperFactory,
ITupleFilterFactory tupleFilterFactory, boolean isPrimary, String indexName,
- INullWriterFactory nullWriterFactory, IModificationOperationCallbackFactory modificationOpCallbackProvider,
+ IMissingWriterFactory nullWriterFactory,
+ IModificationOperationCallbackFactory modificationOpCallbackProvider,
ISearchOperationCallbackFactory searchOpCallbackProvider) {
super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
comparatorFactories, bloomFilterKeyFields, fieldPermutation, op, dataflowHelperFactory,
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/LookupAdapterFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/LookupAdapterFactory.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/LookupAdapterFactory.java
index 49c5943..fa6897f 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/LookupAdapterFactory.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/adapter/factory/LookupAdapterFactory.java
@@ -35,7 +35,7 @@ import org.apache.asterix.external.provider.ParserFactoryProvider;
import org.apache.asterix.om.types.ARecordType;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -49,16 +49,16 @@ public class LookupAdapterFactory<T> implements Serializable {
private final int[] ridFields;
private Map<String, String> configuration;
private final boolean retainInput;
- private final boolean retainNull;
- private final INullWriterFactory iNullWriterFactory;
+ private final boolean retainMissing;
+ private final IMissingWriterFactory isMissingWriterFactory;
public LookupAdapterFactory(ARecordType recordType, int[] ridFields, boolean retainInput, boolean retainNull,
- INullWriterFactory iNullWriterFactory) {
+ IMissingWriterFactory iNullWriterFactory) {
this.recordType = recordType;
this.ridFields = ridFields;
this.retainInput = retainInput;
- this.retainNull = retainNull;
- this.iNullWriterFactory = iNullWriterFactory;
+ this.retainMissing = retainNull;
+ this.isMissingWriterFactory = iNullWriterFactory;
}
public LookupAdapter<T> createAdapter(IHyracksTaskContext ctx, int partition, RecordDescriptor inRecDesc,
@@ -69,8 +69,8 @@ public class LookupAdapterFactory<T> implements Serializable {
snapshotAccessor);
reader.configure(configuration);
RecordIdReader ridReader = RecordIdReaderFactory.create(configuration, ridFields);
- return new LookupAdapter<T>(dataParser, reader, inRecDesc, ridReader, retainInput, retainNull,
- iNullWriterFactory, ctx, writer);
+ return new LookupAdapter<>(dataParser, reader, inRecDesc, ridReader, retainInput, retainMissing,
+ isMissingWriterFactory, ctx, writer);
} catch (Exception e) {
throw new HyracksDataException(e);
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/dataset/adapter/LookupAdapter.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/dataset/adapter/LookupAdapter.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/dataset/adapter/LookupAdapter.java
index 69cd063..baf5dba 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/dataset/adapter/LookupAdapter.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/dataset/adapter/LookupAdapter.java
@@ -31,8 +31,8 @@ import org.apache.asterix.external.util.DataflowUtils;
import org.apache.hyracks.api.comm.IFrameWriter;
import org.apache.hyracks.api.comm.VSizeFrame;
import org.apache.hyracks.api.context.IHyracksTaskContext;
-import org.apache.hyracks.api.dataflow.value.INullWriter;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriter;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
import org.apache.hyracks.api.exceptions.HyracksDataException;
import org.apache.hyracks.dataflow.common.comm.io.ArrayTupleBuilder;
@@ -52,11 +52,11 @@ public final class LookupAdapter<T> implements IFrameWriter {
private FrameTupleAccessor tupleAccessor;
private IFrameWriter writer;
private FrameTupleReference frameTuple;
- private ArrayTupleBuilder nullTupleBuild;
+ private ArrayTupleBuilder missingTupleBuild;
public LookupAdapter(IRecordDataParser<T> dataParser, ILookupRecordReader<? extends T> recordReader,
RecordDescriptor inRecDesc, RecordIdReader ridReader, boolean propagateInput, boolean retainNull,
- INullWriterFactory iNullWriterFactory, IHyracksTaskContext ctx, IFrameWriter writer)
+ IMissingWriterFactory iNullWriterFactory, IHyracksTaskContext ctx, IFrameWriter writer)
throws HyracksDataException {
this.dataParser = dataParser;
this.recordReader = recordReader;
@@ -70,7 +70,7 @@ public final class LookupAdapter<T> implements IFrameWriter {
this.writer = writer;
}
- private void configurePropagation(INullWriterFactory iNullWriterFactory) {
+ private void configurePropagation(IMissingWriterFactory iNullWriterFactory) {
if (propagateInput) {
// This LookupAdapter generates an external record as its output.
// Thus, we add 1.
@@ -80,16 +80,16 @@ public final class LookupAdapter<T> implements IFrameWriter {
tb = new ArrayTupleBuilder(1);
}
if (retainNull) {
- INullWriter nullWriter = iNullWriterFactory.createNullWriter();
- nullTupleBuild = new ArrayTupleBuilder(1);
- DataOutput out = nullTupleBuild.getDataOutput();
+ IMissingWriter missingWriter = iNullWriterFactory.createMissingWriter();
+ missingTupleBuild = new ArrayTupleBuilder(1);
+ DataOutput out = missingTupleBuild.getDataOutput();
try {
- nullWriter.writeNull(out);
+ missingWriter.writeMissing(out);
} catch (IOException e) {
e.printStackTrace();
}
} else {
- nullTupleBuild = null;
+ missingTupleBuild = null;
}
}
@@ -131,7 +131,7 @@ public final class LookupAdapter<T> implements IFrameWriter {
tb.addFieldEndOffset();
DataflowUtils.addTupleToFrame(appender, tb, writer);
} else if (retainNull) {
- tb.getDataOutput().write(nullTupleBuild.getByteArray());
+ tb.getDataOutput().write(missingTupleBuild.getByteArray());
tb.addFieldEndOffset();
DataflowUtils.addTupleToFrame(appender, tb, writer);
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/RecordIdReader.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/RecordIdReader.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/RecordIdReader.java
index 2b4cc9c..5de2d9d 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/RecordIdReader.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/indexing/RecordIdReader.java
@@ -31,7 +31,7 @@ import org.apache.hyracks.dataflow.common.comm.util.ByteBufferInputStream;
public class RecordIdReader {
- private final static byte nullByte = ATypeTag.NULL.serialize();
+ private final static byte MISSING_BYTE = ATypeTag.SERIALIZED_MISSING_TYPE_TAG;
protected FrameTupleAccessor tupleAccessor;
protected int fieldSlotsLength;
protected int[] ridFields;
@@ -60,7 +60,7 @@ public class RecordIdReader {
int fileNumberStartOffset = tupleAccessor.getFieldStartOffset(index,
ridFields[IndexingConstants.FILE_NUMBER_FIELD_INDEX]);
frameBuffer = tupleAccessor.getBuffer();
- if (frameBuffer.get(tupleStartOffset + fileNumberStartOffset) == nullByte) {
+ if (frameBuffer.get(tupleStartOffset + fileNumberStartOffset) == MISSING_BYTE) {
return null;
}
// Get file number
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ExternalFunctionProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ExternalFunctionProvider.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ExternalFunctionProvider.java
index df0ddc8..4f5242e 100755
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ExternalFunctionProvider.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/ExternalFunctionProvider.java
@@ -77,12 +77,12 @@ class ExternalScalarFunction extends ExternalFunction implements IExternalScalar
((IExternalScalarFunction) externalFunction).evaluate(argumentProvider);
/*
* Make sure that if "setResult" is not called,
- * or the result object is null we let Hyracks storage manager know
- * we want to discard a null object
+ * or the result object is missing we let Hyracks storage manager know
+ * we want to discard a missing object
*/
byte byteOutput = resultBuffer.getByteArray()[0];
- if (!argumentProvider.isValidResult() || byteOutput == ATypeTag.SERIALIZED_NULL_TYPE_TAG) {
- resultBuffer.getDataOutput().writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+ if (!argumentProvider.isValidResult() || byteOutput == ATypeTag.SERIALIZED_MISSING_TYPE_TAG) {
+ resultBuffer.getDataOutput().writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
}
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java
index cdd29ff..e2ed092 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/JTypeObjectFactory.java
@@ -18,8 +18,6 @@
*/
package org.apache.asterix.external.library;
-import java.util.List;
-
import org.apache.asterix.external.api.IJObject;
import org.apache.asterix.external.library.java.JObjects.JBoolean;
import org.apache.asterix.external.library.java.JObjects.JCircle;
@@ -43,7 +41,6 @@ import org.apache.asterix.external.library.java.JObjects.JTime;
import org.apache.asterix.external.library.java.JObjects.JUnorderedList;
import org.apache.asterix.om.types.AOrderedListType;
import org.apache.asterix.om.types.ARecordType;
-import org.apache.asterix.om.types.ATypeTag;
import org.apache.asterix.om.types.AUnionType;
import org.apache.asterix.om.types.AUnorderedListType;
import org.apache.asterix.om.types.IAType;
@@ -135,18 +132,16 @@ public class JTypeObjectFactory implements IObjectFactory<IJObject, IAType> {
break;
case UNION:
AUnionType unionType = (AUnionType) type;
- List<IAType> unionList = unionType.getUnionList();
IJObject itemObject = null;
- for (IAType elementType : unionList) {
- if (!elementType.getTypeTag().equals(ATypeTag.NULL)) {
- itemObject = create(elementType);
- break;
- }
+ if (unionType.isMissableType()) {
+ itemObject = create(unionType);
}
- return retValue = itemObject;
+ retValue = itemObject;
+ break;
default:
break;
}
return retValue;
}
+
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java
index ed3cd32..0630985 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjectUtil.java
@@ -254,17 +254,18 @@ public class JObjectUtil {
dis.readInt(); // list size
int numberOfitems;
numberOfitems = dis.readInt();
- if (numberOfitems > 0) {
- if (!fixedSize) {
- for (int i = 0; i < numberOfitems; i++)
- dis.readInt();
- }
+ if (numberOfitems <= 0) {
+ break;
+ }
+ if (!fixedSize) {
for (int i = 0; i < numberOfitems; i++) {
- IJObject v = getJType(elementType.getTypeTag(), elementType, dis, objectPool);
- ((JUnorderedList) jObject).add(v);
+ dis.readInt();
}
}
-
+ for (int i = 0; i < numberOfitems; i++) {
+ IJObject v = getJType(elementType.getTypeTag(), elementType, dis, objectPool);
+ ((JUnorderedList) jObject).add(v);
+ }
break;
}
case ORDEREDLIST: {
@@ -289,17 +290,18 @@ public class JObjectUtil {
dis.readInt(); // list size
int numberOfitems;
numberOfitems = dis.readInt();
- if (numberOfitems > 0) {
- if (!fixedSize) {
- for (int i = 0; i < numberOfitems; i++)
- dis.readInt();
- }
+ if (numberOfitems <= 0) {
+ break;
+ }
+ if (!fixedSize) {
for (int i = 0; i < numberOfitems; i++) {
- IJObject v = getJType(elementType.getTypeTag(), elementType, dis, objectPool);
- ((JOrderedList) jObject).add(v);
+ dis.readInt();
}
}
-
+ for (int i = 0; i < numberOfitems; i++) {
+ IJObject v = getJType(elementType.getTypeTag(), elementType, dis, objectPool);
+ ((JOrderedList) jObject).add(v);
+ }
break;
}
case RECORD:
@@ -348,7 +350,7 @@ public class JObjectUtil {
IAType fieldType = fieldTypes[fieldNumber];
if (fieldTypes[fieldNumber].getTypeTag() == ATypeTag.UNION) {
if (((AUnionType) fieldTypes[fieldNumber]).isNullableType()) {
- fieldType = ((AUnionType) fieldTypes[fieldNumber]).getNullableType();
+ fieldType = ((AUnionType) fieldTypes[fieldNumber]).getActualType();
fieldValueTypeTag = fieldType.getTypeTag();
}
} else {
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java
index a0e66b1..ebda69c 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/library/java/JObjects.java
@@ -143,7 +143,7 @@ public class JObjects {
public void serialize(DataOutput dataOutput, boolean writeTypeTag) throws HyracksDataException {
if (writeTypeTag) {
try {
- dataOutput.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+ dataOutput.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
} catch (IOException e) {
throw new HyracksDataException(e);
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
index 26c9c7d..c1903e0 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorDescriptor.java
@@ -21,7 +21,7 @@ package org.apache.asterix.external.operators;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
import org.apache.hyracks.api.dataflow.value.ITypeTraits;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -42,11 +42,11 @@ public class ExternalBTreeSearchOperatorDescriptor extends BTreeSearchOperatorDe
IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
IBinaryComparatorFactory[] comparatorFactories, int[] bloomFilterKeyFields, int[] lowKeyFields,
int[] highKeyFields, boolean lowKeyInclusive, boolean highKeyInclusive,
- IIndexDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainNull,
- INullWriterFactory iNullWriterFactory, ISearchOperationCallbackFactory searchOpCallbackProvider) {
+ IIndexDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainMissing,
+ IMissingWriterFactory missingWriterFactory, ISearchOperationCallbackFactory searchOpCallbackProvider) {
super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
comparatorFactories, bloomFilterKeyFields, lowKeyFields, highKeyFields, lowKeyInclusive,
- highKeyInclusive, dataflowHelperFactory, retainInput, retainNull, iNullWriterFactory,
+ highKeyInclusive, dataflowHelperFactory, retainInput, retainMissing, missingWriterFactory,
searchOpCallbackProvider, null, null);
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorNodePushable.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorNodePushable.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorNodePushable.java
index 9435387..9b83a12 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorNodePushable.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalBTreeSearchOperatorNodePushable.java
@@ -51,20 +51,20 @@ public class ExternalBTreeSearchOperatorNodePushable extends BTreeSearchOperator
accessor = new FrameTupleAccessor(inputRecDesc);
dataFlowHelper.open();
index = indexHelper.getIndexInstance();
- if (retainNull) {
+ if (retainMissing) {
int fieldCount = getFieldCount();
- nullTupleBuild = new ArrayTupleBuilder(fieldCount);
- DataOutput out = nullTupleBuild.getDataOutput();
+ nonMatchTupleBuild = new ArrayTupleBuilder(fieldCount);
+ DataOutput out = nonMatchTupleBuild.getDataOutput();
for (int i = 0; i < fieldCount; i++) {
try {
- nullWriter.writeNull(out);
+ nonMatchWriter.writeMissing(out);
} catch (IOException e) {
e.printStackTrace();
}
- nullTupleBuild.addFieldEndOffset();
+ nonMatchTupleBuild.addFieldEndOffset();
}
} else {
- nullTupleBuild = null;
+ nonMatchTupleBuild = null;
}
ExternalBTreeWithBuddy externalIndex = (ExternalBTreeWithBuddy) index;
try {
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
index 2cab3a7..f4c7644 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalLookupOperatorDescriptor.java
@@ -26,7 +26,7 @@ import org.apache.asterix.external.indexing.ExternalFileIndexAccessor;
import org.apache.asterix.external.indexing.FilesIndexDescription;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -52,19 +52,19 @@ public class ExternalLookupOperatorDescriptor extends AbstractTreeIndexOperatorD
boolean propagateInput, IIndexLifecycleManagerProvider lcManagerProvider,
IStorageManagerInterface storageManager, IFileSplitProvider fileSplitProvider, int datasetId,
double bloomFilterFalsePositiveRate, ISearchOperationCallbackFactory searchOpCallbackFactory,
- boolean retainNull, INullWriterFactory iNullWriterFactory) {
+ boolean retainMissing, IMissingWriterFactory missingWriterFactory) {
super(spec, 1, 1, outRecDesc, storageManager, lcManagerProvider, fileSplitProvider,
new FilesIndexDescription().EXTERNAL_FILE_INDEX_TYPE_TRAITS,
new FilesIndexDescription().FILES_INDEX_COMP_FACTORIES, FilesIndexDescription.BLOOM_FILTER_FIELDS,
- externalFilesIndexDataFlowHelperFactory, null, propagateInput, retainNull, iNullWriterFactory, null,
- searchOpCallbackFactory, null);
+ externalFilesIndexDataFlowHelperFactory, null, propagateInput, retainMissing, missingWriterFactory,
+ null, searchOpCallbackFactory, null);
this.adapterFactory = adapterFactory;
}
@Override
public IOperatorNodePushable createPushRuntime(final IHyracksTaskContext ctx,
final IRecordDescriptorProvider recordDescProvider, final int partition, int nPartitions)
- throws HyracksDataException {
+ throws HyracksDataException {
// Create a file index accessor to be used for files lookup operations
// Note that all file index accessors will use partition 0 since we only have 1 files index per NC
final ExternalFileIndexAccessor snapshotAccessor = new ExternalFileIndexAccessor(
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
index 306f75a..e217365 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorDescriptor.java
@@ -21,7 +21,7 @@ package org.apache.asterix.external.operators;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
import org.apache.hyracks.api.dataflow.value.IBinaryComparatorFactory;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
import org.apache.hyracks.api.dataflow.value.ITypeTraits;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
@@ -41,10 +41,10 @@ public class ExternalRTreeSearchOperatorDescriptor extends RTreeSearchOperatorDe
IStorageManagerInterface storageManager, IIndexLifecycleManagerProvider lifecycleManagerProvider,
IFileSplitProvider fileSplitProvider, ITypeTraits[] typeTraits,
IBinaryComparatorFactory[] comparatorFactories, int[] keyFields,
- ExternalRTreeDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainNull,
- INullWriterFactory iNullWriterFactory, ISearchOperationCallbackFactory searchOpCallbackFactory) {
+ ExternalRTreeDataflowHelperFactory dataflowHelperFactory, boolean retainInput, boolean retainMissing,
+ IMissingWriterFactory missingWriterFactory, ISearchOperationCallbackFactory searchOpCallbackFactory) {
super(spec, recDesc, storageManager, lifecycleManagerProvider, fileSplitProvider, typeTraits,
- comparatorFactories, keyFields, dataflowHelperFactory, retainInput, retainNull, iNullWriterFactory,
+ comparatorFactories, keyFields, dataflowHelperFactory, retainInput, retainMissing, missingWriterFactory,
searchOpCallbackFactory, null, null);
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorNodePushable.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorNodePushable.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorNodePushable.java
index 81e6b17..cda2985 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorNodePushable.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/ExternalRTreeSearchOperatorNodePushable.java
@@ -50,20 +50,20 @@ public class ExternalRTreeSearchOperatorNodePushable extends RTreeSearchOperator
indexHelper.open();
ExternalRTreeDataflowHelper rTreeDataflowHelper = (ExternalRTreeDataflowHelper) indexHelper;
index = indexHelper.getIndexInstance();
- if (retainNull) {
+ if (retainMissing) {
int fieldCount = getFieldCount();
- nullTupleBuild = new ArrayTupleBuilder(fieldCount);
- DataOutput out = nullTupleBuild.getDataOutput();
+ nonMatchTupleBuild = new ArrayTupleBuilder(fieldCount);
+ DataOutput out = nonMatchTupleBuild.getDataOutput();
for (int i = 0; i < fieldCount; i++) {
try {
- nullWriter.writeNull(out);
+ nonMatchWriter.writeMissing(out);
} catch (IOException e) {
e.printStackTrace();
}
- nullTupleBuild.addFieldEndOffset();
+ nonMatchTupleBuild.addFieldEndOffset();
}
} else {
- nullTupleBuild = null;
+ nonMatchTupleBuild = null;
}
ExternalRTree rTreeIndex = (ExternalRTree) index;
try {
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
index 2bc6043..63a3780 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/operators/IndexInfoOperatorDescriptor.java
@@ -21,7 +21,7 @@ package org.apache.asterix.external.operators;
import org.apache.hyracks.api.context.IHyracksTaskContext;
import org.apache.hyracks.api.dataflow.ActivityId;
import org.apache.hyracks.api.dataflow.IOperatorNodePushable;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
import org.apache.hyracks.api.dataflow.value.IRecordDescriptorProvider;
import org.apache.hyracks.api.dataflow.value.RecordDescriptor;
import org.apache.hyracks.api.exceptions.HyracksDataException;
@@ -114,12 +114,12 @@ public class IndexInfoOperatorDescriptor implements IIndexOperatorDescriptor{
}
@Override
- public boolean getRetainNull() {
+ public boolean getRetainMissing() {
return false;
}
@Override
- public INullWriterFactory getNullWriterFactory() {
+ public IMissingWriterFactory getMissingWriterFactory() {
return null;
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java
index c273412..0ad7be1 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/ADMDataParser.java
@@ -464,11 +464,10 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
}
if (aObjectType.getTypeTag() == ATypeTag.UNION) {
- List<IAType> unionList = ((AUnionType) aObjectType).getUnionList();
- for (int i = 0; i < unionList.size(); i++) {
- if (unionList.get(i).getTypeTag() == tag) {
- return unionList.get(i);
- }
+ AUnionType unionType = (AUnionType) aObjectType;
+ IAType type = unionType.getActualType();
+ if (type.getTypeTag() == tag) {
+ return type;
}
}
return null; // wont get here
@@ -490,7 +489,7 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
} else { // union
List<IAType> unionList = ((AUnionType) aObjectType).getUnionList();
for (IAType t : unionList) {
- ATypeTag typeTag = t.getTypeTag();
+ final ATypeTag typeTag = t.getTypeTag();
if (ATypeHierarchy.canPromote(expectedTypeTag, typeTag)
|| ATypeHierarchy.canDemote(expectedTypeTag, typeTag)) {
return typeTag;
@@ -621,7 +620,6 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
}
private int checkNullConstraints(ARecordType recType, BitSet nulls) {
- boolean isNull = false;
for (int i = 0; i < recType.getFieldTypes().length; i++) {
if (nulls.get(i) == false) {
IAType type = recType.getFieldTypes()[i];
@@ -629,17 +627,13 @@ public class ADMDataParser extends AbstractDataParser implements IStreamDataPars
return i;
}
- if (type.getTypeTag() == ATypeTag.UNION) { // union
- List<IAType> unionList = ((AUnionType) type).getUnionList();
- for (int j = 0; j < unionList.size(); j++) {
- if (unionList.get(j).getTypeTag() == ATypeTag.NULL) {
- isNull = true;
- break;
- }
- }
- if (!isNull) {
- return i;
- }
+ if (type.getTypeTag() != ATypeTag.UNION) {
+ continue;
+ }
+ // union
+ AUnionType unionType = (AUnionType) type;
+ if (!unionType.isNullableType()) {
+ return i;
}
}
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/DelimitedDataParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/DelimitedDataParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/DelimitedDataParser.java
index 725ef22..28fd169 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/DelimitedDataParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/DelimitedDataParser.java
@@ -167,7 +167,9 @@ public class DelimitedDataParser extends AbstractDataParser implements IStreamDa
cursor = new FieldCursorForDelimitedDataParser(new InputStreamReader(in), fieldDelimiter, quote);
if (in != null && hasHeader) {
cursor.nextRecord();
- while (cursor.nextField());
+ while (cursor.nextField()) {
+ ;
+ }
}
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java
index 6e7e7f3..9723461 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/HiveRecordParser.java
@@ -218,7 +218,7 @@ public class HiveRecordParser implements IRecordDataParser<Writable> {
if (NonTaggedFormatUtil.isOptional(type)) {
throw new NotImplementedException("Non-optional UNION type is not supported.");
}
- tag = ((AUnionType) type).getNullableType().getTypeTag();
+ tag = ((AUnionType) type).getActualType().getTypeTag();
}
if (tag == null) {
throw new NotImplementedException("Failed to get the type information for field " + i + ".");
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RecordWithMetadataParser.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RecordWithMetadataParser.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RecordWithMetadataParser.java
index 38932d3..5c46a42 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RecordWithMetadataParser.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/parser/RecordWithMetadataParser.java
@@ -77,7 +77,7 @@ public class RecordWithMetadataParser<T, O> implements IRecordWithMetaDataParser
rwm = converter.convert(record);
if (rwm.getRecord().size() == 0) {
// null record
- out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+ out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
} else {
recordParser.parse(rwm.getRecord(), out);
}
@@ -90,7 +90,7 @@ public class RecordWithMetadataParser<T, O> implements IRecordWithMetaDataParser
public void parseMeta(DataOutput out) throws HyracksDataException {
try {
if (rwm.getRecord().size() == 0) {
- out.writeByte(ATypeTag.SERIALIZED_NULL_TYPE_TAG);
+ out.writeByte(ATypeTag.SERIALIZED_MISSING_TYPE_TAG);
} else {
metaBuilder.reset(metaType);
metaBuilder.init();
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/AdapterFactoryProvider.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/AdapterFactoryProvider.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/AdapterFactoryProvider.java
index f40cd15..e39e3bd 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/AdapterFactoryProvider.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/provider/AdapterFactoryProvider.java
@@ -30,7 +30,7 @@ import org.apache.asterix.external.indexing.ExternalFile;
import org.apache.asterix.external.util.ExternalDataCompatibilityUtils;
import org.apache.asterix.external.util.ExternalDataUtils;
import org.apache.asterix.om.types.ARecordType;
-import org.apache.hyracks.api.dataflow.value.INullWriterFactory;
+import org.apache.hyracks.api.dataflow.value.IMissingWriterFactory;
/**
* This class represents the entry point to all things adapters
@@ -61,10 +61,10 @@ public class AdapterFactoryProvider {
// Lookup Adapters
public static LookupAdapterFactory<?> getLookupAdapterFactory(Map<String, String> configuration,
- ARecordType recordType, int[] ridFields, boolean retainInput, boolean retainNull,
- INullWriterFactory iNullWriterFactory) throws AsterixException {
+ ARecordType recordType, int[] ridFields, boolean retainInput, boolean retainMissing,
+ IMissingWriterFactory missingWriterFactory) throws AsterixException {
LookupAdapterFactory<?> adapterFactory = new LookupAdapterFactory<>(recordType, ridFields, retainInput,
- retainNull, iNullWriterFactory);
+ retainMissing, missingWriterFactory);
adapterFactory.configure(configuration);
return adapterFactory;
}
http://git-wip-us.apache.org/repos/asf/incubator-asterixdb/blob/535d86b5/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
index 76898c2..1df4e42 100644
--- a/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
+++ b/asterixdb/asterix-external-data/src/main/java/org/apache/asterix/external/util/ExternalDataUtils.java
@@ -19,7 +19,6 @@
package org.apache.asterix.external.util;
import java.util.HashMap;
-import java.util.List;
import java.util.Map;
import org.apache.asterix.common.exceptions.AsterixException;
@@ -31,7 +30,6 @@ import org.apache.asterix.external.library.ExternalLibraryManager;
import org.apache.asterix.om.types.ARecordType;
import org.apache.asterix.om.types.ATypeTag;
import org.apache.asterix.om.types.AUnionType;
-import org.apache.asterix.om.types.IAType;
import org.apache.hyracks.algebricks.common.exceptions.NotImplementedException;
import org.apache.hyracks.dataflow.common.data.parsers.DoubleParserFactory;
import org.apache.hyracks.dataflow.common.data.parsers.FloatParserFactory;
@@ -164,11 +162,11 @@ public class ExternalDataUtils {
for (int i = 0; i < n; i++) {
ATypeTag tag = null;
if (recordType.getFieldTypes()[i].getTypeTag() == ATypeTag.UNION) {
- List<IAType> unionTypes = ((AUnionType) recordType.getFieldTypes()[i]).getUnionList();
- if ((unionTypes.size() != 2) && (unionTypes.get(0).getTypeTag() != ATypeTag.NULL)) {
+ AUnionType unionType = (AUnionType) recordType.getFieldTypes()[i];
+ if (!unionType.isNullableType()) {
throw new NotImplementedException("Non-optional UNION type is not supported.");
}
- tag = unionTypes.get(1).getTypeTag();
+ tag = unionType.getActualType().getTypeTag();
} else {
tag = recordType.getFieldTypes()[i].getTypeTag();
}