-DATASET CSV tinysnb

--

-CASE JsonArrayTest
-LOAD_DYNAMIC_EXTENSION json
-STATEMENT MATCH (p:person) RETURN json_array(p.fName, p.ID, p.usedNames)
---- 8
["Alice",0,["Aida"]]
["Bob",2,["Bobby"]]
["Carol",3,["Carmen","Fred"]]
["Dan",5,["Wolfeschlegelstein","Daniel"]]
["Elizabeth",7,["Ein"]]
["Farooq",8,["Fesdwe"]]
["Greg",9,["Grad"]]
["Hubert Blaine Wolfeschlegelsteinhausenbergerdorff",10,["Ad","De","Hi","Kye","Orlan"]]

-LOG JsonArrayWithNull
-STATEMENT RETURN JSON_ARRAY(5, 'kuzu', [2,5,1], null, [null])
---- 1
[5,"kuzu",[2,5,1],null,[null]]

-LOG NestedJsonArray
-STATEMENT RETURN JSON_ARRAY(JSON_ARRAY(2,4, 'TEST'), 'kuzu', [2,5,1], null, [null])
---- 1
[[2,4,"TEST"],"kuzu",[2,5,1],null,[null]]

-LOG UnflatFlatJsonArray
-STATEMENT MATCH (p:person)-[e:knows]->(p1:person) RETURN JSON_ARRAY(p.fName, p.ID, p1.fName, 5)
---- 14
["Alice",0,"Bob",5]
["Alice",0,"Carol",5]
["Alice",0,"Dan",5]
["Bob",2,"Alice",5]
["Bob",2,"Carol",5]
["Bob",2,"Dan",5]
["Carol",3,"Alice",5]
["Carol",3,"Bob",5]
["Carol",3,"Dan",5]
["Dan",5,"Alice",5]
["Dan",5,"Bob",5]
["Dan",5,"Carol",5]
["Elizabeth",7,"Farooq",5]
["Elizabeth",7,"Greg",5]

-STATEMENT RETURN typeof(json_array(42, 'kuzu', NULL));
---- 1
json

-STATEMENT RETURN json_array(NULL, NULL);
---- 1
[null,null]
