Skip to content

fix(parquet/pqarrow): require Variant value field when writing - #1242

Open
dgvj-work wants to merge 1 commit into
apache:mainfrom
dgvj-work:fix/variant-value-mandatory
Open

fix(parquet/pqarrow): require Variant value field when writing#1242
dgvj-work wants to merge 1 commit into
apache:mainfrom
dgvj-work:fix/variant-value-mandatory

Conversation

@dgvj-work

@dgvj-work dgvj-work commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Rationale for this change

Consensus in apache/parquet-format#591 is that the Variant value field is mandatory for writers. arrow-go currently omits it when a shredded schema has only metadata + typed_value.

Reading files that already omit value should still work.

Fixes #1204

What changes are included in this PR?

  • ToParquet errors if a Variant extension type has no value field
  • FromParquet still accepts Variant groups without value

Are these changes tested?

  • go test ./parquet/pqarrow -run 'TestVariantValueRequiredOnWrite|TestReadVariantWithoutValueField|TestConvertSchemaParquetVariant|TestShreddedVariantSchema'

Are there any user-facing changes?

Yes — writing a Variant schema without a value field now returns arrow.ErrInvalid. Reading such files is unchanged.

Parquet writers must include the Variant value column. Reading files
that omit it stays allowed for compatibility.

Fixes apache#1204

Signed-off-by: Digvijay <digvijay.vaghela@yahoo.com>
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.

[Parquet] Variant Value field is optional

1 participant