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

Node is created with SERIAL property missing under certain circumstances #2402

Closed
russell-liu opened this issue Nov 13, 2023 · 1 comment · Fixed by #2583
Closed

Node is created with SERIAL property missing under certain circumstances #2402

russell-liu opened this issue Nov 13, 2023 · 1 comment · Fixed by #2583
Labels
bug Something isn't working

Comments

@russell-liu
Copy link
Contributor

After executing the following

CREATE NODE TABLE A(pk1 SERIAL, PRIMARY KEY(pk1));
CREATE NODE TABLE B(pk2 SERIAL, PRIMARY KEY(pk2));
CREATE NODE TABLE C(pk3 SERIAL, PRIMARY KEY(pk3));
CREATE (:A);
CREATE (:B);

Executing the query

MATCH (n) RETURN n;

Gives the following output:

---------------------------------
| n                             |
---------------------------------
| {_ID: 0:0, _LABEL: A, pk1: 0} |
---------------------------------
| {_ID: 1:0, _LABEL: B}         |
---------------------------------

Where pk2: 0 is missing from the second row.
The issue does not occur without CREATE NODE TABLE C.

@ray6080 ray6080 added the bug Something isn't working label Nov 18, 2023
@benjaminwinger
Copy link
Collaborator

As far as I can tell, the issue is that we're re-using the ValueVectors that store the scan results, however, serial columns don't have a null column and aren't updating the null data in the result vectors (there's an assert that the result vector is not null, which fails in this example if runtime checks are enabled).

Prior to scanning the B column, something, presumably related to the empty C table, is scanning a column with an id of INVALID_COLUMN_ID, which sets everything in the vector to null (here), despite there being no actual null values being scanned, but it presumably could also occur if a column containing null values was scanned first.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants