[NO ISSUE] Jackson parser for JSON format
- user model changes: no
- storage format changes: no
- interface changes: yes
- Make IDataParserFactory.setRecordType()
to throw AsterixException
- Remove unused throws exception from
IAsterixListBuilder.reset()
Details:
- 4X faster than the current ADM parser.
- Uses lower number of temporary buffers.
- Parse GeoJSON geometry objects if defined
only for POINT, LINE and POLYGON.
- Parse temporal values from strings if defined
only for DATE, TIME, DATETIME.
Change-Id: Iacf9e496dbe2146f5eeeb1506b945991c300a7de
Reviewed-on: https://asterix-gerrit.ics.uci.edu/2076
Reviewed-by: Michael Blow <[email protected]>
Sonar-Qube: Jenkins <[email protected]>
Tested-by: Jenkins <[email protected]>
Project: http://git-wip-us.apache.org/repos/asf/asterixdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/asterixdb/commit/733fba8e
Tree: http://git-wip-us.apache.org/repos/asf/asterixdb/tree/733fba8e
Diff: http://git-wip-us.apache.org/repos/asf/asterixdb/diff/733fba8e
Branch: refs/heads/master
Commit: 733fba8e48b40f361498c8708b124bd29dc32d85
Parents: ab36948
Author: Wail Alkowaileet <[email protected]>
Authored: Thu Dec 7 20:05:35 2017 -0800
Committer: Michael Blow <[email protected]>
Committed: Sun Dec 10 19:35:59 2017 -0800
----------------------------------------------------------------------
.../asterix-app/data/json/double-150-11.json | 1 +
.../asterix-app/data/json/duplicate-fields.json | 1 +
asterixdb/asterix-app/data/json/geometry.json | 5 +
asterixdb/asterix-app/data/json/int-100.json | 1 +
asterixdb/asterix-app/data/json/int-1000.json | 1 +
.../asterix-app/data/json/line-3-points.json | 3 +
.../asterix-app/data/json/malformed-json.json | 1 +
.../asterix-app/data/json/null-missing.json | 1 +
.../data/json/polygon-with-hole.json | 1 +
asterixdb/asterix-app/data/json/temporal.json | 1 +
.../asterix-app/data/json/unclosed-polygon.json | 3 +
.../duplicate-fields.1.ddl.sqlpp | 34 ++
.../duplicate-fields.2.query.sqlpp | 23 +
.../malformed-json/malformed.1.ddl.sqlpp | 34 ++
.../malformed-json/malformed.2.query.sqlpp | 23 +
.../nonoptional-missing.1.ddl.sqlpp | 36 ++
.../nonoptional-missing.2.query.sqlpp | 23 +
.../nonoptional-null.1.ddl.sqlpp | 36 ++
.../nonoptional-null.2.query.sqlpp | 23 +
.../null-missing/null-missing.1.ddl.sqlpp | 36 ++
.../null-missing/null-missing.2.query.sqlpp | 23 +
.../double-bigint.1.ddl.sqlpp | 34 ++
.../double-bigint.2.query.sqlpp | 23 +
.../json-parser/numeric-float/float.1.ddl.sqlpp | 34 ++
.../numeric-float/float.2.query.sqlpp | 23 +
.../bigint-double.1.ddl.sqlpp | 34 ++
.../bigint-double.2.query.sqlpp | 23 +
.../tinyint-overflow.1.ddl.sqlpp | 34 ++
.../tinyint-overflow.2.query.sqlpp | 23 +
.../numeric-tinyint/tinyint.1.ddl.sqlpp | 34 ++
.../numeric-tinyint/tinyint.2.query.sqlpp | 23 +
.../spatial-line-3-points.1.ddl.sqlpp | 34 ++
.../spatial-line-3-points.2.query.sqlpp | 23 +
.../spatial-polygon-unclosed.1.ddl.sqlpp | 34 ++
.../spatial-polygon-unclosed.2.query.sqlpp | 23 +
.../spatial-polygon-with-hole.1.ddl.sqlpp | 34 ++
.../spatial-polygon-with-hole.2.query.sqlpp | 23 +
.../json-parser/spatial/spatial.1.ddl.sqlpp | 36 ++
.../json-parser/spatial/spatial.2.query.sqlpp | 23 +
.../json-parser/temporal/temporal.1.ddl.sqlpp | 39 ++
.../json-parser/temporal/temporal.2.query.sqlpp | 23 +
.../type-mismatch/type-mismatch.1.ddl.sqlpp | 34 ++
.../type-mismatch/type-mismatch.2.query.sqlpp | 23 +
.../unsupported-type-circle.1.ddl.sqlpp | 35 ++
.../unsupported-type-circle.2.query.sqlpp | 23 +
...unsupported-type-daytimeduration.1.ddl.sqlpp | 40 ++
...supported-type-daytimeduration.2.query.sqlpp | 23 +
.../unsupported-type-duration.1.ddl.sqlpp | 40 ++
.../unsupported-type-duration.2.query.sqlpp | 23 +
.../unsupported-type-interval.1.ddl.sqlpp | 40 ++
.../unsupported-type-interval.2.query.sqlpp | 23 +
.../unsupported-type-multiset.1.ddl.sqlpp | 40 ++
.../unsupported-type-multiset.2.query.sqlpp | 23 +
.../unsupported-type-point3d.1.ddl.sqlpp | 35 ++
.../unsupported-type-point3d.2.query.sqlpp | 23 +
.../unsupported-type-rectangle.1.ddl.sqlpp | 35 ++
.../unsupported-type-rectangle.2.query.sqlpp | 23 +
.../null-missing/null-missing.1.json | 1 +
.../numeric-demote-double-bigint.1.json | 1 +
.../numeric-float/numeric-float.1.json | 1 +
.../numeric-demote-double-bigint.1.json | 1 +
.../numeric-tinyint/numeric-tinyint.1.json | 1 +
.../results/json-parser/spatial/spatial.1.json | 1 +
.../json-parser/temporal/temporal.1.json | 1 +
.../resources/runtimets/testsuite_sqlpp.xml | 133 ++++++
.../asterix/common/exceptions/ErrorCode.java | 1 +
.../main/resources/asx_errormsg/en.properties | 1 +
asterixdb/asterix-external-data/pom.xml | 9 +
.../external/api/IDataParserFactory.java | 5 +-
.../parser/AbstractNestedDataParser.java | 193 ++++++++
.../asterix/external/parser/JSONDataParser.java | 439 +++++++++++++++++++
.../parser/factory/ADMDataParserFactory.java | 14 +-
.../AbstractRecordStreamParserFactory.java | 3 +-
.../parser/factory/JSONDataParserFactory.java | 125 ++++++
.../external/parser/jackson/ADMToken.java | 100 +++++
.../parser/jackson/GeometryCoParser.java | 315 +++++++++++++
.../external/parser/jackson/ObjectPool.java | 62 +++
.../external/parser/jackson/ParserContext.java | 143 ++++++
...ache.asterix.external.api.IDataParserFactory | 1 +
.../asterix/builders/IAsterixListBuilder.java | 2 +-
80 files changed, 2913 insertions(+), 10 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/double-150-11.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/double-150-11.json
b/asterixdb/asterix-app/data/json/double-150-11.json
new file mode 100644
index 0000000..c1f3de5
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/double-150-11.json
@@ -0,0 +1 @@
+{"double_value" : 150.11}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/duplicate-fields.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/duplicate-fields.json
b/asterixdb/asterix-app/data/json/duplicate-fields.json
new file mode 100644
index 0000000..ce9fa4e
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/duplicate-fields.json
@@ -0,0 +1 @@
+{"field": 1, "field": 2}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/geometry.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/geometry.json
b/asterixdb/asterix-app/data/json/geometry.json
new file mode 100644
index 0000000..bbdf1e0
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/geometry.json
@@ -0,0 +1,5 @@
+{
+"point_value": {"coordinates":[10.0, 10.0], "type":"Point"},
+"line_value": {"coordinates":[[10.0, 10.0], [11.0, 11.0]],
"type":"LineString"},
+"polygon_value": {"coordinates":[[[10.0, 10.0], [11.0, 11.0], [10.0, 10.0]]],
"type":"Polygon"}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/int-100.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/int-100.json
b/asterixdb/asterix-app/data/json/int-100.json
new file mode 100644
index 0000000..608a839
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/int-100.json
@@ -0,0 +1 @@
+{"int_value" : 100}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/int-1000.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/int-1000.json
b/asterixdb/asterix-app/data/json/int-1000.json
new file mode 100644
index 0000000..04305be
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/int-1000.json
@@ -0,0 +1 @@
+{"int_value" : 1000}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/line-3-points.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/line-3-points.json
b/asterixdb/asterix-app/data/json/line-3-points.json
new file mode 100644
index 0000000..5c18d9f
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/line-3-points.json
@@ -0,0 +1,3 @@
+{
+"line_value": {"coordinates":[[30.0, 10.0], [10.0, 30.0], [40.0, 40.0]],
"type":"LineString"}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/malformed-json.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/malformed-json.json
b/asterixdb/asterix-app/data/json/malformed-json.json
new file mode 100644
index 0000000..d03a85f
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/malformed-json.json
@@ -0,0 +1 @@
+{"field": 1,}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/null-missing.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/null-missing.json
b/asterixdb/asterix-app/data/json/null-missing.json
new file mode 100644
index 0000000..74f48ca
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/null-missing.json
@@ -0,0 +1 @@
+{"int_value" : 1000, "null_value":null}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/polygon-with-hole.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/polygon-with-hole.json
b/asterixdb/asterix-app/data/json/polygon-with-hole.json
new file mode 100644
index 0000000..58687b9
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/polygon-with-hole.json
@@ -0,0 +1 @@
+{"polygon_with_hole" : { "type": "Polygon", "coordinates": [[[35.0, 10.0],
[45.0, 45.0], [15.0, 40.0], [10.0, 20.0], [35.0, 10.0]], [[20.0, 30.0], [35.0,
35.0], [30.0, 20.0], [20.0, 30.0]]]}}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/temporal.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/temporal.json
b/asterixdb/asterix-app/data/json/temporal.json
new file mode 100644
index 0000000..39b3a81
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/temporal.json
@@ -0,0 +1 @@
+{"datefield":"-2012-12-12", "dateFieldPlus": "0990-01-01", "timeField":
"23:49:12.39Z", "timeFieldPlus": "03:23:12.2", "datetimeField":
"2012-12-12T00:00:00.001", "datetimeFieldPlus": "-00130810T221015398"}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/data/json/unclosed-polygon.json
----------------------------------------------------------------------
diff --git a/asterixdb/asterix-app/data/json/unclosed-polygon.json
b/asterixdb/asterix-app/data/json/unclosed-polygon.json
new file mode 100644
index 0000000..caacb5d
--- /dev/null
+++ b/asterixdb/asterix-app/data/json/unclosed-polygon.json
@@ -0,0 +1,3 @@
+{
+"polygon_value": {"coordinates":[[[10.0, 10.0], [11.0, 11.0], [10.0, 11.0]]],
"type":"Polygon"}
+}
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/duplicate-fields/duplicate-fields.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/duplicate-fields/duplicate-fields.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/duplicate-fields/duplicate-fields.1.ddl.sqlpp
new file mode 100644
index 0000000..3795dbf
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/duplicate-fields/duplicate-fields.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ field: int
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/duplicate-fields.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/duplicate-fields/duplicate-fields.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/duplicate-fields/duplicate-fields.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/duplicate-fields/duplicate-fields.2.query.sqlpp
new file mode 100644
index 0000000..4ffc750
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/duplicate-fields/duplicate-fields.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j.field
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/malformed-json/malformed.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/malformed-json/malformed.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/malformed-json/malformed.1.ddl.sqlpp
new file mode 100644
index 0000000..3712040
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/malformed-json/malformed.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ field: int
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/malformed-json.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/malformed-json/malformed.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/malformed-json/malformed.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/malformed-json/malformed.2.query.sqlpp
new file mode 100644
index 0000000..4ffc750
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/malformed-json/malformed.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j.field
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-missing/nonoptional-missing.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-missing/nonoptional-missing.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-missing/nonoptional-missing.1.ddl.sqlpp
new file mode 100644
index 0000000..9295261
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-missing/nonoptional-missing.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ int_value: int,
+ missing_value: int,
+ null_value: int?
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/null-missing.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-missing/nonoptional-missing.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-missing/nonoptional-missing.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-missing/nonoptional-missing.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-missing/nonoptional-missing.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-null/nonoptional-null.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-null/nonoptional-null.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-null/nonoptional-null.1.ddl.sqlpp
new file mode 100644
index 0000000..a6318f0
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-null/nonoptional-null.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ int_value: int,
+ missing_value: int?,
+ null_value: int
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/null-missing.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-null/nonoptional-null.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-null/nonoptional-null.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-null/nonoptional-null.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/nonoptional-null/nonoptional-null.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/null-missing/null-missing.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/null-missing/null-missing.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/null-missing/null-missing.1.ddl.sqlpp
new file mode 100644
index 0000000..8b2bebc
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/null-missing/null-missing.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ int_value: int,
+ missing_value: int?,
+ null_value: int?
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/null-missing.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/null-missing/null-missing.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/null-missing/null-missing.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/null-missing/null-missing.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/null-missing/null-missing.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-demote-double-bigint/double-bigint.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-demote-double-bigint/double-bigint.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-demote-double-bigint/double-bigint.1.ddl.sqlpp
new file mode 100644
index 0000000..cd5acce
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-demote-double-bigint/double-bigint.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ double_value: bigint
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/double-150-11.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-demote-double-bigint/double-bigint.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-demote-double-bigint/double-bigint.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-demote-double-bigint/double-bigint.2.query.sqlpp
new file mode 100644
index 0000000..d8f1d90
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-demote-double-bigint/double-bigint.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j.double_value
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-float/float.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-float/float.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-float/float.1.ddl.sqlpp
new file mode 100644
index 0000000..28adba7
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-float/float.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ double_value: float
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/double-150-11.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-float/float.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-float/float.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-float/float.2.query.sqlpp
new file mode 100644
index 0000000..d8f1d90
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-float/float.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j.double_value
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-promote-bigint-double/bigint-double.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-promote-bigint-double/bigint-double.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-promote-bigint-double/bigint-double.1.ddl.sqlpp
new file mode 100644
index 0000000..7219763
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-promote-bigint-double/bigint-double.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ int_value: double
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-1000.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-promote-bigint-double/bigint-double.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-promote-bigint-double/bigint-double.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-promote-bigint-double/bigint-double.2.query.sqlpp
new file mode 100644
index 0000000..9dfbd18
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-promote-bigint-double/bigint-double.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j.int_value
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint-overflow/tinyint-overflow.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint-overflow/tinyint-overflow.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint-overflow/tinyint-overflow.1.ddl.sqlpp
new file mode 100644
index 0000000..1d9cab0
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint-overflow/tinyint-overflow.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ int_value: tinyint
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-1000.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint-overflow/tinyint-overflow.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint-overflow/tinyint-overflow.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint-overflow/tinyint-overflow.2.query.sqlpp
new file mode 100644
index 0000000..9dfbd18
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint-overflow/tinyint-overflow.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j.int_value
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint/tinyint.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint/tinyint.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint/tinyint.1.ddl.sqlpp
new file mode 100644
index 0000000..c5b198f
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint/tinyint.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ int_value: tinyint
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-100.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint/tinyint.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint/tinyint.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint/tinyint.2.query.sqlpp
new file mode 100644
index 0000000..9dfbd18
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/numeric-tinyint/tinyint.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j.int_value
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-line-3-points/spatial-line-3-points.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-line-3-points/spatial-line-3-points.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-line-3-points/spatial-line-3-points.1.ddl.sqlpp
new file mode 100644
index 0000000..f551ec9
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-line-3-points/spatial-line-3-points.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ line_value: line
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/line-3-points.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-line-3-points/spatial-line-3-points.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-line-3-points/spatial-line-3-points.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-line-3-points/spatial-line-3-points.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-line-3-points/spatial-line-3-points.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-unclosed/spatial-polygon-unclosed.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-unclosed/spatial-polygon-unclosed.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-unclosed/spatial-polygon-unclosed.1.ddl.sqlpp
new file mode 100644
index 0000000..e17403a
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-unclosed/spatial-polygon-unclosed.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ polygon_value: polygon
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/unclosed-polygon.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-unclosed/spatial-polygon-unclosed.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-unclosed/spatial-polygon-unclosed.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-unclosed/spatial-polygon-unclosed.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-unclosed/spatial-polygon-unclosed.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-with-hole/spatial-polygon-with-hole.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-with-hole/spatial-polygon-with-hole.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-with-hole/spatial-polygon-with-hole.1.ddl.sqlpp
new file mode 100644
index 0000000..56d829b
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-with-hole/spatial-polygon-with-hole.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ polygon_with_hole: polygon
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/polygon-with-hole.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-with-hole/spatial-polygon-with-hole.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-with-hole/spatial-polygon-with-hole.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-with-hole/spatial-polygon-with-hole.2.query.sqlpp
new file mode 100644
index 0000000..44bfb0e
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial-polygon-with-hole/spatial-polygon-with-hole.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j.polygon_with_hole
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial/spatial.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial/spatial.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial/spatial.1.ddl.sqlpp
new file mode 100644
index 0000000..5e5ec72
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial/spatial.1.ddl.sqlpp
@@ -0,0 +1,36 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ point_value: point,
+ line_value: line,
+ polygon_value: polygon
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/geometry.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial/spatial.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial/spatial.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial/spatial.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/spatial/spatial.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/temporal/temporal.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/temporal/temporal.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/temporal/temporal.1.ddl.sqlpp
new file mode 100644
index 0000000..33c8b33
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/temporal/temporal.1.ddl.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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ datefield:date,
+ dateFieldPlus: date,
+ timeField: time,
+ timeFieldPlus: time,
+ datetimeField: datetime,
+ datetimeFieldPlus: datetime
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/temporal.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/temporal/temporal.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/temporal/temporal.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/temporal/temporal.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/temporal/temporal.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/type-mismatch/type-mismatch.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/type-mismatch/type-mismatch.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/type-mismatch/type-mismatch.1.ddl.sqlpp
new file mode 100644
index 0000000..8913cad
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/type-mismatch/type-mismatch.1.ddl.sqlpp
@@ -0,0 +1,34 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ int_value: string
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-1000.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/type-mismatch/type-mismatch.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/type-mismatch/type-mismatch.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/type-mismatch/type-mismatch.2.query.sqlpp
new file mode 100644
index 0000000..9dfbd18
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/type-mismatch/type-mismatch.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j.int_value
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-circle/unsupported-type-circle.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-circle/unsupported-type-circle.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-circle/unsupported-type-circle.1.ddl.sqlpp
new file mode 100644
index 0000000..9a117a7
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-circle/unsupported-type-circle.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ circle_value:circle?,
+ int_value:int
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-1000.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-circle/unsupported-type-circle.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-circle/unsupported-type-circle.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-circle/unsupported-type-circle.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-circle/unsupported-type-circle.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-daytimeduration/unsupported-type-daytimeduration.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-daytimeduration/unsupported-type-daytimeduration.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-daytimeduration/unsupported-type-daytimeduration.1.ddl.sqlpp
new file mode 100644
index 0000000..76b0fae
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-daytimeduration/unsupported-type-daytimeduration.1.ddl.sqlpp
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE NestedType AS
+{
+ duration_value: day_time_duration?
+};
+
+CREATE TYPE JsonType AS
+{
+ int_value:int,
+ nested_value: [NestedType]?
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-1000.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-daytimeduration/unsupported-type-daytimeduration.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-daytimeduration/unsupported-type-daytimeduration.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-daytimeduration/unsupported-type-daytimeduration.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-daytimeduration/unsupported-type-daytimeduration.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-duration/unsupported-type-duration.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-duration/unsupported-type-duration.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-duration/unsupported-type-duration.1.ddl.sqlpp
new file mode 100644
index 0000000..018b858
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-duration/unsupported-type-duration.1.ddl.sqlpp
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE NestedType AS
+{
+ duration_value: duration?
+};
+
+CREATE TYPE JsonType AS
+{
+ int_value:int,
+ nested_value: [NestedType]?
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-1000.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-duration/unsupported-type-duration.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-duration/unsupported-type-duration.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-duration/unsupported-type-duration.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-duration/unsupported-type-duration.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-interval/unsupported-type-interval.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-interval/unsupported-type-interval.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-interval/unsupported-type-interval.1.ddl.sqlpp
new file mode 100644
index 0000000..b140ec6
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-interval/unsupported-type-interval.1.ddl.sqlpp
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE NestedType AS
+{
+ duration_value: interval?
+};
+
+CREATE TYPE JsonType AS
+{
+ int_value: int,
+ nested_value: [NestedType]?
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-1000.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-interval/unsupported-type-interval.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-interval/unsupported-type-interval.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-interval/unsupported-type-interval.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-interval/unsupported-type-interval.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-multiset/unsupported-type-multiset.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-multiset/unsupported-type-multiset.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-multiset/unsupported-type-multiset.1.ddl.sqlpp
new file mode 100644
index 0000000..aaa0488
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-multiset/unsupported-type-multiset.1.ddl.sqlpp
@@ -0,0 +1,40 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE NestedType AS
+{
+ int_value: int
+};
+
+CREATE TYPE JsonType AS
+{
+ int_value: int,
+ nested_value: {{NestedType}}?
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-1000.json"),
+ ("format"="json")
+)
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-multiset/unsupported-type-multiset.2.query.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-multiset/unsupported-type-multiset.2.query.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-multiset/unsupported-type-multiset.2.query.sqlpp
new file mode 100644
index 0000000..8e43190
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-multiset/unsupported-type-multiset.2.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.
+ */
+
+USE test;
+
+SELECT VALUE j
+FROM Json as j;
\ No newline at end of file
http://git-wip-us.apache.org/repos/asf/asterixdb/blob/733fba8e/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-point3d/unsupported-type-point3d.1.ddl.sqlpp
----------------------------------------------------------------------
diff --git
a/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-point3d/unsupported-type-point3d.1.ddl.sqlpp
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-point3d/unsupported-type-point3d.1.ddl.sqlpp
new file mode 100644
index 0000000..b0bd7e2
--- /dev/null
+++
b/asterixdb/asterix-app/src/test/resources/runtimets/queries_sqlpp/json-parser/unsupported-type-point3d/unsupported-type-point3d.1.ddl.sqlpp
@@ -0,0 +1,35 @@
+/*
+ * 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.
+ */
+
+DROP DATAVERSE test IF EXISTS;
+CREATE DATAVERSE test;
+
+USE test;
+
+CREATE TYPE JsonType AS
+{
+ int_value: int,
+ point_value: point3d?
+};
+
+CREATE EXTERNAL DATASET Json(JsonType) USING localfs
+(
+ ("path"="asterix_nc1://data/json/int-1000.json"),
+ ("format"="json")
+)
\ No newline at end of file