Uploaded image for project: 'ORC'
  1. ORC
  2. ORC-1494 Support CUDF Writer
  3. ORC-1482

RecordReaderImpl.evaluatePredicateProto assumes floating point stats are always present

    XMLWordPrintableJSON

Details

    • Sub-task
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 1.7.4
    • 1.7.10, 1.9.2, 1.8.5
    • None
    • None

    Description

      ORC-629 added custom handling of predicate pushdown on doubles, but the code that was added blindly assumes that double statistics were present in the file which may not have been the case.  Here's the snippet of code in question:

           } else if (category == TypeDescription.Category.DOUBLE ||
              category == TypeDescription.Category.FLOAT) {
            DoubleColumnStatistics dstas = (DoubleColumnStatistics) cs;
      

       

      Elsewhere in the code, there's a type check on the result of statistics deserialization before casting, but here the type checks are missing.  It appears this should be checking for DoubleColumnStatistics before assuming the cast will succeed, and if the expected statistics type is not present then the predicate should not be evaluated on that column.

      Attachments

        Activity

          People

            Guiyankuang Yiqun Zhang
            jlowe Jason Darrell Lowe
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: