Skip to content

fix(vortex): reject columns the writer cannot convert instead of panicking - #878

Merged
JingsongLi merged 1 commit into
apache:mainfrom
jackylee-ch:fix/vortex-reject-unsupported-field-types
Sep 22, 2026
Merged

JingsongLi merged 1 commit into
apache:mainfrom
jackylee-ch:fix/vortex-reject-unsupported-field-types

Conversation

@jackylee-ch

Copy link
Copy Markdown
Contributor

VortexFormatWriter::new handed the Arrow schema straight to DType::from_arrow, which ends in unimplemented!() for any Arrow type it has no arm for. Map is one of those, and paimon_type_to_arrow builds a Map for both MAP and MULTISET — so writing a vortex table with either column aborted the process at writer construction instead of returning an error. Reproduced through create_table -> new_write() -> write_arrow_batch.

Screen the schema before the conversion and return Error::Unsupported naming the column, following validate_mosaic_schema.

The check is on the Arrow schema, not write_fields: kv_file_writer and postpone_file_writer both pass write_fields: None, so a DataField-based check would silently skip the primary-key write path.

…cking

VortexFormatWriter::new passed the Arrow schema to DType::from_arrow,
whose conversion ends in unimplemented!() for a type it has no arm for.
Arrow Map has no arm, and that is what paimon_type_to_arrow builds for
both MAP and MULTISET, so a vortex table with either column aborted the
process at writer construction rather than returning an error.

Screen the schema first and return Error::Unsupported naming the column,
matching the per-format validator the mosaic reader already uses. The
walk descends exactly the containers DType::from_arrow descends into, so
a Map nested in a ROW is caught too.
@JingsongLi

Copy link
Copy Markdown
Contributor

Reviewed head 94a6ac6. Requirement fit: SUPPORTED; implementation: CLEAN. I traced Paimon MAP/MULTISET conversion to Arrow Map and the Vortex 0.75 DType::from_arrow fallback to unimplemented!(). The new schema check reaches nested Map fields before writer construction and returns an actionable Unsupported error; the positive nested-ROW path remains accepted. I ran cargo test -p paimon --lib --features vortex arrow::format::vortex::tests::test_vortex_writer (6 passed). No actionable issue found in this head.

@JingsongLi
JingsongLi merged commit 2e1087a into apache:main Sep 22, 2026
14 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