From f7fb556749df389a8f00d5282dd0efc63013643f Mon Sep 17 00:00:00 2001 From: Ed Seidl Date: Fri, 31 May 2024 16:20:33 -0700 Subject: [PATCH] PARQUET-2139: set metadata offset to 0 since it is not written at all --- .../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 e752b4ceea..bed26421f9 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 @@ private void addRowGroup( 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;