[GitHub] [parquet-mr] shangxinli commented on a diff in pull request #1018: PARQUET-2219: ParquetFileReader skips empty row group

2023-01-10 Thread GitBox


shangxinli commented on code in PR #1018:
URL: https://github.com/apache/parquet-mr/pull/1018#discussion_r1066042941


##
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java:
##
@@ -1038,7 +1044,10 @@ public PageReadStore readNextFilteredRowGroup() throws 
IOException {
 }
 BlockMetaData block = blocks.get(currentBlock);
 if (block.getRowCount() == 0L) {
-  throw new RuntimeException("Illegal row group of 0 rows");
+  LOG.warn("Read empty block at index {}", currentBlock);

Review Comment:
   Same comments as above



-- 
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: dev-unsubscr...@parquet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org



[GitHub] [parquet-mr] shangxinli commented on a diff in pull request #1018: PARQUET-2219: ParquetFileReader skips empty row group

2023-01-10 Thread GitBox


shangxinli commented on code in PR #1018:
URL: https://github.com/apache/parquet-mr/pull/1018#discussion_r1066038932


##
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileReader.java:
##
@@ -927,7 +925,15 @@ public PageReadStore readRowGroup(int blockIndex) throws 
IOException {
* @return the PageReadStore which can provide PageReaders for each column.
*/
   public PageReadStore readNextRowGroup() throws IOException {
-ColumnChunkPageReadStore rowGroup = internalReadRowGroup(currentBlock);
+ColumnChunkPageReadStore rowGroup = null;
+try {
+  rowGroup = internalReadRowGroup(currentBlock);
+} catch (ParquetEmptyBlockException e) {
+  LOG.warn("Read empty block at index {}", currentBlock);

Review Comment:
   Any way to add file path?



-- 
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: dev-unsubscr...@parquet.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org