[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-04-13 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17319928#comment-17319928
 ] 

ASF GitHub Bot commented on PARQUET-1851:
-

vdiravka commented on a change in pull request #852:
URL: https://github.com/apache/parquet-mr/pull/852#discussion_r612155776



##
File path: 
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java
##
@@ -860,6 +860,10 @@ public void endColumn() throws IOException {
* @throws IOException if there is an error while writing
*/
   public void endBlock() throws IOException {
+if (currentRecordCount == 0) {
+  throw new IOException("End block with zero record");

Review comment:
   @gszadovszky Done
   https://issues.apache.org/jira/browse/PARQUET-2026




-- 
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.

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


> 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
>Assignee: Junjie Chen
>Priority: Major
> Fix For: 1.12.0
>
>
> 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)


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-04-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17319441#comment-17319441
 ] 

ASF GitHub Bot commented on PARQUET-1851:
-

gszadovszky commented on a change in pull request #852:
URL: https://github.com/apache/parquet-mr/pull/852#discussion_r611595861



##
File path: 
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java
##
@@ -860,6 +860,10 @@ public void endColumn() throws IOException {
* @throws IOException if there is an error while writing
*/
   public void endBlock() throws IOException {
+if (currentRecordCount == 0) {
+  throw new IOException("End block with zero record");

Review comment:
   @vdiravka, you might want to create a separate jira about this topic so 
we can discuss it in a more open way. Please, also describe what the empty 
parquet files are used for.




-- 
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.

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


> 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
>Assignee: Junjie Chen
>Priority: Major
> Fix For: 1.12.0
>
>
> 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)


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-04-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17318607#comment-17318607
 ] 

ASF GitHub Bot commented on PARQUET-1851:
-

vdiravka commented on a change in pull request #852:
URL: https://github.com/apache/parquet-mr/pull/852#discussion_r611094854



##
File path: 
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java
##
@@ -860,6 +860,10 @@ public void endColumn() throws IOException {
* @throws IOException if there is an error while writing
*/
   public void endBlock() throws IOException {
+if (currentRecordCount == 0) {
+  throw new IOException("End block with zero record");

Review comment:
   The empty parquet files was used in Drill earlier and now this change 
breaks the possibility to store empty tables (with header schema only) in 
parquet files. Any suggestions to bypass this and integrate Parquet-1.12.0 to 
Drill?
   @gszadovszky  @cenjunjiedada 

##
File path: 
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java
##
@@ -860,6 +860,10 @@ public void endColumn() throws IOException {
* @throws IOException if there is an error while writing
*/
   public void endBlock() throws IOException {
+if (currentRecordCount == 0) {
+  throw new IOException("End block with zero record");

Review comment:
   The empty parquet files was used in Drill earlier and now this change 
breaks the possibility to store empty tables (with header schema only) in 
parquet files. Any suggestions to bypass this and integrate Parquet-1.12.0 to 
Drill?
   @gszadovszky  @chenjunjiedada 




-- 
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.

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


> 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
>Assignee: Junjie Chen
>Priority: Major
> Fix For: 1.12.0
>
>
> 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)


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-01-13 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17264103#comment-17264103
 ] 

ASF GitHub Bot commented on PARQUET-1851:
-

gszadovszky merged pull request #852:
URL: https://github.com/apache/parquet-mr/pull/852


   



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.

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


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


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-01-13 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17264016#comment-17264016
 ] 

ASF GitHub Bot commented on PARQUET-1851:
-

chenjunjiedada commented on a change in pull request #852:
URL: https://github.com/apache/parquet-mr/pull/852#discussion_r556384676



##
File path: 
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java
##
@@ -860,6 +860,10 @@ public void endColumn() throws IOException {
* @throws IOException if there is an error while writing
*/
   public void endBlock() throws IOException {
+if (currentRecordCount == 0) {
+  throw new IOException("End block with zero record");

Review comment:
   SGTM.





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.

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


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


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-01-13 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17264009#comment-17264009
 ] 

ASF GitHub Bot commented on PARQUET-1851:
-

gszadovszky commented on a change in pull request #852:
URL: https://github.com/apache/parquet-mr/pull/852#discussion_r556380366



##
File path: 
parquet-hadoop/src/main/java/org/apache/parquet/hadoop/ParquetFileWriter.java
##
@@ -860,6 +860,10 @@ public void endColumn() throws IOException {
* @throws IOException if there is an error while writing
*/
   public void endBlock() throws IOException {
+if (currentRecordCount == 0) {
+  throw new IOException("End block with zero record");

Review comment:
   I would suggest using a `ParquetEncodingException` instead.





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.

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


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


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-01-13 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17264007#comment-17264007
 ] 

ASF GitHub Bot commented on PARQUET-1851:
-

chenjunjiedada commented on pull request #852:
URL: https://github.com/apache/parquet-mr/pull/852#issuecomment-759323935


   @gszadovszky Thanks for the comment and it makes sense to me. How about 
throwing an exception when detecting the row group's count is zero? Does that 
sound reasonable to you?
   
   PS. the space changes in the PR is automatically fixed by idea IDE. If you 
don't like it, I can handle it.



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.

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


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


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-01-12 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17263924#comment-17263924
 ] 

ASF GitHub Bot commented on PARQUET-1851:
-

gszadovszky commented on pull request #852:
URL: https://github.com/apache/parquet-mr/pull/852#issuecomment-759250313


   As I've commented in the jira I think this fix is not complete. I am no 
against adding a null check here but it will not solve the potential problem of 
writing an empty row group.



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.

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


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


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-01-11 Thread Gabor Szadovszky (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=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)


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2021-01-10 Thread ASF GitHub Bot (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17262389#comment-17262389
 ] 

ASF GitHub Bot commented on PARQUET-1851:
-

chenjunjiedada opened a new pull request #852:
URL: https://github.com/apache/parquet-mr/pull/852


   This fixes the NPE as below:
   
   ```
   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)
   ```



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.

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


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


[jira] [Commented] (PARQUET-1851) ParquetMetadataConveter throws NPE in an Iceberg unit test

2020-12-02 Thread Junjie Chen (Jira)


[ 
https://issues.apache.org/jira/browse/PARQUET-1851?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=17242217#comment-17242217
 ] 

Junjie Chen commented on PARQUET-1851:
--

Even the client doesn't write data, we should not throw NPE.

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