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 Mon, 03 Apr 2017 22:07:20 GMT
Github user jinfengni commented on a diff in the pull request:

    https://github.com/apache/drill/pull/805#discussion_r109536003
  
    --- 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 --
    
    We probably need better definition of "column has single value", before go ahead and modify
this function.  Cases we need consider:
    
    1) minValue / maxValue != null and there is no "null" in the column.
    2) minValue / maxValue != null and there is "null" in the column. 
    3) minValue/maxValue == null, and there is "null" 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