Yiqun Zhang created ORC-1147:
--------------------------------

             Summary: Use `Objects.equals(dstas.getSum(), Double.NaN)` instead 
of `isFinite` to determine if there is a NaN write
                 Key: ORC-1147
                 URL: https://issues.apache.org/jira/browse/ORC-1147
             Project: ORC
          Issue Type: Improvement
          Components: Java
    Affects Versions: 1.6.13, 1.7.3
            Reporter: Yiqun Zhang


{code:java}
      if (!Double.isFinite(dstas.getSum())) {
        LOG.debug("Not using predication pushdown on {} because stats contain 
NaN values",
                predicate.getColumnName());
        return dstas.hasNull() ? TruthValue.YES_NO_NULL : TruthValue.YES_NO;
      }
}
{code}
The isFinite function does not determine whether there is a NaN write or not, 
and there is a possibility of a sum overflow; we should use 
`Objects.equals(dstas.getSum(), Double.NaN)` instead to determine this




--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to