From b714b79ab373691296019199e53404b2664f7f19 Mon Sep 17 00:00:00 2001 From: Ed Seidl Date: Sat, 20 Jul 2024 07:28:10 -0700 Subject: [PATCH] PARQUET-2139: set metadata offset to 0 since it is not written at all (#1369) --- .../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 20dbb0119b..194670f2df 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;