drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From meh...@apache.org
Subject [4/5] drill git commit: DRILL-3285: Part 4--Reorder fields, updateColumns.
Date Tue, 23 Jun 2015 19:00:08 GMT
DRILL-3285: Part 4--Reorder fields, updateColumns.


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

Branch: refs/heads/master
Commit: 22232d4d31e66e31cdb3a017cffab444223dd47e
Parents: e050f1e
Author: dbarclay <dbarclay@maprtech.com>
Authored: Fri Jun 12 18:26:28 2015 -0700
Committer: Mehant Baid <mehantr@gmail.com>
Committed: Mon Jun 22 13:05:04 2015 -0700

----------------------------------------------------------------------
 .../org/apache/drill/jdbc/impl/DrillCursor.java | 40 ++++++++++----------
 1 file changed, 20 insertions(+), 20 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/22232d4d/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillCursor.java
----------------------------------------------------------------------
diff --git a/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillCursor.java b/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillCursor.java
index 81b2de5..cdf030b 100644
--- a/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillCursor.java
+++ b/exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillCursor.java
@@ -48,12 +48,20 @@ class DrillCursor implements Cursor {
 
   private final DrillResultSetImpl.ResultsListener resultsListener;
 
+  private final DrillAccessorList accessors = new DrillAccessorList();
+
+  /** Schema of current batch (null before first load). */
+  private BatchSchema schema;
+
+  /** ... corresponds to current schema. */
+  private DrillColumnMetaDataList columnMetaDataList;
+
   /** Whether we're past the special first call to this.next() from
    * DrillResultSetImpl.execute(). */
   private boolean initialSchemaLoaded = false;
 
-  /** Whether cursor is after the end of the sequence of records/rows. */
-  private boolean afterLastRow = false;
+  /** Whether after first batch.  (Re skipping spurious empty batches.) */
+  private boolean afterFirstBatch = false;
 
   /**
    * Whether the next call to this.next() should just return {@code true} rather
@@ -70,21 +78,13 @@ class DrillCursor implements Cursor {
    */
   private boolean returnTrueForNextCallToNext = false;
 
-  /** Whether after first batch.  (Re skipping spurious empty batches.) */
-  private boolean afterFirstBatch = false;
-
-  /** ... corresponds to current schema. */
-  private DrillColumnMetaDataList columnMetaDataList;
-
-  /** Schema of current batch (null before first load). */
-  private BatchSchema schema;
+  /** Whether cursor is after the end of the sequence of records/rows. */
+  private boolean afterLastRow = false;
 
   /** Zero-based offset of current record in record batch.
    * (Not <i>row</i> number.) */
   private int currentRecordNumber = -1;
 
-  private final DrillAccessorList accessors = new DrillAccessorList();
-
 
   /**
    *
@@ -111,6 +111,14 @@ class DrillCursor implements Cursor {
     return accessors;
   }
 
+  private void updateColumns() {
+    accessors.generateAccessors(this, currentBatchHolder);
+    columnMetaDataList.updateColumnMetaData(UNKNOWN, UNKNOWN, UNKNOWN, schema);
+    if (getResultSet().changeListener != null) {
+      getResultSet().changeListener.schemaChanged(schema);
+    }
+  }
+
   /**
    * Advances this cursor to the next row, if any, or to after the sequence of
    * rows if no next row.  However, the first call does not advance to the first
@@ -238,14 +246,6 @@ class DrillCursor implements Cursor {
     }
   }
 
-  private void updateColumns() {
-    accessors.generateAccessors(this, currentBatchHolder);
-    columnMetaDataList.updateColumnMetaData(UNKNOWN, UNKNOWN, UNKNOWN, schema);
-    if (getResultSet().changeListener != null) {
-      getResultSet().changeListener.schemaChanged(schema);
-    }
-  }
-
   @Override
   public void close() {
     // currentBatchHolder is owned by resultSet and cleaned up by


Mime
View raw message