Skip to content

Conversation

jecsand838
Copy link
Contributor

Which issue does this PR close?

Part of #4886

Related to #6965

Rationale for this change

Avro supports arrays as a core data type, but previously arrow-avro had incomplete decoding logic to handle them. As a result, any Avro file containing array fields would fail to parse correctly within the Arrow ecosystem. This PR addresses this gap by:

  1. Completing the implementation of explicit Array -> List decoding: It completes the Decoder::Array logic that reads array blocks in Avro format and constructs an Arrow ListArray.

Overall, these changes expand Arrow’s Avro reader capabilities, allowing users to work with array-encoded data in a standardized Arrow format.

What changes are included in this PR?

1. arrow-avro/src/reader/record.rs:

  • Completed the Array decoding path which leverages blockwise reads of Avro array data.
  • Implemented decoder unit tests for Array types.

Are there any user-facing changes?

N/A

@github-actions github-actions bot added the arrow Changes to the arrow crate label May 28, 2025
Copy link
Member

@klion26 klion26 left a comment

Choose a reason for hiding this comment

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

Thank you for the contribution, LGTM

}

#[test]
fn test_array_decoding() {
Copy link
Member

Choose a reason for hiding this comment

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

thanks for these tests

Copy link
Contributor

@alamb alamb left a comment

Choose a reason for hiding this comment

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

Thank you @jecsand838 and @jecsand838 -- this looks good to me too

@alamb alamb merged commit ed25bba into apache:main Jun 17, 2025
23 checks passed
@jecsand838 jecsand838 deleted the avro-codec-array branch June 30, 2025 21:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arrow Changes to the arrow crate
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants