wgtmac commented on code in PR #1369:
URL: https://github.com/apache/parquet-java/pull/1369#discussion_r1625224324


##########
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);

Review Comment:
   This is something that @etseidl and me have discussed in 
https://issues.apache.org/jira/browse/PARQUET-2139. The best fix is to write 
`ColumnMetaData` at the end of each column chunk (currently it does not) and 
store the correct offset here. However, it has been wrong since day 1 and takes 
some effort to make it right. Since we have not seen any issue around this 
these years, I'm inclined to deprecate this field together with the v3 
discussion. Therefore I'm fine with setting an invalid value here (0 or -1). 
WDYT? @gszadovszky @julienledem 



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to