drill-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sohami <...@git.apache.org>
Subject [GitHub] drill pull request #851: DRILL-5518: Test framework enhancements
Date Tue, 20 Jun 2017 00:44:32 GMT
Github user sohami commented on a diff in the pull request:

    https://github.com/apache/drill/pull/851#discussion_r122855768
  
    --- Diff: exec/java-exec/src/test/java/org/apache/drill/test/rowSet/SchemaBuilder.java
---
    @@ -96,27 +137,57 @@ public SchemaBuilder withSVMode(SelectionVectorMode svMode) {
     
       public SchemaBuilder() { }
     
    +  public SchemaBuilder(BatchSchema baseSchema) {
    +    for (MaterializedField field : baseSchema) {
    +      columns.add(field);
    +    }
    +  }
    +
       public SchemaBuilder add(String pathName, MajorType type) {
    -    MaterializedField col = MaterializedField.create(pathName, type);
    +    return add(MaterializedField.create(pathName, type));
    +  }
    +
    +  public SchemaBuilder add(MaterializedField col) {
         columns.add(col);
         return this;
       }
     
    +  public static MaterializedField columnSchema(String pathName, MinorType type, DataMode
mode) {
    +    return MaterializedField.create(pathName,
    +        MajorType.newBuilder()
    --- End diff --
    
    Why not use `SchemaBuilder.ColumnBuilder` here as well ?


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