drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sudheeshkatkam <...@git.apache.org>
Subject [GitHub] drill pull request: Drill 4372 for review
Date Sat, 20 Feb 2016 00:21:11 GMT
Github user sudheeshkatkam commented on a diff in the pull request:

    https://github.com/apache/drill/pull/377#discussion_r53537111
  
    --- Diff: exec/java-exec/src/main/java/org/apache/drill/exec/planner/logical/DrillConstExecutor.java
---
    @@ -98,11 +98,37 @@
           //      - CHAR, SYMBOL, MULTISET, DISTINCT, STRUCTURED, ROW, OTHER, CURSOR, COLUMN_LIST
           .build();
     
    +  private static ImmutableMap<SqlTypeName, TypeProtos.MinorType> CALCITE_TO_DRILL_MAPPING
=
    +      ImmutableMap.<SqlTypeName, TypeProtos.MinorType> builder()
    +          .put(SqlTypeName.INTEGER, TypeProtos.MinorType.INT)
    +          .put(SqlTypeName.BIGINT, TypeProtos.MinorType.BIGINT)
    +          .put(SqlTypeName.FLOAT, TypeProtos.MinorType.FLOAT4)
    +          .put(SqlTypeName.DOUBLE, TypeProtos.MinorType.FLOAT8)
    +          .put(SqlTypeName.VARCHAR, TypeProtos.MinorType.VARCHAR)
    +          .put(SqlTypeName.BOOLEAN, TypeProtos.MinorType.BIT)
    +          .put(SqlTypeName.DATE, TypeProtos.MinorType.DATE)
    +          .put(SqlTypeName.TIME, TypeProtos.MinorType.TIME)
    +          .put(SqlTypeName.TIMESTAMP, TypeProtos.MinorType.TIMESTAMP)
    +          .put(SqlTypeName.VARBINARY, TypeProtos.MinorType.VARBINARY)
    +          .put(SqlTypeName.INTERVAL_YEAR_MONTH, TypeProtos.MinorType.INTERVALYEAR)
    +          .put(SqlTypeName.INTERVAL_DAY_TIME, TypeProtos.MinorType.INTERVALDAY)
    +          //.put(SqlTypeName.MAP, TypeProtos.MinorType.MAP)
    +          //.put(SqlTypeName.ARRAY, TypeProtos.MinorType.LIST)
    +          .put(SqlTypeName.CHAR, TypeProtos.MinorType.VARCHAR)
    +          // (2) Avoid late binding
    +          .put(SqlTypeName.ANY, TypeProtos.MinorType.LATE)
    +          // (3) These 2 types are defined in the Drill type system but have been turned
off for now
    +          // .put(SqlTypeName.TINYINT, TypeProtos.MinorType.TINYINT)
    +          // .put(SqlTypeName.SMALLINT, TypeProtos.MinorType.SMALLINT)
    +          // (4) Calcite types currently not supported by Drill, nor defined in the Drill
type list:
    +          //      - SYMBOL, MULTISET, DISTINCT, STRUCTURED, ROW, OTHER, CURSOR, COLUMN_LIST
    +          .build();
    +
       // This is a list of all types that cannot be folded at planning time for various reasons,
most of the types are
       // currently not supported at all. The reasons for the others can be found in the evaluation
code in the reduce method
       public static final List<Object> NON_REDUCIBLE_TYPES = ImmutableList.builder().add(
           // cannot represent this as a literal according to calcite
    -      TypeProtos.MinorType.INTERVAL,
    +      // TypeProtos.MinorType.INTERVAL,
    --- End diff --
    
    Why this?


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