Github user arina-ielchiieva commented on a diff in the pull request:

    https://github.com/apache/drill/pull/877#discussion_r127322298
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java 
---
    @@ -1851,9 +1860,81 @@ private static String relativize(String baseDir, 
String childPath) {
               .relativize(fullPathWithoutSchemeAndAuthority.toUri()));
           if (relativeFilePath.isAbsolute()) {
             throw new IllegalStateException(String.format("Path %s is not a 
subpath of %s.",
    -            basePathWithoutSchemeAndAuthority.toUri().toString(), 
fullPathWithoutSchemeAndAuthority.toUri().toString()));
    +            basePathWithoutSchemeAndAuthority.toUri().getPath(), 
fullPathWithoutSchemeAndAuthority.toUri().getPath()));
    +      }
    +      return relativeFilePath.toUri().getPath();
    +    }
    +  }
    +
    +  /**
    +   * Used to identify metadata version by the deserialization 
"metadata_version" first property
    +   * from the metadata cache file
    +   */
    +  public static class MetadataVersion {
    +    @JsonProperty("metadata_version")
    +    public String textVersion;
    +
    +    /**
    +     * Supported metadata versions.
    +     * Note: keep them synchronized with {@link ParquetTableMetadataBase} 
versions
    +     */
    +    enum Versions {
    --- End diff --
    
    It would be good to follow Enum naming convention [1]:
    1. Enum naming is usually singular.
    2. Enum types are usually in upper case.
    3. There is no need to use Constants class. Enum types usually represents a 
fixed set of constants. You can use `getName()` to get String value.
    
    [1] http://docs.oracle.com/javase/tutorial/java/javaOO/enum.html


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