orc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From omalley <...@git.apache.org>
Subject [GitHub] orc pull request #60: ORC-101 fix broken encoding for string and decimal blo...
Date Fri, 16 Sep 2016 03:15:59 GMT
Github user omalley commented on a diff in the pull request:

    https://github.com/apache/orc/pull/60#discussion_r79101181
  
    --- Diff: java/core/src/java/org/apache/orc/OrcFile.java ---
    @@ -231,6 +232,33 @@ public static Reader createReader(Path path,
         void preFooterWrite(WriterContext context) throws IOException;
       }
     
    +  public static enum BloomFilterVersion {
    +    // Include both the BLOOM_FILTER and BLOOM_FILTER_UTF8 streams for string
    +    // and decimal columns.
    +    ORIGINAL("original"),
    +    // Only include the BLOOM_FILTER_UTF8 for string and decimal columns.
    +    // See ORC-101
    +    UTF8("utf8");
    +
    +    private final String id;
    +    private BloomFilterVersion(String id) {
    +      this.id = id;
    +    }
    +
    +    public String toString() {
    +      return id;
    +    }
    +
    +    public static BloomFilterVersion fromString(String s) {
    +      for (BloomFilterVersion version: values()) {
    +        if (version.id.equals(s)) {
    +          return version;
    +        }
    +      }
    +      throw new IllegalArgumentException("Unknown BloomFilterVersion " + s);
    --- End diff --
    
    I don't see how. To get the value, the code will always do this conversion after getting
the string from OrcConf, so the error will be caught coming out.



---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message