This is an automated email from the ASF dual-hosted git repository.
gangwu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-java.git
The following commit(s) were added to refs/heads/master by this push:
new b714b79ab PARQUET-2139: set metadata offset to 0 since it is not
written at all (#1369)
b714b79ab is described below
commit b714b79ab373691296019199e53404b2664f7f19
Author: Ed Seidl <[email protected]>
AuthorDate: Sat Jul 20 07:28:10 2024 -0700
PARQUET-2139: set metadata offset to 0 since it is not written at all
(#1369)
---
.../apache/parquet/format/converter/ParquetMetadataConverter.java | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git
a/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java
b/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java
index 20dbb0119..194670f2d 100644
---
a/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java
+++
b/parquet-hadoop/src/main/java/org/apache/parquet/format/converter/ParquetMetadataConverter.java
@@ -534,8 +534,9 @@ public class ParquetMetadataConverter {
int columnOrdinal = -1;
ByteArrayOutputStream tempOutStream = null;
for (ColumnChunkMetaData columnMetaData : columns) {
- ColumnChunk columnChunk =
- new ColumnChunk(columnMetaData.getFirstDataPageOffset()); // verify
this is the right offset
+ // There is no ColumnMetaData written after the chunk data, so set the
ColumnChunk
+ // file_offset to 0
+ ColumnChunk columnChunk = new ColumnChunk(0);
columnChunk.file_path = block.getPath(); // they are in the same file
for now
InternalColumnEncryptionSetup columnSetup = null;
boolean writeCryptoMetadata = false;