Skip to content

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

Open
Xuanwo wants to merge 3 commits into
apache:mainfrom
Xuanwo:xuanwo/parquet-opendal-example
Open

docs(parquet): add OpenDAL read and write example#11014
Xuanwo wants to merge 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 Changes to the 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.

@alamb alamb added the documentation Improvements or additions to documentation label Sep 10, 2026
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 Changes to the parquet crate

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants