Skip to content

Correct VARIANT Logical Type annotation in Parquet examples#555

Open
alamb wants to merge 1 commit intomasterfrom
alamb-patch-1
Open

Correct VARIANT Logical Type annotation in Parquet examples#555
alamb wants to merge 1 commit intomasterfrom
alamb-patch-1

Conversation

@alamb
Copy link
Contributor

@alamb alamb commented Feb 25, 2026

Rationale for this change

That the example of the VARAINT type annotation in this repository did not have an integer field

I double checked and the VARAINT logical type does indeed have a integer field ("specification_version"):

struct VariantType {
// The version of the variant specification that the variant was
// written with.
1: optional i8 specification_version
}

This is also consistent with the parquet-java tests:

https://github.com/apache/parquet-java/blob/7148464a6b1a795f0058a811de2215d111b976ce/parquet-avro/src/test/java/org/apache/parquet/avro/TestReadVariant.java#L295

https://github.com/apache/parquet-java/blob/7148464a6b1a795f0058a811de2215d111b976ce/parquet-column/src/test/java/org/apache/parquet/parser/TestParquetParser.java#L455

What changes are included in this PR?

Updated the representation of unshredded and shredded Variants in the example to include the variant version

Do these changes have PoC implementations?

No this does not change the spec at all, just the examples

Updated the representation of unshredded and shredded Variants in Parquet to include the variant version
Copy link
Member

@wgtmac wgtmac left a comment

Choose a reason for hiding this comment

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

Thanks for a quick fix!

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