Skip to content

[client] Prune Arrow buffers before client-side decompression. - #4883

Open
loserwang1024 wants to merge 1 commit into
apache:mainfrom
loserwang1024:poc-test-scan
Open

loserwang1024 wants to merge 1 commit into
apache:mainfrom
loserwang1024:poc-test-scan

Conversation

@loserwang1024

@loserwang1024 loserwang1024 commented Oct 26, 2026 •

Copy link
Copy Markdown
Contributor

Select Arrow field nodes and buffers before vector loading so row scans only decompress requested columns. Cache per-schema projection plans and preserve schema evolution mappings, output order and batch checksums.

Cover compression codecs, nested fields, missing columns, buffer ownership and failed loads.

AI-Model: gpt-6
AI-Contributed/Feature: 257/257
AI-Contributed/UT: 447/447

Purpose

Linked issue: close #4882

Brief change log

Tests

API and Format

Documentation

@loserwang1024

Copy link
Copy Markdown
Contributor Author

@leonardBang @platinumhamburg @swuferhong , WDYT?

@platinumhamburg platinumhamburg left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM, just a couple of minor suggestions.


/**
* Deserializes the Arrow batch and loads only the selected fields; buffers of unselected fields
* are neither copied nor decompressed. Buffers of a previously loaded batch are replaced.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The full IPC body is still deserialized and copied before pruning. Please describe this as skipping vector loading and decompression for unselected columns, rather than saying their buffers are not copied.

if (target == null || isProjectionPushDowned() || schemaId == target.schemaId) {
return null;
if (logFormat == LogFormat.ARROW) {
return getArrowReadPlan(schemaId).createOutputRow();

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Arrow iteration already obtains its output mapping directly from ArrowReadPlan.createOutputRow(), while the remaining callers of this method handle INDEXED and COMPACTED records. Consider restricting this method to those formats and keeping Arrow output mapping on the plan. This would remove a redundant entry point and avoid creating Arrow read resources when querying an output mapping.

Select Arrow field nodes and buffers before vector loading so row scans
only decompress requested columns. Cache per-schema projection plans and
preserve schema evolution mappings, output order and batch checksums.
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.

[client] Push projection into Arrow loading for remote log scans

2 participants