Skip to content

Read compiled Cypher's rows and a node's held properties on Oracle as text, so a node updated in place is read on Oracle 23.26.4 - #616

Merged
jasperblues merged 6 commits into
mainfrom
oracle-text-rows-609
Dec 5, 2026
Merged

jasperblues merged 6 commits into
mainfrom
oracle-text-rows-609

Conversation

@jasperblues

@jasperblues jasperblues commented Dec 5, 2026 •

Copy link
Copy Markdown
Member

Fixes #609.

On Oracle 23.26.4 a node updated in place could not be read back: python-oracledb's thin mode can't read OSON version 2 (DPY-3021, oracle/python-oracledb#622, open, in every release to 26.2.0), and Oracle 23.26.4 sends it for a document updated in place even after re-encoding it with JSON_TRANSFORM(…, KEEP '$'). A compiled Cypher read that returned such a node failed, and so did a write that returned one, after the write was kept.

Fix

  • Compiled Cypher reads its rows as text. The shared compiler is asked for oracleReadsAsText and oracleRowsAsText, as Drivine for TypeScript asks: a read's rows come back a CLOB each, a write's all in one row as a list. The host reads each from Oracle's extended JSON (OracleResultMapper.map_compiled_rows): floats as marked ({"$numberDouble": 2.5}, NaN, the infinities), whole numbers in full, the store layout through the module, for query and a cursor, async and sync. The driver never decodes a document.
  • The held properties are read as text. A save under NullPolicy.CLEAR, and update(), of a model with a property bag or open labels first reads what the node holds; that read is now JSON_SERIALIZE(n.props RETURNING CLOB EXTENDED) AS "props:json". The statement is a golden one, changed with Drivine for TypeScript in Read the held properties on Oracle as text, the statement drivine-python writes too drivine#923; tests/golden is copied from its merge commit.

The Oracle image the suite pins (23.26.3) stays pinned here; unpinning is its own change.

Measured

tests/integration/oracle/test_oracle_updated_in_place.py (and its sync twin): nodes updated in place eleven ways, then each read, node-returning write, MERGE, cursor, CLEAR save and update() from the issue's table.

Oracle 23.26.3 (pinned) Oracle 23.26.4
main — 12 of 16 fail, DPY-3021 (reads, writes, MERGE)
this branch 16 of 16 pass 16 of 16 pass

The CLEAR save and update() cases didn't fail on main in this run, where the issue's measurement had 14 of 48 failing; their read is made text all the same.

Checks

  • Unit: 3,265 tests pass, new ones of the text readers through query and a cursor (async and sync), of a compiled write's one row of text, of _graph asking for text on Oracle only, and of a :json column read from extended JSON.
  • tests/integration with ORACLE_TESTS=true, through the lock, at 01be97f (on main with compiler 0.56.0): 4,975 passed, 0 failed, 289 skipped, 6 xfailed. The new test on Oracle 23.26.4: 16 of 16. An earlier run before the merge failed 15, all fixed: two Oracle timing suites read a compiled statement's rows straight from the driver and now read them as the library does, and the new test's own two mistakes.
  • Golden statements copied from liberation-data/drivine@c0db08da (#923's merge): against main, only the held-properties statement changes.

Review: 3 passes, last CLEAN.

  1. Tests of the compiled-row readers through query and a cursor, of _graph, and of the :json path.
  2. The new integration test sorted by a property one update changed, and set a date the flat bag took; a test of a compiled write's row of text; a docstring.
  3. Clean.

…lace is read on Oracle 23.26.4 (#609)

python-oracledb's thin mode can't read OSON version 2 (DPY-3021), which Oracle 23.26.4 can send for a
document updated in place even encoded again. Ask the shared compiler for text (oracleReadsAsText,
oracleRowsAsText), as Drivine for TypeScript does, and read each row from Oracle's extended JSON.
…e() of a node updated in place work on Oracle 23.26.4 (#609)
…em, and fix the in-place test's spec and flat-bag expectation (#609)
@jasperblues
jasperblues merged commit 3d62515 into main Dec 5, 2026
16 checks passed
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.

Oracle 23.26.4: reads/saves/returns of in-place-updated nodes fail (DPY-3021, OSON v2); a node-returning write can commit though its call raises

1 participant