Skip to content

Show binary columns as a stub instead of reading their blobs#48

Merged
derekwisong merged 3 commits into
mainfrom
binary-column-stub
Jun 5, 2026
Merged

Show binary columns as a stub instead of reading their blobs#48
derekwisong merged 3 commits into
mainfrom
binary-column-stub

Conversation

@derekwisong

Copy link
Copy Markdown
Owner

Render binary (blob) columns in the data table as a distinct dim-italic placeholder (`‹binary›`) instead of reading their bytes into the display buffer. Reading large blobs (e.g. raw document bytes across many partitions) is what stalled scrolling and jump-to-end; the buffer now holds a stub while the real bytes remain in `lf` for export.

Includes a `binary_col` style config key and documentation.

Commits

  • Show a stub for binary columns instead of reading their blobs
  • Render binary column stubs in a distinct dim italic style
  • Document binary column placeholder and binary_col config key

Binary columns (e.g. raw document bytes) are often large. Materializing them
into the display buffer is what made jump-to-end and scrolling stall on big
datasets — reading ~GBs of blobs just to render a preview the grid truncates
anyway (measured: a 64-row end slice of the EDGAR hive set was ~78 MB / 5 min
cold; the same slice with the binary column projected out is ~4 s).

The display buffer now replaces binary columns with a "‹binary›" stub literal,
so polars never reads those column pages. The column still appears in its place
(header + stub cells), and the real bytes remain available via `lf` for export
and analysis (export collects from `lf`, not the display buffer). A bonus: small
columns previously hidden behind a wide binary column now fit on screen.

Adds a test asserting the buffer holds the stub, not binary data.
Binary columns show the ‹binary› placeholder; style those cells with a
dedicated color (default dark gray) plus italic so they read as a
placeholder rather than data. The color is themeable via a new binary_col
config key alongside the existing column-type colors, and is applied
independently of the column_colors toggle since the stub is never real data.
@derekwisong derekwisong merged commit f53fed5 into main Jun 5, 2026
8 checks passed
@derekwisong derekwisong deleted the binary-column-stub branch June 5, 2026 21:22
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.

1 participant