parquet-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ziva...@apache.org
Subject [parquet-mr] branch master updated: PARQUET-1317: Fix ParquetMetadataConverter throw NPE (#489)
Date Mon, 04 Jun 2018 15:52:30 GMT
This is an automated email from the ASF dual-hosted git repository.

zivanfi pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/parquet-mr.git


The following commit(s) were added to refs/heads/master by this push:
     new 3fd2492  PARQUET-1317: Fix ParquetMetadataConverter throw NPE (#489)
3fd2492 is described below

commit 3fd2492fcce073f0c36e4d7e23e34881557e6e5e
Author: Yuming Wang <wgyumg@gmail.com>
AuthorDate: Mon Jun 4 23:52:28 2018 +0800

    PARQUET-1317: Fix ParquetMetadataConverter throw NPE (#489)
---
 .../org/apache/parquet/format/converter/ParquetMetadataConverter.java | 4 ++--
 1 file changed, 2 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 40c0b84..2baad15 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
@@ -1170,9 +1170,9 @@ public class ParquetMetadataConverter {
       }
       if (schemaElement.isSetConverted_type()) {
         LogicalTypeAnnotation originalType = getOriginalType(schemaElement.converted_type,
schemaElement);
-        LogicalTypeAnnotation newLogicalType = getOriginalType(schemaElement.logicalType);
+        LogicalTypeAnnotation newLogicalType = schemaElement.isSetLogicalType() ? getOriginalType(schemaElement.logicalType)
: null;
         if (!originalType.equals(newLogicalType)) {
-          childBuilder.as(getOriginalType(schemaElement.converted_type, schemaElement));
+          childBuilder.as(originalType);
         }
       }
       if (schemaElement.isSetField_id()) {

-- 
To stop receiving notification emails like this one, please contact
zivanfi@apache.org.

Mime
View raw message