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

    https://github.com/apache/orc/pull/132#discussion_r122580547
  
    --- Diff: java/core/src/java/org/apache/orc/impl/OrcTail.java ---
    @@ -70,8 +70,11 @@ public long getFileModificationTime() {
     
       public OrcFile.WriterVersion getWriterVersion() {
         OrcProto.PostScript ps = fileTail.getPostscript();
    +    OrcProto.Footer footer = fileTail.getFooter();
    +    OrcFile.WriterImplementation writer =
    +        OrcFile.WriterImplementation.from(footer.getWriter());
         return (ps.hasWriterVersion()
    --- End diff --
    
    writerVersion is required for anything except the pre-HIVE-8732 Java ORC 
files. Otherwise, as you say, the readers will interpret it as one of the 
pre-HIVE-8732 files. I can simplify this condition, because if it isn't present 
it will get the default value of 0, which is correct.
    
    The current code in this pull request, would make broken files that have 
writer = presto, writerVersion = 0 as future. I guess I could check for the 
case of presto or orc_cpp and version < 6 and throw an exception.


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