Changeset: 5868cadb746b for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB/rev/5868cadb746b
Added Files:
sql/test/nested/Tests/missing_out_of_order.json
sql/test/nested/Tests/missing_out_of_order.test.in
Branch: nested
Log Message:
add test
diffs (62 lines):
diff --git a/sql/test/nested/Tests/missing_out_of_order.json
b/sql/test/nested/Tests/missing_out_of_order.json
new file mode 100644
--- /dev/null
+++ b/sql/test/nested/Tests/missing_out_of_order.json
@@ -0,0 +1,16 @@
+[
+{
+ "eventid": "1",
+ "timestamp": "2023-03-31T12:20:30.372+00:00",
+ "user":[]
+},
+{
+ "eventid": "2",
+ "location":[{"key":"hostname", "value": "localhost"}],
+ "timestamp": "2023-03-31T12:20:30.372+00:00"
+},
+{
+ "eventid": "3",
+ "location":[{"key":"hostname", "value": "localhost"}]
+}
+]
diff --git a/sql/test/nested/Tests/missing_out_of_order.test.in
b/sql/test/nested/Tests/missing_out_of_order.test.in
new file mode 100644
--- /dev/null
+++ b/sql/test/nested/Tests/missing_out_of_order.test.in
@@ -0,0 +1,36 @@
+statement ok
+CREATE TYPE kv AS (
+ key VARCHAR,
+ value VARCHAR
+)
+
+
+statement ok
+CREATE TABLE events(
+ eventid VARCHAR,
+ "timestamp" TIMESTAMP WITH TIME ZONE,
+ location kv[],
+ "user" kv[])
+
+statement ok
+insert into events select * from
read_json(r'$TSTSRCDIR/missing_out_of_order.json')
+
+query I
+select count(*) from events
+----
+3
+
+query I
+select count(timestamp) from events
+----
+2
+
+query I
+select count(location) from events
+----
+2
+
+query I
+select count("user") from events
+----
+1
_______________________________________________
checkin-list mailing list -- [email protected]
To unsubscribe send an email to [email protected]