drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vvysotskyi <...@git.apache.org>
Subject [GitHub] drill pull request #805: Drill-4139: Exception while trying to prune partiti...
Date Wed, 05 Apr 2017 13:05:28 GMT
Github user vvysotskyi commented on a diff in the pull request:

    https://github.com/apache/drill/pull/805#discussion_r109908576
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java
---
    @@ -1668,9 +1666,16 @@ public ColumnMetadata_v3(String[] name, PrimitiveTypeName primitiveType,
Object
           return nulls;
         }
     
    +    /**
    +     * Checks that the column chunk has single value.
    +     * Returns true if minValue and maxValue are null and
    +     * column statistics was available.
    +     *
    +     * @return true if column has single value
    +     */
         @Override
         public boolean hasSingleValue() {
    -      return (minValue !=null && maxValue != null && minValue.equals(maxValue));
    +      return minValue != null ? minValue.equals(maxValue) : (maxValue == null &&
isMetadataSet());
    --- End diff --
    
    1. It is clear that we should just compare minValue and maxValue.
    2. In this case we should check that nulls == 0. Fixed that. Now for this case function
returns false.
    3. We should additionally check that nulls > 0. Fixed that.


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

Mime
View raw message