-DATASET CSV empty
-BUFFER_POOL_SIZE 512000000

--

-CASE TinySNBSubset

-LOAD_DYNAMIC_EXTENSION json

-STATEMENT LOAD FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb_json/vMovies.json" RETURN *;
---- 3
Roma|298|the movie is very interesting and funny|{rating: 1223.000000, stars: 100, views: 10003, release: 2011-02-11 16:44:22, release_ns: 2011-02-11 16:44:22.123456, release_ms: 2011-02-11 16:44:22.123456, release_sec: 2011-02-11 16:44:22.123456, release_tz: 2011-02-11 16:44:22.123456, film: 2013-02-22, u8: 1, u16: 15, u32: 200, u64: 4, hugedata: 7210}|pure ascii characters|{}|254
Sóló cón tu párejâ|126|this is a very very good movie|{rating: 5.300000, stars: 2, views: 152, release: 2011-08-20 11:25:30, release_ns: 2011-08-20 11:25:30.123456, release_ms: 2011-08-20 11:25:30.123456, release_sec: 2011-08-20 11:25:30.123456, release_tz: 2011-08-20 11:25:30.123456, film: 2012-05-11, u8: 220, u16: 20, u32: 1, u64: 180, hugedata: 114514}||{audience1= 52,audience53= 42}|True
The 😂😃🧘🏻‍♂️🌍🌦️🍞🚗 movie|2544|the movie is very very good|{rating: 7.000000, stars: 10, views: 982, release: 2018-11-13 13:33:11, release_ns: 2018-11-13 13:33:11.123456, release_ms: 2018-11-13 13:33:11.123456, release_sec: 2018-11-13 13:33:11.123456, release_tz: 2018-11-13 13:33:11.123456, film: 2014-09-12, u8: 12, u16: 120, u32: 55, u64: 1, hugedata: 1919810}||{audience1= 33}|8.989000

-STATEMENT LOAD FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb_json/vMovies_unstructured.json"(format='unstructured') RETURN *;
---- 3
Roma|298|the movie is very interesting and funny|{rating: 1223.000000, stars: 100, views: 10003, release: 2011-02-11 16:44:22, release_ns: 2011-02-11 16:44:22.123456, release_ms: 2011-02-11 16:44:22.123456, release_sec: 2011-02-11 16:44:22.123456, release_tz: 2011-02-11 16:44:22.123456, film: 2013-02-22, u8: 1, u16: 15, u32: 200, u64: 4}|pure ascii characters|{}|254
Sóló cón tu párejâ|126|this is a very very good movie|{rating: 5.300000, stars: 2, views: 152, release: 2011-08-20 11:25:30, release_ns: 2011-08-20 11:25:30.123456, release_ms: 2011-08-20 11:25:30.123456, release_sec: 2011-08-20 11:25:30.123456, release_tz: 2011-08-20 11:25:30.123456, film: 2012-05-11, u8: 220, u16: 20, u32: 1, u64: 180}||{audience1= 52,audience53= 42}|True
The 😂😃🧘🏻‍♂️🌍🌦️🍞🚗 movie|2544|the movie is very very good|{rating: 7.000000, stars: 10, views: 982, release: 2018-11-13 13:33:11, release_ns: 2018-11-13 13:33:11.123456, release_ms: 2018-11-13 13:33:11.123456, release_sec: 2018-11-13 13:33:11.123456, release_tz: 2018-11-13 13:33:11.123456, film: 2014-09-12, u8: 12, u16: 120, u32: 55, u64: 1}||{audience1= 33}|8.989000

-STATEMENT LOAD WITH HEADERS (lst INT8[]) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/array-test.json" RETURN *;
---- 2
[1,2,3]
[1,2,3]

-STATEMENT LOAD WITH HEADERS (lst INT8[3]) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/array-test.json" RETURN *;
---- 2
[1,2,3]
[1,2,3]

-STATEMENT LOAD WITH HEADERS (lst INT8[2]) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/array-test.json" RETURN *;
---- error
Runtime exception: Expected type INT8[2] but list type has 3 elements
-STATEMENT LOAD WITH HEADERS (lst STRING) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/array-test.json" RETURN *;
---- 2
[1,2,3]
[1,2,3]

-STATEMENT LOAD WITH HEADERS (lst UNION(A STRING, B INT64[])) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/array-test.json" RETURN *;
---- 2
[1,2,3]
[1,2,3]

-STATEMENT LOAD WITH HEADERS (lst UNION(A STRING, B TIMESTAMP)) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/array-test.json" RETURN *;
---- error
Cannot read from JSON Array to UNION(A STRING, B TIMESTAMP)
-STATEMENT LOAD WITH HEADERS (lst INT32) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/array-test.json" RETURN *;
---- error
Cannot read from JSON Array to INT32
-STATEMENT LOAD WITH HEADERS (obj STRUCT(a INT8, b STRING)) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/obj-test.json" RETURN *;
---- 2
{a: 1, b: 2024-02-11}
{a: 2, b: 2000-01-01}

-STATEMENT LOAD WITH HEADERS (obj STRUCT(a INT8, b DATE)) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/obj-test.json" RETURN *;
---- 2
{a: 1, b: 2024-02-11}
{a: 2, b: 2000-01-01}

-STATEMENT LOAD WITH HEADERS (obj MAP(STRING, STRING)) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/obj-test.json" RETURN *;
---- 2
{a=1, b=2024-02-11}
{a=2, b=2000-01-01}

-STATEMENT LOAD WITH HEADERS (obj JSON) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/obj-test.json" RETURN *;
---- 2
{"a":1,"b":"2024-02-11"}
{"a":2,"b":"2000-01-01"}

-STATEMENT LOAD WITH HEADERS (obj UNION(b INT32, a MAP(STRING, STRING))) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/obj-test.json" RETURN *;
---- 2
{a=1, b=2024-02-11}
{a=2, b=2000-01-01}

-STATEMENT LOAD WITH HEADERS (obj UNION(b INT32, c INT64)) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/obj-test.json" RETURN *;
---- error
Cannot read from JSON Object to UNION(b INT32, c INT64)
-STATEMENT LOAD WITH HEADERS (obj FLOAT) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/obj-test.json" RETURN *;
---- error
Cannot read from JSON Object to FLOAT
-STATEMENT LOAD WITH HEADERS (a FLOAT, b BOOL, c DECIMAL) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/prim-test.json" RETURN *;
---- 2
1.000000|True|5.000
2.000000|False|0.100

-STATEMENT LOAD WITH HEADERS (a DOUBLE, b STRING, c DOUBLE) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/prim-test.json" RETURN *;
---- 2
1.000000|True|5.000000
2.000000|False|0.100000

-STATEMENT LOAD WITH HEADERS (a JSON, b JSON, c JSON) FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/prim-test.json" RETURN *;
---- 2
1|True|5.000000
2|False|0.100000

-CASE JsonNull
-LOAD_DYNAMIC_EXTENSION json
-STATEMENT LOAD FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-misc/null-test.json" RETURN *;
---- 4

{a: 1, b: 2024-02-11}
{a: , b: 2000-01-01}

-CASE CopyFromJsonIgnorePKErrorsArrayFormat
-LOAD_DYNAMIC_EXTENSION json
-STATEMENT CREATE NODE TABLE person(ID UINT64, PRIMARY KEY (ID))
---- ok
-STATEMENT COPY person FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-error/pk_constraint_violation.json" (IGNORE_ERRORS=true);
---- ok
-STATEMENT CALL show_warnings() RETURN message, file_path, line_number
---- 2
Found NULL, which violates the non-null constraint of the primary key column.|${KUZU_ROOT_DIRECTORY}/dataset/json-error/pk_constraint_violation.json|10
Found duplicated primary key value 2, which violates the uniqueness constraint of the primary key column.|${KUZU_ROOT_DIRECTORY}/dataset/json-error/pk_constraint_violation.json|16
-STATEMENT MATCH (p:person) RETURN p.ID
---- 3
1
2
3

-CASE CopyFromJsonIgnoreIndexLookupErrorsNewlineDelimitedFormat
-LOAD_DYNAMIC_EXTENSION json
-STATEMENT CREATE NODE TABLE person(ID UINT64, PRIMARY KEY (ID))
---- ok
-STATEMENT CREATE REL TABLE knows(FROM person TO person)
---- ok
-STATEMENT COPY person FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-error/person_ok.json";
---- ok
-STATEMENT COPY knows FROM "${KUZU_ROOT_DIRECTORY}/dataset/json-error/index_lookup_error.json"(IGNORE_ERRORS=true);
---- ok
-STATEMENT CALL show_warnings() RETURN message, file_path, line_number, skipped_line_or_record
---- 2
Unable to find primary key value 5.|${KUZU_ROOT_DIRECTORY}/dataset/json-error/index_lookup_error.json|3|{"from": 1, "to": 5}
Unable to find primary key value 6.|${KUZU_ROOT_DIRECTORY}/dataset/json-error/index_lookup_error.json|5|{"from": 6, "to": 4}
-STATEMENT MATCH (a:person)-[k:knows]->(b:person) RETURN a.ID, b.ID
---- 4
1|2
1|3
2|3
3|4

-CASE ScanFromNewLineDelimitedJson
-LOAD_DYNAMIC_EXTENSION json
-STATEMENT LOAD FROM '${KUZU_ROOT_DIRECTORY}/dataset/json-misc/newline-delimited.json' RETURN *;
---- 9
4947802324993|2011-08-17 14:26:59.961|103.246.108.57|Safari|yes|3
4947802324994|2011-08-17 11:10:21.57|196.1.96.86|Chrome|thanks|6
8246337208325|2012-07-20 05:22:51.283|31.47.225.63|Firefox|LOL|3
8246337208326|2012-07-20 16:55:45.373|84.243.112.60|Firefox|I see|5
8246337208327|2012-07-20 04:34:17.5|84.243.112.60|Firefox|fine|4
8246337208328|2012-07-20 17:35:11.096|196.1.96.86|Chrome|right|5
8246337208329|2012-07-20 23:08:15.828|31.13.184.200|Firefox|About George Frideric Handel, ful with hisAbout Erwin Rommel, mandy. As onAbout|79
8246337208330|2012-07-20 06:31:37.85|62.100.246.118|Internet Explorer|good|4
8246337208331|2012-07-21 03:07:22.319|46.30.7.107|Firefox|no|2
-STATEMENT LOAD FROM '${KUZU_ROOT_DIRECTORY}/dataset/json-misc/null_in_struct.json' RETURN *;
---- 1
[{objectType: contact, schemaVersion: , contactIdentifier: 320864, contactNamespace: 56127, contactDetail: {fullname: Renee Luke, email: renee.luke@datapath.com, phone: (678) 252-4828 - Direct}}]
-STATEMENT LOAD FROM '${KUZU_ROOT_DIRECTORY}/dataset/json-misc/null_in_struct2.json' RETURN *;
---- 1
[{objectType: contact, schemaVersion: 135, contactIdentifier: 320864, contactNamespace: , contactDetail: {fullname: Renee Luke, email: renee.luke@datapath.com, phone: (678) 252-4828 - Direct}}]

-CASE InstallOfficialExtension
-SKIP
-SKIP_STATIC_LINK
-STATEMENT FORCE INSTALL json FROM 'http://localhost/extension/repo/'
---- ok
-STATEMENT load extension json
---- ok
-STATEMENT LOAD FROM "${KUZU_ROOT_DIRECTORY}/dataset/tinysnb_json/vMovies.json" RETURN *;
---- 3
Roma|298|the movie is very interesting and funny|{rating: 1223.000000, stars: 100, views: 10003, release: 2011-02-11 16:44:22, release_ns: 2011-02-11 16:44:22.123456, release_ms: 2011-02-11 16:44:22.123456, release_sec: 2011-02-11 16:44:22.123456, release_tz: 2011-02-11 16:44:22.123456, film: 2013-02-22, u8: 1, u16: 15, u32: 200, u64: 4, hugedata: 7210}|pure ascii characters|{}|254
Sóló cón tu párejâ|126|this is a very very good movie|{rating: 5.300000, stars: 2, views: 152, release: 2011-08-20 11:25:30, release_ns: 2011-08-20 11:25:30.123456, release_ms: 2011-08-20 11:25:30.123456, release_sec: 2011-08-20 11:25:30.123456, release_tz: 2011-08-20 11:25:30.123456, film: 2012-05-11, u8: 220, u16: 20, u32: 1, u64: 180, hugedata: 114514}||{audience1= 52,audience53= 42}|True
The 😂😃🧘🏻‍♂️🌍🌦️🍞🚗 movie|2544|the movie is very very good|{rating: 7.000000, stars: 10, views: 982, release: 2018-11-13 13:33:11, release_ns: 2018-11-13 13:33:11.123456, release_ms: 2018-11-13 13:33:11.123456, release_sec: 2018-11-13 13:33:11.123456, release_tz: 2018-11-13 13:33:11.123456, film: 2014-09-12, u8: 12, u16: 120, u32: 55, u64: 1, hugedata: 1919810}||{audience1= 33}|8.989000

-CASE ScanFromHttpfsJson
-LOAD_DYNAMIC_EXTENSION json
-LOAD_DYNAMIC_EXTENSION httpfs
-STATEMENT LOAD FROM "http://localhost/dataset/json-misc/prim-test.json" return *;
---- 2
1|True|5.000000
2|False|0.100000
