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

Paul Rogers commented on DRILL-6403:
------------------------------------

The two schema builders serve much different uses. The one in {{RowSet}} 
handles all types and can handle nested structures. It is designed for fluent 
use in tests.

The one in {{record}} is quite simple and appears to handle only top-level 
fields that can be expressed as a {{MaterializedField}}, leaving it to the 
caller to create the {{MaterializedField}}. Oddly, this older version appears 
to be used in only one place: {{MergingReceiver.innerNext()}}.

Here is a suggestion: if/when operators make use of the new {{ResultSetLoader}} 
classes, then can be migrated to use the {{RowSet}} schema builder. Actually, 
since {{ResultSetLoader}} has schema building built in (fields can be added on 
the fly), the use of a separate schema builder may no longer be necessary 
except in tests and special cases.

> There are two SchemaBuilders that do the same thing. Consolidate them.
> ----------------------------------------------------------------------
>
>                 Key: DRILL-6403
>                 URL: https://issues.apache.org/jira/browse/DRILL-6403
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Timothy Farkas
>            Assignee: Timothy Farkas
>            Priority: Major
>
> There is org.apache.drill.test.rowSet.schema.SchemaBuilder used for testing 
> and org.apache.drill.exec.record.SchemaBuilder used in Drill. They basically 
> do the same thing. We should combine them and have one schema builder.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to