Cypher on Oracle and SQLite: coalesce() of one argument is refused (port of drivine4j#530)
Maintainers usually reply within 1 day
Nobody has claimed this yet.
Assessment
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Newbie friendliness
- 62/100
Research direction
The bad output comes from the if name == "coalesce": branch in drivine/cypher/sql/sql_cypher_compiler.py (around line 3855), which emits COALESCE(x) for a single argument. Read that branch, then run the Cypher spec cases coalesce(n.missing), coalesce(n.name) and coalesce(null) to see the failure on SQLite. Done when one-argument coalesce compiles to valid SQL, either by emitting the bare argument or adding a NULL second argument, and those spec cases pass.
Written by the indexing model from the issue text.
Description
Port of liberation-data/drivine4j#530.
coalesce() with one argument is compiled to COALESCE(x). Oracle refuses that with ORA-00938, and SQLite does too where drivine-python compiles to it. Postgres takes it. Neo4j gives [true, true] for MATCH (n:Pr) WITH n ORDER BY n.i RETURN coalesce(n.u) IS NULL over two nodes.
Where. drivine/cypher/sql/sql_cypher_compiler.py, the if name == "coalesce": branch (around line 3855): f"COALESCE({coalesced})".
Fix (as planned in drivine4j#530). With one argument, compile the argument alone, or add a NULL second argument.
Tests. The Cypher spec step that drivine4j#530 adds (coalesce(n.missing), coalesce(n.name), coalesce(null)), picked up when the spec is synced.
- Dominant language
- Python
- Stars
- 1
- Forks
- 0
- Avg merge
- 1h 32m
- Merged PRs (30d)
- 149
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from liberation-data/drivine-python
-
Docs: drivine4j doesn't read the flat DATABASE_* variables, as 02-connecting.md and design.md sayOpendocumentation
Difficulty 1/5 1-3 hours Newbie friendliness 78/100
liberation-data/drivine-python#361 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
liberation-data/drivine-python#250 ·
Maintainers usually reply within 1 day
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 88/100
liberation-data/drivine-python#209 ·
Maintainers usually reply within 1 day
-
CI: three Oracle-only tests in test_cypher_compiled.py never run, as -k oracle doesn't select themOpen
Difficulty 1/5 Under an hour Newbie friendliness 88/100
liberation-data/drivine-python#178 ·
Maintainers usually reply within 1 day
-
enhancement
Difficulty 3/5 1-2 days Newbie friendliness 40/100
liberation-data/drivine-python#366 ·
Maintainers usually reply within 1 day
All issues in liberation-data/drivine-python
Similar issues
-
area:scripts area:tests bug priority:later
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Ikalus1988/MisakaNet#4358 ·
Maintainers usually reply within 1 day
-
Discovered ports from service discovery are never propagated to modules in Module.load()Possibly taken @vishalmore90 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
OWASP/Nettacker#1828 · 1 comment ·
Maintainers usually reply within 1 day
-
Difficulty 1/5 Under an hour Newbie friendliness 88/100
aws-samples/sample-per-model-bedrock#708 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
sjkim1127/Reversecore_MCP#365 ·
Maintainers usually reply within 1 day