Skip to content

Fix segfault on label() of list element#608

Merged
adsharma merged 2 commits into
LadybugDB:mainfrom
mdbenito:fix/non-pattern-expressions
Jun 22, 2026
Merged

Fix segfault on label() of list element#608
adsharma merged 2 commits into
LadybugDB:mainfrom
mdbenito:fix/non-pattern-expressions

Conversation

@mdbenito

@mdbenito mdbenito commented Jun 22, 2026

Copy link
Copy Markdown
Contributor

This PR fixes this segfault

import database 'dataset/demo-db/parquet';
MATCH p = (n)-[:LivesIn]->(m:City) WITH nodes(p) AS ns RETURN label(ns[1]);

And another one on comparisons like ns[1] <> ns[0].

Here is the original bug report kuzudb/kuzu#6050, addressed in Ryu with predictable-labs/ryugraph#2

Despite the claim in #184 , this was never ported to ladybug, hence this PR.

The problem is incorrect binding of non-pattern exprs in label() and in comparisons. I added some new test cases for the latter.

Another two fixes were missing from that PR. I'll prepare separate ones for them

@mdbenito

Copy link
Copy Markdown
Contributor Author

The failing test seems to be related to installation of the neo4j extension:

2026-06-22T12:56:43.6633903Z [2026-06-22 12:56:42.457] [info] QUERY: INSTALL neo4j;
2026-06-22T12:56:43.6634879Z /home/runner/work/ladybug/ladybug/test/test_runner/test_runner.cpp:184: Failure
2026-06-22T12:56:43.6663876Z Value of: queryResult->isSuccess()
2026-06-22T12:56:43.6693812Z   Actual: false
2026-06-22T12:56:43.6694353Z Expected: true
2026-06-22T12:56:43.6712055Z EXPECT OK BUT GOT ERROR: IO exception: Failed to create directory /home/runner/.lbdb/extension/0.17.0/linux_amd64/ due to: IO exception: Directory /home/runner/.lbdb/extension/0.17.0/linux_amd64 cannot be created. Check if it exists and remove it.

@adsharma

Copy link
Copy Markdown
Contributor

Thank you for the fixes!

CI is sometimes flaky. Rerunning fixed it.

@adsharma adsharma merged commit 0993505 into LadybugDB:main Jun 22, 2026
7 of 8 checks passed
@mdbenito mdbenito deleted the fix/non-pattern-expressions branch June 22, 2026 19:05
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

Successfully merging this pull request may close these issues.

2 participants