Skip to content

Enable Mosaic reads by default#491

Merged
JingsongLi merged 2 commits into
apache:mainfrom
JingsongLi:codex/mosaic-always-enabled
Jul 9, 2026
Merged

Enable Mosaic reads by default#491
JingsongLi merged 2 commits into
apache:mainfrom
JingsongLi:codex/mosaic-always-enabled

Conversation

@JingsongLi

@JingsongLi JingsongLi commented Jul 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Make Mosaic reads always available instead of hiding them behind a Cargo feature, and upgrade paimon-mosaic-core to 0.2.0 so array and map columns are supported by the reader.

Changes

  • Treat paimon-mosaic-core as a regular dependency and remove the Mosaic Cargo feature declarations.
  • Remove Mosaic feature gates from the core reader registration, unit tests, and DataFusion fixture test.
  • Delegate Mosaic Arrow type validation to paimon-mosaic-core and add an array/map round-trip test.
  • Remove mosaic from CI feature lists and update docs to describe Mosaic reads as always available.

Testing

  • cargo check -p paimon
  • cargo check -p paimon --no-default-features --features storage-memory
  • cargo check -p paimon-datafusion --no-default-features
  • cargo test -p paimon mosaic --lib
  • cargo test -p paimon-datafusion --no-default-features --test mosaic_tables

Notes

cargo check -p paimon --no-default-features still requires at least one storage feature because of existing storage enum behavior, so this PR verifies the no-default path with storage-memory enabled.

@leaves12138 leaves12138 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

One compatibility concern: removing the mosaic feature name itself is a breaking change for downstream crates that already depend on it.

After this PR, Mosaic is always enabled, but existing dependency declarations such as:

paimon = { version = "0.3.0", features = ["mosaic"] }
paimon-datafusion = { version = "0.3.0", features = ["mosaic"] }

will fail Cargo resolution because neither crate defines a mosaic feature anymore. I verified this locally with a small downstream cargo check, which fails with:

package `check-mosaic-feature` depends on `paimon` with feature `mosaic` but `paimon` does not have that feature

Could we keep a no-op compatibility feature, e.g. mosaic = [] in paimon and mosaic = ["paimon/mosaic"] or mosaic = [] in paimon-datafusion, while still making the dependency non-optional and enabling reads by default? That preserves existing user Cargo.toml files and CI commands while achieving the goal of this PR.

@leaves12138 leaves12138 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Looks good to me. The Mosaic feature compatibility concern is intentionally not a blocker here.

@JingsongLi JingsongLi merged commit de7734e into apache:main Jul 9, 2026
12 checks passed
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.

2 participants