Github user vdiravka commented on a diff in the pull request:

    https://github.com/apache/drill/pull/877#discussion_r128497802
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java 
---
    @@ -658,11 +657,21 @@ private boolean tableModified(List<String> 
directories, Path metaFilePath,
         return false;
       }
     
    +  /**
    +   * Basic class for parquet metadata. Inheritors of this class are json 
serializable structures of
    +   * different versions metadata cache files.
    +   *
    +   * Bump up metadata major version if metadata structure is changed.
    +   * Bump up metadata minor version if only metadata content is changed, 
but metadata structure is the same.
    +   *
    +   * Note: keep metadata versions synchronized with {@link 
MetadataVersion.Versions}
    +   */
       @JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = 
JsonTypeInfo.As.PROPERTY, property = "metadata_version")
       @JsonSubTypes({
    -      @JsonSubTypes.Type(value = ParquetTableMetadata_v1.class, name="v1"),
    -      @JsonSubTypes.Type(value = ParquetTableMetadata_v2.class, name="v2"),
    -      @JsonSubTypes.Type(value = ParquetTableMetadata_v3.class, name="v3")
    +      @JsonSubTypes.Type(value = ParquetTableMetadata_v1.class, name = 
MetadataVersion.Versions.Constants.V1),
    --- End diff --
    
    There is no case to use `getName()` since annotations attribute value must 
be constant. 
    Looks like using just constants without `enum` is more clear. Thanks


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to