Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Exception when rel table is not imported #1203

Closed
rfdavid opened this issue Jan 25, 2023 · 1 comment
Closed

Exception when rel table is not imported #1203

rfdavid opened this issue Jan 25, 2023 · 1 comment
Assignees

Comments

@rfdavid
Copy link
Collaborator

rfdavid commented Jan 25, 2023

Environment: OSX 11.7 (binary) and Ubuntu 20 (debug)

An exception occurs when executing the following steps:

  1. Create a node table User
  2. Create a relationship table Follows,
  3. Import demo-db/user.csv
  4. Query MATCH (a:User)-[f:Follows]->(b:User)

The exception does not occur if step 3 is executed before step 2 (importing user.csv before creating the relationship table Follows). Rather, the result return empty, which I assume is the desired output.

➜  shell git:(master) ✗ ./kuzu_shell -i db
Opened the database at path: db
Enter ":help" for usage hints.
kuzu> CREATE NODE TABLE User(name STRING, age INT64, PRIMARY KEY (name));
-------------------------------------
| NodeTable: User has been created. |
-------------------------------------
(1 tuple)
Time: 6.40ms (compiling), 9.51ms (executing)
kuzu> CREATE REL TABLE Follows(FROM User TO User, since INT64);
---------------------------------------
| RelTable: Follows has been created. |
---------------------------------------
(1 tuple)
Time: 1.70ms (compiling), 10.66ms (executing)
kuzu> MATCH (a:User)-[f:Follows]->(b:User) RETURN a.name, b.name, f.since;
-----------------------------
| a.name | b.name | f.since |
-----------------------------
(0 tuples)
Time: 45.32ms (compiling), 1.83ms (executing)
kuzu> COPY User FROM "user.csv";
------------------------------------------------------
| 4 number of tuples has been copied to table: User. |
------------------------------------------------------
(1 tuple)
Time: 0.69ms (compiling), 15.31ms (executing)
kuzu> MATCH (a:User)-[f:Follows]->(b:User) RETURN a.name, b.name, f.since;
kuzu_shell: /home/rfdavid/Devel/waterloo/kuzu/src/storage/storage_structure/disk_array.cpp:346: U& kuzu::storage::BaseInMemDiskArray<U>::operator[](uint64_t) [with U = unsigned int; uint64_t = long unsigned int]: Assertion `apCursor.pageIdx < this->header.numAPs' failed.
[1]    224357 abort (core dumped)  ./kuzu_shell -i db
@acquamarin
Copy link
Collaborator

Hi David!
Thanks for reporting the bug to us.

The reason for this bug is that:
The adjLists which stores in the Follows relTable for the nodes that you added through COPY User FROM "user.csv"; is not initialized properly. We will fix this bug as soon as possible.

@acquamarin acquamarin self-assigned this Jan 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants