You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[C++][Parquet] Should we support PARQUET_2_8 version? #35776
Nowadays, we support BYTE_STREAM_SPLIT in parquet. However, during writing, our highest format is PARQUET_2_6. So, do we need to support Parquet 2.8 or higher version
It seems that the WriterProperties does not check if any feature does not belong to a certain version. I have only observed several places it was checked:
My question is: should we check if any enabled feature is beyond the support of the specified format version? If yes, should we support deduce the version from enabled feature set? It is not easy for a user to know which format version to set but it is much easier to know what features are needed.
Hmmm I go through the Rust implementions, and found that it just uses "1.0" or "2.0". All implementions use different adhoc way to setting this...
And maybe user uses BYTE_STREAM_SPLIT with 2.6 in arrow, I guess it's a disaster when we really wants to check this...
I see the problem. IMO, we can add a new option in the WriterProperties to enable format validation and call validate_format you proposed while creating the parquet writer? @mapleFU
This issue has been marked as stale because it has had no activity in the past 2 years. Please remove the stale label or comment below, or this issue will be closed in 14 days.
Activity
mapleFU commentedon May 26, 2023
cc @pitrou @wgtmac
wgtmac commentedon May 26, 2023
To provide some facts:
It seems that the
WriterPropertiesdoes not check if any feature does not belong to a certain version. I have only observed several places it was checked:arrow/cpp/src/parquet/column_writer.cc
Lines 2062 to 2072 in 2d32efe
arrow/cpp/src/parquet/metadata.cc
Lines 1467 to 1470 in 2d32efe
arrow/cpp/src/parquet/arrow/schema.cc
Lines 319 to 323 in 2d32efe
parquet-mr does not recognize any 2.x format version and always hardcodes version 1 to the footer metadata:
https://github.com/apache/parquet-mr/blob/d5a4ce05643e6709312e3060838cb9236e882014/parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java#L1339-L1343
wgtmac commentedon May 26, 2023
My question is: should we check if any enabled feature is beyond the support of the specified format version? If yes, should we support deduce the version from enabled feature set? It is not easy for a user to know which format version to set but it is much easier to know what features are needed.
mapleFU commentedon May 26, 2023
Hmmm I go through the Rust implementions, and found that it just uses "1.0" or "2.0". All implementions use different adhoc way to setting this...
And maybe user uses BYTE_STREAM_SPLIT with 2.6 in arrow, I guess it's a disaster when we really wants to check this...
wgtmac commentedon May 26, 2023
How about adding a
Status WriterProperties::validate_format(). This won't break current users but provide a way to check format integrity.wgtmac commentedon May 26, 2023
cc @emkornfield
jorisvandenbossche commentedon May 26, 2023
Yeah, this "version" field in the footer metadata is not very well specified. See also related discussion at apache/parquet-format#164 (comment)
pitrou commentedon May 26, 2023
Something like that could be useful, yes.
mapleFU commentedon Jun 6, 2023
I guess it's a big hard, because checking is separted to different places...
FieldToNodeinsrc/parquet/arrow/schema.ccarrow/cpp/src/parquet/column_writer.cc
Lines 2062 to 2072 in 2d32efe
I guess we need a
validate_formatlike:wgtmac commentedon Jun 6, 2023
I see the problem. IMO, we can add a new option in the
WriterPropertiesto enable format validation and callvalidate_formatyou proposed while creating the parquet writer? @mapleFUmapleFU commentedon Jun 9, 2023
I'll try to add
PARQUET_2_9and addBYTE_STREAM_SPLITchecking, and try not break the previous implementions.thisisnic commentedon Feb 18, 2026
This issue has been marked as stale because it has had no activity in the past 2 years. Please remove the stale label or comment below, or this issue will be closed in 14 days.