[ 
https://issues.apache.org/jira/browse/DRILL-5518?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16054999#comment-16054999
 ] 

ASF GitHub Bot commented on DRILL-5518:
---------------------------------------

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 ?


> Roll-up of a number of test framework enhancements
> --------------------------------------------------
>
>                 Key: DRILL-5518
>                 URL: https://issues.apache.org/jira/browse/DRILL-5518
>             Project: Apache Drill
>          Issue Type: Improvement
>    Affects Versions: 1.11.0
>            Reporter: Paul Rogers
>            Assignee: Paul Rogers
>            Priority: Minor
>             Fix For: 1.11.0
>
>
> Recent development work identified a number of minor enhancements to the 
> "sub-operator" unit tests:
> * Create a {{SubOperatorTest}} base class to do routine setup and shutdown.
> * Additional methods to simplify creating complex schemas with field widths.
> * Define a test workspace with plugin-specific options (as for the CSV 
> storage plugin)
> * When verifying row sets, add methods to verify and release just the 
> "actual" batch in addition to the existing method for verify and free both 
> the actual and expected batches.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to