drill-dev mailing list archives

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

    https://github.com/apache/drill/pull/805#discussion_r125784283
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java
---
    @@ -1696,9 +1712,24 @@ 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 the same, but not null.
    +     * Returns true if minValue and maxValue are null and the number of null values
    +     * in the column chunk is greater than 0.
    +     *
    +     * @return true if column has single value
    +     */
         @Override
         public boolean hasSingleValue() {
    -      return (minValue !=null && maxValue != null && minValue.equals(maxValue));
    +      if (nulls != null) {
    +        if (minValue != null) {
    +          return minValue.equals(maxValue);
    --- End diff --
    
    Same comment as above. I think in both v1 & v3, we should check nulls = 0 ( there
is no nulls in the column). 


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