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

    https://github.com/apache/orc/pull/132#discussion_r122506293
  
    --- Diff: java/core/src/java/org/apache/orc/OrcFile.java ---
    @@ -108,66 +108,118 @@ public int getMinor() {
         }
       }
     
    +  public enum WriterImplementation {
    +    ORC_JAVA(0), // ORC Java writer
    +    ORC_CPP(1),  // ORC C++ writer
    +    PRESTO(2),   // Presto writer
    +    UNKNOWN(Integer.MAX_VALUE);
    +
    +    private final int id;
    +
    +    WriterImplementation(int id) {
    +      this.id = id;
    +    }
    +
    +    public int getId() {
    +      return id;
    +    }
    +
    +    public static WriterImplementation from(int id) {
    +      for(WriterImplementation v: values()) {
    +        if (v.id == id) {
    +          return v;
    +        }
    +      }
    +      return UNKNOWN;
    +    }
    +  }
    +
       /**
        * Records the version of the writer in terms of which bugs have been 
fixed.
        * For bugs in the writer, but the old readers already read the new data
        * correctly, bump this version instead of the Version.
    +   *
    +   * The ids are assigned sequentially from 0 per a WriterImplementation.
        */
       public enum WriterVersion {
    -    ORIGINAL(0),
    -    HIVE_8732(1), // corrupted stripe/file maximum column statistics
    -    HIVE_4243(2), // use real column names from Hive tables
    -    HIVE_12055(3), // vectorized writer
    -    HIVE_13083(4), // decimal writer updating present stream wrongly
    -    ORC_101(5),    // bloom filters use utf8
    -    ORC_135(6), // timestamp stats use utc
    +    // Java ORC Writer
    +    ORIGINAL(WriterImplementation.ORC_JAVA, 0),
    +    HIVE_8732(WriterImplementation.ORC_JAVA, 1), // corrupted stripe/file 
maximum column statistics
    +    HIVE_4243(WriterImplementation.ORC_JAVA, 2), // use real column names 
from Hive tables
    +    HIVE_12055(WriterImplementation.ORC_JAVA, 3), // vectorized writer
    +    HIVE_13083(WriterImplementation.ORC_JAVA, 4), // decimal writer 
updating present stream wrongly
    +    ORC_101(WriterImplementation.ORC_JAVA, 5),    // bloom filters use utf8
    +    ORC_135(WriterImplementation.ORC_JAVA, 6), // timestamp stats use utc
    --- End diff --
    
    Can you add these comments to the protobuf file also?


---
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 [email protected] or file a JIRA ticket
with INFRA.
---

Reply via email to