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

ASF GitHub Bot commented on PARQUET-1476:
-----------------------------------------

zivanfi closed pull request #577: PARQUET-1476: Don't emit a warning message 
for files without new logical type
URL: https://github.com/apache/parquet-mr/pull/577
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

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 b9c8996f0..efb0608e8 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
@@ -1290,8 +1290,10 @@ private void buildChildren(Types.GroupBuilder builder,
         OriginalType newOriginalType = (schemaElement.isSetLogicalType() && 
getLogicalTypeAnnotation(schemaElement.logicalType) != null) ?
            
getLogicalTypeAnnotation(schemaElement.logicalType).toOriginalType() : null;
         if (!originalType.equals(newOriginalType)) {
-          LOG.warn("Converted type and logical type metadata mismatch 
(convertedType: {}, logical type: {}). Using value in converted type.",
-            schemaElement.converted_type, schemaElement.logicalType);
+          if (newOriginalType != null) {
+            LOG.warn("Converted type and logical type metadata mismatch 
(convertedType: {}, logical type: {}). Using value in converted type.",
+              schemaElement.converted_type, schemaElement.logicalType);
+          }
           childBuilder.as(originalType);
         }
       }


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


> Don't emit a warning message for files without new logical type
> ---------------------------------------------------------------
>
>                 Key: PARQUET-1476
>                 URL: https://issues.apache.org/jira/browse/PARQUET-1476
>             Project: Parquet
>          Issue Type: Improvement
>          Components: parquet-mr
>            Reporter: Nandor Kollar
>            Assignee: Nandor Kollar
>            Priority: Minor
>              Labels: pull-request-available
>
> When the only the old logical type representation is present in the file, the 
> converter emits a warning that the two types mismatch. This creates unwanted 
> noise in the logs, metadata converter should only emit a warning if the new 
> logical type is not null.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to