Skip to content

SODA: read document content larger than 32767 bytes (#211)#216

Merged
lemenkov merged 1 commit into
masterfrom
soda-large-reads-211
Jun 25, 2026
Merged

SODA: read document content larger than 32767 bytes (#211)#216
lemenkov merged 1 commit into
masterfrom
soda-large-reads-211

Conversation

@lemenkov

Copy link
Copy Markdown
Owner

The last SODA follow-up: read document content past the 32767-byte inline window, which previously raised NotSupportedError.

How

getDocuments still returns the inline 32767-byte window per document in the batch read (one round trip, the common small-document case). Any document whose reported length exceeds the window is backfilled by slicing its BLOB into 32767-byte chunks — a RAW host array filled in one PL/SQL block, re-opened by key, one extra round trip per oversized document. getOne / getDocuments / getCursor share the build path, so all three return large content whole.

Tests

  • byte-exact round trips for ~120 KB and ~90 KB documents, and the 32767 / 32768 boundary;
  • a batch containing several large documents keeps each one's content distinct (no cross-contamination);
  • small documents keep their single-round-trip inline read.

The old inline-cap guard and its now-dead helper are removed. Sync + async; 23ai/21c pass, 11g/9i skip. Offline 526.

Closes #211

🤖 Generated with Claude Code

A document's content used to be read through a single DBMS_LOB.SUBSTR, so
a value over the 32767-byte PL/SQL window raised NotSupportedError rather
than truncating. Read it whole instead: getDocuments still returns the
inline 32767-byte window per document in the batch, and any document whose
reported length exceeds that is backfilled by slicing its BLOB into
32767-byte chunks (a RAW host array, one round trip per oversized
document, re-opened by key). Small documents keep their single-round-trip
inline read.

getOne / getDocuments / getCursor share the build path, so all three now
return large content whole. Verified byte-exact round trips past the
window (incl. the 32767 / 32768 boundary), and that a batch with several
large documents keeps each one's content distinct. The old inline-cap
guard (and its dead helper) are removed. Sync + async; 23ai/21c pass,
11g/9i skip.

Closes #211

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Signed-off-by: Peter Lemenkov <lemenkov@gmail.com>
@lemenkov lemenkov added this to the 1.10.1 milestone Jun 25, 2026
@lemenkov lemenkov merged commit 025cbd4 into master Jun 25, 2026
10 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.

SODA: read document content larger than 32767 bytes

1 participant