Skip to content

WIP: Arrow: vectorized read of lists - #17723

Draft
ldudas-marx wants to merge 7 commits into
apache:mainfrom
ldudas-marx:arrow_vectorized_list
Draft

WIP: Arrow: vectorized read of lists #17723
ldudas-marx wants to merge 7 commits into
apache:mainfrom
ldudas-marx:arrow_vectorized_list

Conversation

@ldudas-marx

Copy link
Copy Markdown

This is WIP. I want to improve on the design of NullabilityHolder and the reading of repetition levels.

ldudas-marx and others added 5 commits August 14, 2026 17:28
# Conflicts:
#	arrow/src/main/java/org/apache/iceberg/arrow/vectorized/VectorizedReaderBuilder.java
Co-authored-by: Copilot <copilot@github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Dictionary encoding is not supported yet

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Also rename VectorizedListBuilder to ListVectorBuilder and slim the interface

Co-Authored-By: Claude <noreply@anthropic.com>
* repetition-level histogram); used to size the nullability holder and repetition-level
* vector
*/
void prepareBatch(int numRowsToRead, int estimatedSize) {

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.

What happens if the estimated size is too small?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

The Arrow vectors will be resized automatically (with "safe" method calls), but the NullabilityHolder will not so it will lead to an index out of bound exception. It happens when the list is nested repetition level histogram is not present in the parquet metadata.

I don't know what is the better approach in this case to a) over allocate by value count (it can be far from the actual number of lists on the level or b) scale responsively.


if (listRepetitionLevels != null) {
listRepetitionLevels.close();
}

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.

in a new file, please leave an empty line after the block close. See: https://iceberg.apache.org/contribute/#block-spacing

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Oh I thought Spotless would fix that, but I'll add newlines where missing.

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.

Where do we handle this change?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Which change? I don't see any lines referenced.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants