-DATASET CSV empty

--

-CASE ScanDuckDBTable
-LOAD_DYNAMIC_EXTENSION duckdb
-LOG AttachUnsupportedTableError
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/tinysnb.db' as tinysnb (dbtype duckdb);
---- error
Binder exception: Unsupported duckdb type: ENUM('sad', 'ok', 'happy').
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/tinysnb.db' as tinysnb (dbtype duckdb, skip_unsupported_table = true);
---- 1
Attached database successfully.
-STATEMENT create node table person_copy (ID INt64, fName StRING, gender INT64, isStudent BoOLEAN, isWorker BOOLEAN, age INT64, eyeSight DOUBLE, birthdate DATE, registerTime TIMESTAMP, lastJobDuration interval, workedHours INT64[], usedNames STRING[], courseScoresPerTerm INT64[][], height float, u UUID, grades INT64[4], PRIMARY KEY (ID));
---- ok
-STATEMENT COPY person_copy FROM tinysnb.person;
---- 1
8 tuples have been copied to the person_copy table.
-STATEMENT MATCH (a:person_copy) RETURN a.*;
---- 8
0|Alice|1|True|False|35|5.000000|1900-01-01|2011-08-20 11:25:30|3 years 2 days 13:02:00|[10,5]|[Aida]|[[10,8],[6,7,8]]|1.731000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11|[96,54,86,92]
2|Bob|2|True|False|30|5.100000|1900-01-01|2008-11-03 15:25:30.000526|10 years 5 months 13:00:00.000024|[12,8]|[Bobby]|[[8,9],[9,10]]|0.990000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12|[98,42,93,88]
3|Carol|1|False|True|45|5.000000|1940-06-22|1911-08-20 02:32:21|48:24:11|[4,5]|[Carmen,Fred]|[[8,10]]|1.000000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a13|[91,75,21,95]
5|Dan|2|False|True|20|4.800000|1950-07-23|2031-11-30 12:25:30|10 years 5 months 13:00:00.000024|[1,9]|[Wolfeschlegelstein,Daniel]|[[7,4],[8,8],[9]]|1.300000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a14|[76,88,99,89]
7|Elizabeth|1|False|True|20|4.700000|1980-10-26|1976-12-23 11:21:42|48:24:11|[2]|[Ein]|[[6],[7],[8]]|1.463000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a15|[96,59,65,88]
8|Farooq|2|True|False|25|4.500000|1980-10-26|1972-07-31 13:22:30.678559|00:18:00.024|[3,4,5,6,7]|[Fesdwe]|[[8]]|1.510000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a16|[80,78,34,83]
9|Greg|2|False|False|40|4.900000|1980-10-26|1976-12-23 11:21:42|10 years 5 months 13:00:00.000024|[1]|[Grad]|[[10]]|1.600000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a17|[43,83,67,43]
10|Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|2|False|True|83|4.900000|1990-11-27|2023-02-21 13:25:30|3 years 2 days 13:02:00|[10,11,12,3,4,5,6,7]|[Ad,De,Hi,Kye,Orlan]|[[7],[10],[6,7]]|1.323000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a18|[77,64,100,54]
-STATEMENT create node table person_copy1 (ID INt64, fName STRING, PRIMARY KEY(ID));
---- ok
-STATEMENT COPY person_copy1 FROM (LOAD FROM tinysnb.person RETURN ID, fName);
---- 1
8 tuples have been copied to the person_copy1 table.
-STATEMENT MATCH (a:person_copy1) RETURN a.*;
---- 8
0|Alice
2|Bob
3|Carol
5|Dan
7|Elizabeth
8|Farooq
9|Greg
10|Hubert Blaine Wolfeschlegelsteinhausenbergerdorff
-STATEMENT LOAD FROM tinysnb.person RETURN *;
---- 8
0|Alice|1|True|False|35|5.000000|1900-01-01|2011-08-20 11:25:30|3 years 2 days 13:02:00|[10,5]|[Aida]|[[10,8],[6,7,8]]|1.731000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11|[96,54,86,92]
10|Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|2|False|True|83|4.900000|1990-11-27|2023-02-21 13:25:30|3 years 2 days 13:02:00|[10,11,12,3,4,5,6,7]|[Ad,De,Hi,Kye,Orlan]|[[7],[10],[6,7]]|1.323000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a18|[77,64,100,54]
2|Bob|2|True|False|30|5.100000|1900-01-01|2008-11-03 15:25:30.000526|10 years 5 months 13:00:00.000024|[12,8]|[Bobby]|[[8,9],[9,10]]|0.990000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12|[98,42,93,88]
3|Carol|1|False|True|45|5.000000|1940-06-22|1911-08-20 02:32:21|48:24:11|[4,5]|[Carmen,Fred]|[[8,10]]|1.000000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a13|[91,75,21,95]
5|Dan|2|False|True|20|4.800000|1950-07-23|2031-11-30 12:25:30|10 years 5 months 13:00:00.000024|[1,9]|[Wolfeschlegelstein,Daniel]|[[7,4],[8,8],[9]]|1.300000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a14|[76,88,99,89]
7|Elizabeth|1|False|True|20|4.700000|1980-10-26|1976-12-23 11:21:42|48:24:11|[2]|[Ein]|[[6],[7],[8]]|1.463000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a15|[96,59,65,88]
8|Farooq|2|True|False|25|4.500000|1980-10-26|1972-07-31 13:22:30.678559|00:18:00.024|[3,4,5,6,7]|[Fesdwe]|[[8]]|1.510000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a16|[80,78,34,83]
9|Greg|2|False|False|40|4.900000|1980-10-26|1976-12-23 11:21:42|10 years 5 months 13:00:00.000024|[1]|[Grad]|[[10]]|1.600000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a17|[43,83,67,43]
-STATEMENT LOAD FROM tinysnb.person RETURN fName;
---- 8
Alice
Bob
Carol
Dan
Elizabeth
Farooq
Greg
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff
-STATEMENT LOAD FROM tinysnb.person WHERE ID > 5 RETURN fName;
---- 4
Elizabeth
Farooq
Greg
Hubert Blaine Wolfeschlegelsteinhausenbergerdorff
-STATEMENT LOAD FROM tinysnb.person WHERE ID = 2 RETURN fName;
---- 1
Bob
-STATEMENT LOAD FROM tinysnb.person WHERE ID < 5 AND usedNames = ['Aida'] RETURN fName;
---- 1
Alice
-STATEMENT LOAD FROM tinysnb.person WHERE ID > 4 AND u = 'a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a15' RETURN fName;
---- 1
Elizabeth
-STATEMENT LOAD FROM tinysnb.organisation RETURN *;
---- 3
1|ABFsUni|325|3.700000|-2|10 years 5 months 13 hours 24 us|3 years 5 days|1.000000|{revenue: 138, "location": ['toronto','montr,eal'], stock: {price: [96,56], volume: 1000}}|3.12
4|CsWork|934|4.100000|-100|2 years 4 days 10 hours|26 years 52 days 48:00:00|0.780000|{revenue: 152, "location": ["vanco,uver north area"], stock: {price: [15,78,671], volume: 432}}|abcd
6|DEsWork|824|4.100000|7|2 years 4 hours 22 us 34 minutes|82:00:00.1|0.520000|{revenue: 558, "location": ['very long city name','new york'], stock: {price: [22], volume: 99}}|2023-12-15
-STATEMENT LOAD FROM tinysnb.movies 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.123, release_sec: 2011-02-11 16:44:22, release_tz: 2011-02-11 16:44:22.123456+00, film: 2013-02-22, u8: 1, u16: 15, u32: 200, u64: 4, hugedata: -15}|pure ascii characters|{}
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.123, release_sec: 2011-08-20 11:25:30, release_tz: 2011-08-20 11:25:30.123456+00, film: 2012-05-11, u8: 220, u16: 20, u32: 1, u64: 180, hugedata: 1844674407370955161811111111}|\xAA\xABinteresting\x0B|{audience1=52, audience53=42}
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.123, release_sec: 2018-11-13 13:33:11, release_tz: 2018-11-13 13:33:11.123456+00, film: 2014-09-12, u8: 12, u16: 120, u32: 55, u64: 1, hugedata: -1844674407370955161511}|\xAB\xCD|{audience1=33}
-STATEMENT LOAD FROM tinysnb.tableOfTypes RETURN count(*);
---- 1
49999
-STATEMENT LOAD FROM tinysnb.tableOfTypes WHERE id = 49992 or id = 28532 RETURN *;
---- 2
28532|74|72.472423|True|1977-08-16|TKn|[94,92]|[AUSrJTUWVOESDor,ODOS6RfqMhsFO9aFUa,ziauQj]|[[123,55,181],[32]]|{ID: 666, "name": DiqSQ5u5UhS8aZi}
49992|50|31.582059|False|2056-05-02||[62,24,94]|[LpQO8OT3x45a]|[[268,281,166],[144,16,126,208,298],[22,287]]|{ID: 936, "name": sGPSafxMAhKiP}
-STATEMENT LOAD FROM tinysnb.person1 RETURN *;
---- error
Catalog exception: person1 does not exist in catalog.
-STATEMENT DETACH tinysnb;
---- 1
Detached database successfully.
-STATEMENT LOAD FROM tinysnb.person RETURN *;
---- error
Runtime exception: No database named tinysnb.
-LOG AttachMultipleDuckDB
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/tinysnb.db' (dbtype duckdb, skip_unsupported_table = true);
---- 1
Attached database successfully.
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/other.db' as Other1 (dbtype duckdb, skip_unsupported_table = true);
---- 1
Attached database successfully.
-STATEMENT CALL SHOW_TABLES() RETURN *;
---- 8
0|movies|ATTACHED|tinysnb(DUCKDB)|
0|person_copy|NODE|local(kuzu)|
0|person|ATTACHED|Other1(DUCKDB)|
1|organisation|ATTACHED|tinysnb(DUCKDB)|
1|person_copy1|NODE|local(kuzu)|
2|person|ATTACHED|tinysnb(DUCKDB)|
3|tableOfTypes|ATTACHED|tinysnb(DUCKDB)|
4|tableOfTypes1|ATTACHED|tinysnb(DUCKDB)|
-STATEMENT LOAD FROM other1.person RETURN *;
---- 4
1|15.00000
2|2.58611
3|1.45810
5|5.79820
-STATEMENT CALL TABLE_INFO('other1.person') RETURN *;
---- 2
0|id|INT32|NULL
1|wealth|DECIMAL(10, 5)|NULL

-STATEMENT LOAD FROM tinysnb.person RETURN count(*);
---- 1
8
-LOG UseDatabaseStatement
-STATEMENT USE other1;
---- 1
Used database successfully.
-STATEMENT LOAD FROM person RETURN *;
---- 4
1|15.00000
2|2.58611
3|1.45810
5|5.79820
-STATEMENT USE tinysnb;
---- 1
Used database successfully.
-STATEMENT LOAD FROM person RETURN count(*);
---- 1
8
-STATEMENT LOAD FROM other1.person RETURN count(*);
---- 1
4
-STATEMENT CALL CLEAR_ATTACHED_DB_CACHE();
---- ok
-STATEMENT LOAD FROM other1.person RETURN count(*);
---- 1
4
-STATEMENT CALL TABLE_INFO('other1.person') RETURN *;
---- 2
0|id|INT32|NULL
1|wealth|DECIMAL(10, 5)|NULL
-STATEMENT CALL TABLE_INFO('tinysnb.person') RETURN *;
---- 16
0|ID|INT64|NULL
1|fName|STRING|NULL
2|gender|INT64|NULL
3|isStudent|BOOL|NULL
4|isWorker|BOOL|NULL
5|age|INT64|NULL
6|eyeSight|DOUBLE|NULL
7|birthdate|DATE|NULL
8|registerTime|TIMESTAMP|NULL
9|lastJobDuration|INTERVAL|NULL
10|workedHours|INT64[]|NULL
11|usedNames|STRING[]|NULL
12|courseScoresPerTerm|INT64[][]|NULL
13|height|FLOAT|NULL
14|u|UUID|NULL
15|grades|INT64[4]|NULL
-LOG WrongTableName
-STATEMENT CALL TABLE_INFO('tinysnb.personxx') RETURN *;
---- error
Catalog exception: personxx does not exist in catalog.
-LOG WrongCatalogName
-STATEMENT CALL TABLE_INFO('tinysnbxx.person') RETURN *;
---- error
Runtime exception: No database named tinysnbxx.
-LOG AttachWithNonDefaultSchema
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/tinysnb.db' as kuzu (dbtype duckdb, schema = 'kuzu');
---- 1
Attached database successfully.
-STATEMENT LOAD FROM kuzu.employee RETURN *;
---- 3
0|alice|52
2|carol|23
10|dan|72
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/tinysnb.db' as noneExist (dbtype duckdb, schema = 'noneExist');
---- ok
-STATEMENT USE noneExist;
---- ok
-STATEMENT CALL show_tables() RETURN *;
---- 9
0|employee|ATTACHED|kuzu(DUCKDB)|
0|movies|ATTACHED|tinysnb(DUCKDB)|
0|person_copy|NODE|local(kuzu)|
0|person|ATTACHED|Other1(DUCKDB)|
1|organisation|ATTACHED|tinysnb(DUCKDB)|
1|person_copy1|NODE|local(kuzu)|
2|person|ATTACHED|tinysnb(DUCKDB)|
3|tableOfTypes|ATTACHED|tinysnb(DUCKDB)|
4|tableOfTypes1|ATTACHED|tinysnb(DUCKDB)|
-STATEMENT DETACH noneExist;
---- ok

-CASE TestingSupportedDBDataTypes
-LOAD_DYNAMIC_EXTENSION duckdb
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/datatypeTesting.db' as dataType (dbtype duckdb);
---- ok
-STATEMENT CALL table_info('dataType.person') RETURN *;
---- 10
0|name|STRING|NULL
1|profile_picture|BLOB|NULL
2|balance|DECIMAL(10, 2)|NULL
3|height|FLOAT|NULL
4|age|INT16|NULL
5|rating|INT8|NULL
6|large_number|UINT64|NULL
7|medium_number|UINT32|NULL
8|small_number|UINT16|NULL
9|tiny_number|UINT8|NULL
-STATEMENT CREATE NODE TABLE person_datatype(name STRING PRIMARY KEY, profile_picture BLOB, balance DECIMAL(10, 2), height FLOAT, age INT16, rating INT8, large_number UINT64, medium_number UINT32, small_number UINT16, tiny_number UINT8);
---- ok
-STATEMENT COPY person_datatype FROM dataType.person;
---- ok
-STATEMENT MATCH(p:person_datatype) RETURN p.*;
---- 4
Alice||1000.50|5.400000|30|5|10000000000|40000|500|10
Bob||2500.75|5.900000|27|4|20000000000|30000|400|20
Carol||500.25|5.200000|19|3|15000000000|20000|300|30
Dan||750.60|6.100000|25|4|18000000000|35000|450|15

-CASE InvalidDuckDBDatabase
-STATEMENT LOAD FROM tinysnb1.person RETURN *;
---- error
Runtime exception: No database named tinysnb1.
-STATEMENT LOAD FROM tinysnb1_person RETURN *;
---- error
Binder exception: Variable tinysnb1_person is not in scope.

-CASE InvalidUseDatabaseName
-STATEMENT USE NONEXIST;
---- error
Runtime exception: No database named NONEXIST.

-CASE ScanDuckdbDatabaseWithoutExt
-LOAD_DYNAMIC_EXTENSION duckdb
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/dbfilewithoutext' (dbtype duckdb);
---- ok
-STATEMENT LOAD FROM dbfilewithoutext.persons RETURN *
---- 2
Jeff|32
Wendy|28
-LOG AttachDBWithSameAlias
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/other.db' as dbfilewithoutext (dbtype duckdb);
---- error
Runtime exception: Duplicate attached database name: dbfilewithoutext. Attached database name must be unique.
-LOG AttachSameDBError
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/dbfilewithoutext' (dbtype duckdb);
---- error
Runtime exception: Duplicate attached database name: dbfilewithoutext. Attached database name must be unique.
-LOG DetachExistDB
-STATEMENT DETACH dbfilewithoutext;
---- ok
-LOG DetachNotExistDBError
-STATEMENT DETACH dbfilewithoutext;
---- error
Runtime exception: Database: dbfilewithoutext doesn't exist.
-LOG AttachNotExistDBError
-STATEMENT ATTACH 'not-exist.db' (dbtype duckdb);
---- error
Runtime exception: Given duckdb database path not-exist.db does not exist.

-CASE AttachDBWithoutLoadingExtension
-SKIP_STATIC_LINK
-STATEMENT ATTACH 'notexist.db' (dbtype duckdb);
---- error
Runtime exception: No loaded extension can handle database type: duckdb.
Did you forget to load duckdb extension?
You can load it by: load extension duckdb;
-STATEMENT ATTACH 'notexist.db' (dbtype postgres);
---- error
Runtime exception: No loaded extension can handle database type: postgres.
Did you forget to load postgres extension?
You can load it by: load extension postgres;
-STATEMENT ATTACH 'notexist.db' (dbtype sqlite);
---- error
Runtime exception: No loaded extension can handle database type: sqlite.

-CASE InstallOfficialExtension
-SKIP
-SKIP_STATIC_LINK
-STATEMENT FORCE INSTALL duckdb FROM 'http://localhost/extension/repo/'
---- ok
-STATEMENT load extension duckdb
---- ok
-STATEMENT ATTACH '${KUZU_ROOT_DIRECTORY}/dataset/databases/duckdb_database/tinysnb.db' as tinysnb (dbtype duckdb, skip_unsupported_table = true);
---- 1
Attached database successfully.
-STATEMENT LOAD FROM tinysnb.person RETURN *;
---- 8
0|Alice|1|True|False|35|5.000000|1900-01-01|2011-08-20 11:25:30|3 years 2 days 13:02:00|[10,5]|[Aida]|[[10,8],[6,7,8]]|1.731000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a11|[96,54,86,92]
10|Hubert Blaine Wolfeschlegelsteinhausenbergerdorff|2|False|True|83|4.900000|1990-11-27|2023-02-21 13:25:30|3 years 2 days 13:02:00|[10,11,12,3,4,5,6,7]|[Ad,De,Hi,Kye,Orlan]|[[7],[10],[6,7]]|1.323000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a18|[77,64,100,54]
2|Bob|2|True|False|30|5.100000|1900-01-01|2008-11-03 15:25:30.000526|10 years 5 months 13:00:00.000024|[12,8]|[Bobby]|[[8,9],[9,10]]|0.990000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a12|[98,42,93,88]
3|Carol|1|False|True|45|5.000000|1940-06-22|1911-08-20 02:32:21|48:24:11|[4,5]|[Carmen,Fred]|[[8,10]]|1.000000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a13|[91,75,21,95]
5|Dan|2|False|True|20|4.800000|1950-07-23|2031-11-30 12:25:30|10 years 5 months 13:00:00.000024|[1,9]|[Wolfeschlegelstein,Daniel]|[[7,4],[8,8],[9]]|1.300000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a14|[76,88,99,89]
7|Elizabeth|1|False|True|20|4.700000|1980-10-26|1976-12-23 11:21:42|48:24:11|[2]|[Ein]|[[6],[7],[8]]|1.463000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a15|[96,59,65,88]
8|Farooq|2|True|False|25|4.500000|1980-10-26|1972-07-31 13:22:30.678559|00:18:00.024|[3,4,5,6,7]|[Fesdwe]|[[8]]|1.510000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a16|[80,78,34,83]
9|Greg|2|False|False|40|4.900000|1980-10-26|1976-12-23 11:21:42|10 years 5 months 13:00:00.000024|[1]|[Grad]|[[10]]|1.600000|a0eebc99-9c0b-4ef8-bb6d-6bb9bd380a17|[43,83,67,43]
