drill-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From a..@apache.org
Subject [17/50] [abbrv] drill git commit: Updating with the new DocumentReader APIs.
Date Tue, 13 Sep 2016 01:32:04 GMT
Updating with the new DocumentReader APIs.


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

Branch: refs/heads/master
Commit: 8d72fcc1dde66266ce08dc40e9c10e26b2d7231e
Parents: d1adebd
Author: Aditya <aditya@mapr.com>
Authored: Mon Dec 21 00:50:19 2015 -0800
Committer: Aditya Kishore <adi@apache.org>
Committed: Fri Sep 9 10:08:32 2016 -0700

----------------------------------------------------------------------
 .../exec/store/maprdb/json/MaprDBJsonRecordReader.java    | 10 +++-------
 1 file changed, 3 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/drill/blob/8d72fcc1/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/json/MaprDBJsonRecordReader.java
----------------------------------------------------------------------
diff --git a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/json/MaprDBJsonRecordReader.java
b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/json/MaprDBJsonRecordReader.java
index 8044e40..9080e8e 100644
--- a/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/json/MaprDBJsonRecordReader.java
+++ b/contrib/format-maprdb/src/main/java/org/apache/drill/exec/store/maprdb/json/MaprDBJsonRecordReader.java
@@ -19,7 +19,6 @@ package org.apache.drill.exec.store.maprdb.json;
 
 import static org.ojai.DocumentConstants.ID_FIELD;
 import static org.ojai.DocumentConstants.ID_KEY;
-import io.netty.buffer.DrillBuf;
 
 import java.nio.ByteBuffer;
 import java.util.ArrayList;
@@ -63,11 +62,12 @@ import com.mapr.db.Table;
 import com.mapr.db.Table.TableOption;
 import com.mapr.db.exceptions.DBException;
 import com.mapr.db.impl.IdCodec;
-import com.mapr.db.ojai.DBDocumentReader;
 import com.mapr.db.ojai.DBDocumentReaderBase;
 import com.mapr.db.util.ByteBufs;
 import com.mapr.org.apache.hadoop.hbase.util.Bytes;
 
+import io.netty.buffer.DrillBuf;
+
 public class MaprDBJsonRecordReader extends AbstractRecordReader {
   private static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MaprDBJsonRecordReader.class);
 
@@ -199,10 +199,8 @@ public class MaprDBJsonRecordReader extends AbstractRecordReader {
     outside: while (true) {
       EventType event = reader.next();
       if (event == null) break outside;
+      fieldName = reader.getFieldName();
       switch (event) {
-      case FIELD_NAME:
-        fieldName = reader.getFieldName();
-        break;
       case NULL:
         map.varChar(fieldName).write(null); // treat as VARCHAR for now
       case BINARY:
@@ -268,8 +266,6 @@ public class MaprDBJsonRecordReader extends AbstractRecordReader {
       EventType event = reader.next();
       if (event == null) break outside;
       switch (event) {
-      case FIELD_NAME:
-        throw new IllegalStateException("Shouldn't get a field name inside a list");
       case NULL:
         list.varChar().write(null); // treat as VARCHAR for now
       case BINARY:


Mime
View raw message