[
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17262519#comment-17262519
]
Gabor Szadovszky commented on PARQUET-1851:
-------------------------------------------
I would not agree. An empty row group shall never be written. NPE might not be
the best thing the library could do but {{ParquetMetadataConverer}} is a low
level implementation and not part of the public API so it is not required to
handle these edge cases separately. I think, this issue should be handled at a
higher level. Based on the stack trace this is in {{ParquetFileWriter}}. It
should not allow writing an empty row group.
> ParquetMetadataConveter throws NPE in an Iceberg unit test
> ----------------------------------------------------------
>
> Key: PARQUET-1851
> URL: https://issues.apache.org/jira/browse/PARQUET-1851
> Project: Parquet
> Issue Type: Bug
> Affects Versions: 1.11.0
> Reporter: Junjie Chen
> Priority: Major
>
> When writing data to parquet in an Iceberg unit test, it throws NPE as below
> {code:java}
> java.lang.NullPointerExceptionjava.lang.NullPointerException at
> org.apache.parquet.format.converter.ParquetMetadataConverter.addRowGroup(ParquetMetadataConverter.java:476)
> at
> org.apache.parquet.format.converter.ParquetMetadataConverter.toParquetMetadata(ParquetMetadataConverter.java:177)
> at
> org.apache.parquet.hadoop.ParquetFileWriter.serializeFooter(ParquetFileWriter.java:914)
> at
> org.apache.parquet.hadoop.ParquetFileWriter.end(ParquetFileWriter.java:864)
> at org.apache.iceberg.parquet.ParquetWriter.close(ParquetWriter.java:206) at
> org.apache.iceberg.data.TestLocalScan.writeFile(TestLocalScan.java:429)
> {code}
>
--
This message was sent by Atlassian Jira
(v8.3.4#803005)