You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@orc.apache.org by "Dongjoon Hyun (Jira)" <ji...@apache.org> on 2023/08/25 03:12:00 UTC

[jira] [Assigned] (ORC-1482) RecordReaderImpl.evaluatePredicateProto assumes floating point stats are always present

     [ https://issues.apache.org/jira/browse/ORC-1482?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Dongjoon Hyun reassigned ORC-1482:
----------------------------------

    Assignee: Yiqun Zhang

> RecordReaderImpl.evaluatePredicateProto assumes floating point stats are always present
> ---------------------------------------------------------------------------------------
>
>                 Key: ORC-1482
>                 URL: https://issues.apache.org/jira/browse/ORC-1482
>             Project: ORC
>          Issue Type: Bug
>    Affects Versions: 1.7.4
>            Reporter: Jason Darrell Lowe
>            Assignee: Yiqun Zhang
>            Priority: Major
>             Fix For: 2.0.0, 1.9.2
>
>         Attachments: part-00000-45af54ac-9306-447f-8d4f-cc2f1b1cf61f-c000.snappy.orc
>
>
> 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:
> {code:java}
>      } else if (category == TypeDescription.Category.DOUBLE ||
>         category == TypeDescription.Category.FLOAT) {
>       DoubleColumnStatistics dstas = (DoubleColumnStatistics) cs;
> {code}
>  
> 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.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)