Skip to content

Round-trip support for Arrow unknown extensions - #10652

Closed
gatesn wants to merge 2 commits into
developfrom
ngates/arrow-unknown-extensions
Closed

gatesn wants to merge 2 commits into
developfrom
ngates/arrow-unknown-extensions

Conversation

@gatesn

@gatesn gatesn commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Allow Vortex extension types to export into arbitrary Arrow extension types (with matching ID + metadata). Unfortunately, arrow metadata is a UTF8 string, not binary, so vortex extension metadata is base64 encoded.

Export extensions without an Arrow plugin using their storage type and
extension identity annotations. Encode serialized metadata using standard
padded base64, tagged with vortex:extension:metadata:encoding=base64.
Import unhandled Arrow extensions as ForeignExtDType, decoding tagged
metadata and preserving untagged metadata verbatim.

Explicit Arrow plugins control canonical formats. Temporal mappings and
the native Vortex file representation are unchanged. Arrow import retains
unknown identity independently of the file deserialization allow_unknown
policy, following Arrow's storage fallback model.

Expose the existing foreign dtype and opaque metadata for cross-crate use.
Cover top-level and nested round-trips, structural storage, nulls,
dictionaries, arbitrary bytes, invalid encodings and plugin precedence.
ExtVTable still cannot establish whether storage sorting or equality
preserves an extension's logical semantics.

Validation: pinned nightly formatter; full tests and doctests for both
touched crates; clippy with all targets/features and warnings denied.
The final Arrow suite passes all 361 tests. Regression cases fail against
the original implementations and pass with these fixes. Patch whitespace
checks pass.

Signed-off-by: Nicholas Gates <nick@nickgates.com>
Remove unconditional extension unwrapping from the physical Arrow
executor. Perform it in the session fallback after exporter plugins have
had a chance to handle the target, and only when the requested Arrow type
maps to the extension's storage dtype.

Keep the original logical dtype for other conversions so canonical target
validation can reject opaque extensions requested as dates, times or
timestamps. Preserve explicit struct/list storage exports.

Add ten temporal target regression cases covering annotated and unannotated
fields. All ten fail before the fix and pass afterward. Also cover valid
exports to explicit structural storage targets.

Validation: pinned nightly formatter; 373 Arrow tests; two doctests;
clippy with all targets/features and warnings denied; git diff --check.

Signed-off-by: Nicholas Gates <nick@nickgates.com>
@gatesn gatesn added the changelog/feature A new feature label Oct 20, 2026
@gatesn
gatesn marked this pull request as draft October 20, 2026 19:24
@codspeed

codspeed Bot commented Oct 20, 2026

Copy link
Copy Markdown

Merging this PR will regress 2 benchmarks

⚠️ Unknown Walltime execution environment detected

Using the Walltime instrument on standard Hosted Runners will lead to inconsistent data.

For the most accurate results, we recommend using CodSpeed Macro Runners: bare-metal machines fine-tuned for performance measurement consistency.

⚠️ 23 benchmarks spent significant time in system calls

System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.

Measurement and system calls

ℹ️ 40 benchmarks have no flamegraph

The flamegraph could not be generated because we failed to resolve the symbols in the profiling trace. This happens when we fail to harvest information about language frames.

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

⚡ 6 improved benchmarks
❌ 2 regressed benchmarks
✅ 2400 untouched benchmarks
⏩ 12 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ ⚠️ CPU Simulation decode_primitives[i64, (1000, 8)] 24 µs 32.1 µs -25.35%
❌ ⚠️ CPU Simulation test_scan_filter[int] 3.2 ms 3.6 ms -10.86%
⚡ Walltime threshold_neon[8] 2.3 µs 1.3 µs +70.02%
⚡ ⚠️ CPU Simulation density_sweep_dense_runs[0.001] 61.4 µs 43.4 µs +41.63%
⚡ Walltime threshold_neon[64] 3.6 µs 2.5 µs +41.6%
⚡ Walltime filter_neon[8] 1,144 ns 897 ns +27.54%
⚡ Walltime filter_neon[64] 2.1 µs 1.7 µs +20.57%
⚡ Walltime filter_neon[80] 3 µs 2.6 µs +15.32%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing ngates/arrow-unknown-extensions (91c46ff) with develop (ca80583)

Open in CodSpeed

Footnotes

  1. 12 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@gatesn gatesn closed this Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

changelog/feature A new feature

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant