drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jacq...@apache.org
Subject [10/16] incubator-drill git commit: DRILL-1674: Set schema in WriterRecordBatch
Date Wed, 12 Nov 2014 04:11:27 GMT
DRILL-1674: Set schema in WriterRecordBatch


Project: http://git-wip-us.apache.org/repos/asf/incubator-drill/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-drill/commit/0085ffb9
Tree: http://git-wip-us.apache.org/repos/asf/incubator-drill/tree/0085ffb9
Diff: http://git-wip-us.apache.org/repos/asf/incubator-drill/diff/0085ffb9

Branch: refs/heads/master
Commit: 0085ffb95d0d4cc7e603c93fc7773de73aa4016f
Parents: 836d38a
Author: Steven Phillips <sphillips@maprtech.com>
Authored: Tue Oct 28 18:47:16 2014 -0700
Committer: Jacques Nadeau <jacques@apache.org>
Committed: Tue Nov 11 16:48:45 2014 -0800

----------------------------------------------------------------------
 .../apache/drill/exec/physical/impl/WriterRecordBatch.java    | 7 +++++++
 1 file changed, 7 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/0085ffb9/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/WriterRecordBatch.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/WriterRecordBatch.java
b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/WriterRecordBatch.java
index 07302d1..cb0de02 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/WriterRecordBatch.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/physical/impl/WriterRecordBatch.java
@@ -51,6 +51,7 @@ public class WriterRecordBatch extends AbstractRecordBatch<Writer>
{
   private final RecordBatch incoming;
   private boolean processed = false;
   private String fragmentUniqueId;
+  private BatchSchema schema;
 
   public WriterRecordBatch(Writer writer, RecordBatch incoming, FragmentContext context,
RecordWriter recordWriter) throws OutOfMemoryException {
     super(writer, context);
@@ -72,6 +73,11 @@ public class WriterRecordBatch extends AbstractRecordBatch<Writer>
{
   }
 
   @Override
+  public BatchSchema getSchema() {
+    return schema;
+  }
+
+  @Override
   public IterOutcome buildSchema() throws SchemaChangeException {
     incoming.buildSchema();
     try {
@@ -174,6 +180,7 @@ public class WriterRecordBatch extends AbstractRecordBatch<Writer>
{
 
     eventBasedRecordWriter = new EventBasedRecordWriter(incoming, recordWriter);
     container.buildSchema(SelectionVectorMode.NONE);
+    schema = container.getSchema();
   }
 
   @Override


Mime
View raw message