drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From parthchandra <...@git.apache.org>
Subject [GitHub] drill pull request #637: Drill 1950 : Parquet row group filter pushdown.
Date Tue, 01 Nov 2016 22:56:23 GMT
Github user parthchandra commented on a diff in the pull request:

    https://github.com/apache/drill/pull/637#discussion_r86018491
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/store/parquet/Metadata.java
---
    @@ -329,79 +330,118 @@ private OriginalType getOriginalType(Type type, String[] path,
int depth) {
         return getOriginalType(t, path, depth + 1);
       }
     
    +  private ColTypeInfo getColTypeInfo(MessageType schema, Type type, String[] path, int
depth) {
    +    if (type.isPrimitive()) {
    +      PrimitiveType primitiveType = (PrimitiveType) type;
    +      int precision = 0;
    +      int scale = 0;
    +      if (primitiveType.getDecimalMetadata() != null) {
    +        precision = primitiveType.getDecimalMetadata().getPrecision();
    +        scale = primitiveType.getDecimalMetadata().getScale();
    +      }
    +
    +      int repetitionLevel = schema.getMaxRepetitionLevel(path);
    +
    +      return new ColTypeInfo(type.getOriginalType(), precision, scale, repetitionLevel);
    +    }
    +    Type t = ((GroupType) type).getType(path[depth]);
    +    return getColTypeInfo(schema, t, path, depth + 1);
    +  }
    +
    +  private class ColTypeInfo {
    +    public OriginalType originalType;
    +    public int precision;
    +    public int scale;
    +    public int repetitionLevel;
    --- End diff --
    
    Should we include definition level as well (for future use?)


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