Skip to content

Native column frames: rid and list-of-number columns travel in binary kinds (stacked on #394) - #450

Draft
tae898 wants to merge 1 commit into
mainfrom
perf/388-native-column-frame-kinds
Draft

tae898 wants to merge 1 commit into
mainfrom
perf/388-native-column-frame-kinds

Conversation

@tae898

@tae898 tae898 commented Nov 22, 2026 •

Copy link
Copy Markdown
Collaborator

What does this PR do?

The native library's writer of column frames (ColumnFrames) writes rid for a column of valid RIDs (two int64 per row) and li8 or lf8 for a column of lists of integers or of floats (int32 offsets, a bitmap of null elements, one flat int64 or float64 array). Maps, nested lists, lists of anything else, lists that mix ints and floats, a list of nothing but nulls, an invalid RID and a column that mixes kinds stay json, as in #394. This is the native half of rank 10 of #388: #394 has the shared decoder and the JVM writer, and the native writer was split out of it so each half can be reviewed and measured on its own.

#394 is merged, so this PR is now a single commit on main: ColumnFrames.java (+125/-3) and the native line of KINDS in tests/test_frame_rid_list_kinds.py, which now expects the binary kinds from the native writer too. It needs a CI-built native library for its timed study (the workflow Test native on this branch), which is planned for 27.1.1. The decoder it relies on is in main, and the study of the JVM writer is on #394.

Related issues

Refs #388 and #315.

Performance changes

Not measured. The study of this half needs a native library built by CI (a native image build takes 5 to 30 minutes and is not built on a laptop or on the bench host), so it waits for the wheel CI builds from this branch. This PR states no speed or memory figure until it has run.

Docs

No page under docs/ or README.md describes the frame kinds; the header comment of ColumnFrames.java lists them.

Checklist

  • A regression test fails on the old code and passes on the new (the kind test fails while the native writer writes json)
  • The test suite that the change can affect passes (CI: the native parity run is the first compile of the Java)
  • uvx pre-commit run --files <changed files> passes

(Edited 2026-11-23: #394 merged, this pull request now sits on main.)

@tae898 tae898 added this to the 27.1.1 milestone Nov 22, 2026
@tae898 tae898 added python Pull requests that update python code performance Speed or memory of the bindings, with a measurement native The arcadedb package (native library build) labels Nov 22, 2026
@tae898 tae898 self-assigned this Nov 22, 2026
The native library wrote a column of record links and a column of lists as one tagged JSON array (json), parsed per cell in Python. ColumnFrames now writes rid for a column of valid RIDs (two int64 per row, a null row is 0, 0) and li8 or lf8 for a column of lists of integers or of floats (int32 offsets, a bitmap of null elements, one flat int64 or float64 array, a null row is an empty list under the row's null bit). Maps, nested lists, lists of strings, booleans or RIDs, lists that mix ints and floats, a list of nothing but nulls, an invalid RID (negative bucket or position), a column that mixes kinds and a column with more than 2**27 list elements in one frame stay json.

The decoder and the JVM writer are the change this one is stacked on. The test now expects the new kinds from the native wheel as it does from the JVM wheel (KINDS).

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

native The arcadedb package (native library build) performance Speed or memory of the bindings, with a measurement python Pull requests that update python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant