Skip to content

docs(parquet): add OpenDAL read and write example - #11014

Merged
alamb merged 3 commits into
apache:mainfrom
Xuanwo:xuanwo/parquet-opendal-example
Sep 11, 2026
Merged

alamb merged 3 commits into
apache:mainfrom
Xuanwo:xuanwo/parquet-opendal-example

Conversation

@Xuanwo

@Xuanwo Xuanwo commented Sep 7, 2026 •

Copy link
Copy Markdown
Member

Which issue does this PR close?

Related to #10308.

Rationale for this change

Demonstrate how to use OpenDAL with Parquet's generic async I/O interfaces, alongside the existing object_store example.

What changes are included in this PR?

Add an in-memory read/write example with AsyncFileReader and AsyncFileWriter adapters and a SpawnedReader demonstration. Point application developers to parquet_opendal for ready-made adapters. OpenDAL 0.59 is a development dependency with only the memory service enabled.

Are these changes tested?

The example asserts that both ordinary and dedicated-runtime reads reproduce the written RecordBatch. Formatting and whitespace checks pass.

Are there any user-facing changes?

A new example, runnable with cargo run -p parquet --example opendal --features async. No public API changes. OpenDAL 0.59 requires Rust 1.91, above this workspace's declared Rust 1.88 MSRV; this affects development targets that resolve/build the new dependency.

@github-actions github-actions Bot added the parquet parquet crate label Sep 9, 2026
@Xuanwo
Xuanwo marked this pull request as ready for review September 10, 2026 09:29
@Xuanwo

Xuanwo commented Sep 10, 2026

Copy link
Copy Markdown
Member Author

cc @alamb not sure if here is a good place, looking for your suggestion.

@alamb alamb 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.

Makes sense to me -- thank you @Xuanwo

Comment thread parquet/Cargo.toml
tokio = { version = "1.0", default-features = false, features = ["macros", "rt-multi-thread", "io-util", "fs", "sync"] }
rand = { version = "0.10", default-features = false, features = ["std", "std_rng", "thread_rng"] }
object_store = { workspace = true, features = ["azure", "fs"] }
opendal = { version = "0.59.1", default-features = false, features = ["services-memory"] }

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.

Can we please make the dependency optional?

@Xuanwo Xuanwo Sep 11, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

opendal is added as dev-dependency only which can't be an optinal dep 😄

I'm open to move it to dependencies and set it as optional, but this would expose a new feature gate on parquet side. I feel it didn't worth it.

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.

dev-dependency is the right thing. THank you

@alamb alamb added the documentation Improvements or additions to documentation label Sep 10, 2026
@alamb
alamb merged commit 4cd8be9 into apache:main Sep 11, 2026
32 checks passed
Jefffrey pushed a commit that referenced this pull request Sep 17, 2026
# Which issue does this PR close?

No associated issue. Follows the Parquet example in #11014.

# Rationale for this change

Demonstrate how to read Avro through OpenDAL using the generic async I/O
interfaces, alongside the existing object_store example.

# What changes are included in this PR?

Add an in-memory round-trip example with an `AsyncFileReader` adapter
using OpenDAL range reads and a `SpawnedReader` demonstration. The
synchronous Avro writer encodes a small OCF in memory before uploading
it. OpenDAL uses the same development dependency version and memory
service as the Parquet example.

# Are these changes tested?

The example asserts that ordinary and dedicated-runtime reads reproduce
the written `RecordBatch`, including nulls. It runs successfully with
`--features async` and with `--no-default-features --features async`.
Example Clippy with `-D warnings`, workspace formatting, and whitespace
checks pass.

# Are there any user-facing changes?

A new example, runnable with `cargo run -p arrow-avro --example opendal
--features async`. No public API changes. OpenDAL 0.59 requires Rust
1.91, above the workspace's declared Rust 1.88 MSRV; this affects
development targets that build the new dependency.

Co-authored-by: Andrew Lamb <[email protected]>
Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Sep 18, 2026
# Which issue does this PR close?

Related to apache#10308.

# Rationale for this change

Demonstrate how to use OpenDAL with Parquet's generic async I/O
interfaces, alongside the existing object_store example.

# What changes are included in this PR?

Add an in-memory read/write example with AsyncFileReader and
AsyncFileWriter adapters and a SpawnedReader demonstration. Point
application developers to parquet_opendal for ready-made adapters.
OpenDAL 0.59 is a development dependency with only the memory service
enabled.

# Are these changes tested?

The example asserts that both ordinary and dedicated-runtime reads
reproduce the written RecordBatch. Formatting and whitespace checks
pass.

# Are there any user-facing changes?

A new example, runnable with `cargo run -p parquet --example opendal
--features async`. No public API changes. OpenDAL 0.59 requires Rust
1.91, above this workspace's declared Rust 1.88 MSRV; this affects
development targets that resolve/build the new dependency.
Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Sep 18, 2026
# Which issue does this PR close?

No associated issue. Follows the Parquet example in apache#11014.

# Rationale for this change

Demonstrate how to read Avro through OpenDAL using the generic async I/O
interfaces, alongside the existing object_store example.

# What changes are included in this PR?

Add an in-memory round-trip example with an `AsyncFileReader` adapter
using OpenDAL range reads and a `SpawnedReader` demonstration. The
synchronous Avro writer encodes a small OCF in memory before uploading
it. OpenDAL uses the same development dependency version and memory
service as the Parquet example.

# Are these changes tested?

The example asserts that ordinary and dedicated-runtime reads reproduce
the written `RecordBatch`, including nulls. It runs successfully with
`--features async` and with `--no-default-features --features async`.
Example Clippy with `-D warnings`, workspace formatting, and whitespace
checks pass.

# Are there any user-facing changes?

A new example, runnable with `cargo run -p arrow-avro --example opendal
--features async`. No public API changes. OpenDAL 0.59 requires Rust
1.91, above the workspace's declared Rust 1.88 MSRV; this affects
development targets that build the new dependency.

Co-authored-by: Andrew Lamb <[email protected]>
Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Sep 21, 2026
# Which issue does this PR close?

Related to apache#10308.

# Rationale for this change

Demonstrate how to use OpenDAL with Parquet's generic async I/O
interfaces, alongside the existing object_store example.

# What changes are included in this PR?

Add an in-memory read/write example with AsyncFileReader and
AsyncFileWriter adapters and a SpawnedReader demonstration. Point
application developers to parquet_opendal for ready-made adapters.
OpenDAL 0.59 is a development dependency with only the memory service
enabled.

# Are these changes tested?

The example asserts that both ordinary and dedicated-runtime reads
reproduce the written RecordBatch. Formatting and whitespace checks
pass.

# Are there any user-facing changes?

A new example, runnable with `cargo run -p parquet --example opendal
--features async`. No public API changes. OpenDAL 0.59 requires Rust
1.91, above this workspace's declared Rust 1.88 MSRV; this affects
development targets that resolve/build the new dependency.
Rich-T-kid pushed a commit to Rich-T-kid/arrow-rs that referenced this pull request Sep 21, 2026
# Which issue does this PR close?

No associated issue. Follows the Parquet example in apache#11014.

# Rationale for this change

Demonstrate how to read Avro through OpenDAL using the generic async I/O
interfaces, alongside the existing object_store example.

# What changes are included in this PR?

Add an in-memory round-trip example with an `AsyncFileReader` adapter
using OpenDAL range reads and a `SpawnedReader` demonstration. The
synchronous Avro writer encodes a small OCF in memory before uploading
it. OpenDAL uses the same development dependency version and memory
service as the Parquet example.

# Are these changes tested?

The example asserts that ordinary and dedicated-runtime reads reproduce
the written `RecordBatch`, including nulls. It runs successfully with
`--features async` and with `--no-default-features --features async`.
Example Clippy with `-D warnings`, workspace formatting, and whitespace
checks pass.

# Are there any user-facing changes?

A new example, runnable with `cargo run -p arrow-avro --example opendal
--features async`. No public API changes. OpenDAL 0.59 requires Rust
1.91, above the workspace's declared Rust 1.88 MSRV; this affects
development targets that build the new dependency.

Co-authored-by: Andrew Lamb <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation parquet parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants