You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@drill.apache.org by ja...@apache.org on 2014/05/14 02:26:50 UTC

[2/4] git commit: DRILL-604: Add schema type to INFORMATION_SCHEMA.SCHEMATA.

DRILL-604: Add schema type to INFORMATION_SCHEMA.SCHEMATA.

Modification for SubSchemaWrapper.


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

Branch: refs/heads/master
Commit: a4a02ef4733b31e03f7402e611e73252945953eb
Parents: e7a486d
Author: Jinfeng Ni <jn...@maprtech.com>
Authored: Mon May 12 16:03:47 2014 -0700
Committer: Aditya Kishore <ad...@maprtech.com>
Committed: Tue May 13 15:27:38 2014 -0700

----------------------------------------------------------------------
 .../exec/store/hbase/HBaseSchemaFactory.java    |  7 +++++++
 .../store/hbase/HBaseStoragePluginConfig.java   |  4 +++-
 .../apache/drill/exec/store/AbstractSchema.java |  2 ++
 .../drill/exec/store/SubSchemaWrapper.java      |  5 +++++
 .../drill/exec/store/dfs/FileSystemConfig.java  |  4 ++--
 .../exec/store/dfs/FileSystemSchemaFactory.java |  9 ++++++++-
 .../exec/store/dfs/WorkspaceSchemaFactory.java  |  9 ++++++++-
 .../store/hive/HiveStoragePluginConfig.java     |  5 ++++-
 .../store/hive/schema/HiveDatabaseSchema.java   | 10 +++++++++-
 .../store/hive/schema/HiveSchemaFactory.java    |  8 ++++++++
 .../exec/store/ischema/InfoSchemaConfig.java    |  8 +++++---
 .../store/ischema/InfoSchemaStoragePlugin.java  | 10 ++++++++--
 .../exec/store/ischema/InfoSchemaTable.java     | 21 ++++++++++----------
 .../drill/exec/store/ischema/OptiqProvider.java |  3 ++-
 .../store/mock/MockStorageEngineConfig.java     |  6 ++++--
 .../drill/exec/store/sys/SystemTablePlugin.java |  5 +++++
 .../exec/store/sys/SystemTablePluginConfig.java |  2 +-
 17 files changed, 92 insertions(+), 26 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java b/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
index e175c1b..ce3b9fd 100644
--- a/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
+++ b/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseSchemaFactory.java
@@ -29,6 +29,7 @@ import org.apache.drill.exec.planner.logical.DynamicDrillTable;
 import org.apache.drill.exec.rpc.user.UserSession;
 import org.apache.drill.exec.store.AbstractSchema;
 import org.apache.drill.exec.store.SchemaFactory;
+import org.apache.drill.exec.store.dfs.FileSystemConfig;
 import org.apache.hadoop.hbase.HTableDescriptor;
 import org.apache.hadoop.hbase.client.HBaseAdmin;
 
@@ -92,5 +93,11 @@ public class HBaseSchemaFactory implements SchemaFactory {
         return Collections.emptySet();
       }
     }
+
+    @Override
+    public String getTypeName() {
+      return HBaseStoragePluginConfig.NAME;
+    }
+
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseStoragePluginConfig.java
----------------------------------------------------------------------
diff --git a/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseStoragePluginConfig.java b/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseStoragePluginConfig.java
index 054d65f..78630a9 100644
--- a/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseStoragePluginConfig.java
+++ b/contrib/storage-hbase/src/main/java/org/apache/drill/exec/store/hbase/HBaseStoragePluginConfig.java
@@ -32,7 +32,7 @@ import com.google.common.annotations.VisibleForTesting;
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
 
-@JsonTypeName("hbase")
+@JsonTypeName(HBaseStoragePluginConfig.NAME)
 public class HBaseStoragePluginConfig extends StoragePluginConfigBase implements DrillHBaseConstants {
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(HBaseStoragePluginConfig.class);
 
@@ -41,6 +41,8 @@ public class HBaseStoragePluginConfig extends StoragePluginConfigBase implements
   @JsonIgnore
   private Configuration hbaseConf;
 
+  public static final String NAME = "hbase";
+
   @JsonCreator
   public HBaseStoragePluginConfig(@JsonProperty("config") Map<String, String> props) {
     this.config = props;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java
index 485136b..f98d661 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/AbstractSchema.java
@@ -61,6 +61,8 @@ public abstract class AbstractSchema implements Schema{
     return Joiner.on(".").join(schemaPath);
   }
 
+  public abstract String getTypeName();
+
   /**
    * The schema can be a top level schema which doesn't have its own tables, but refers
    * to one of the default sub schemas for table look up.

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/SubSchemaWrapper.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/SubSchemaWrapper.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/SubSchemaWrapper.java
index 576d761..dbfe93f 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/SubSchemaWrapper.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/SubSchemaWrapper.java
@@ -84,4 +84,9 @@ public class SubSchemaWrapper extends AbstractSchema {
   public Set<String> getTableNames() {
     return innerSchema.getTableNames();
   }
+
+  @Override
+  public String getTypeName() {
+    return innerSchema.getTypeName();
+  }
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemConfig.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemConfig.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemConfig.java
index 2d1a9ba..48a8943 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemConfig.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemConfig.java
@@ -24,10 +24,10 @@ import org.apache.drill.common.logical.StoragePluginConfig;
 
 import com.fasterxml.jackson.annotation.JsonTypeName;
 
-@JsonTypeName("file")
+@JsonTypeName(FileSystemConfig.NAME)
 public class FileSystemConfig implements StoragePluginConfig{
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(FileSystemConfig.class);
-  
+  public static final String NAME = "file";
   public String connection;
   public Map<String, WorkspaceConfig> workspaces;
   public Map<String, FormatPluginConfig> formats;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemSchemaFactory.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemSchemaFactory.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemSchemaFactory.java
index 9a57aa2..5d291f9 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemSchemaFactory.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/FileSystemSchemaFactory.java
@@ -23,11 +23,12 @@ import java.util.Map;
 import java.util.Set;
 
 import com.google.common.collect.ImmutableList;
+
 import net.hydromatic.optiq.Function;
 import net.hydromatic.optiq.Schema;
 import net.hydromatic.optiq.SchemaPlus;
-
 import net.hydromatic.optiq.Table;
+
 import org.apache.drill.exec.planner.logical.CreateTableEntry;
 import org.apache.drill.exec.planner.logical.DrillTable;
 import org.apache.drill.exec.rpc.user.DrillUser;
@@ -37,6 +38,7 @@ import org.apache.drill.exec.store.SchemaFactory;
 import org.apache.drill.exec.store.dfs.WorkspaceSchemaFactory.WorkspaceSchema;
 
 import com.google.common.collect.Maps;
+
 import org.apache.drill.exec.store.dfs.shim.DrillFileSystem;
 
 
@@ -91,6 +93,11 @@ public class FileSystemSchemaFactory implements SchemaFactory{
     }
 
     @Override
+    public String getTypeName() {
+      return FileSystemConfig.NAME;
+    }
+
+    @Override
     public Table getTable(String name) {
       return defaultSchema.getTable(name);
     }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
index 72b31e6..b17779b 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/dfs/WorkspaceSchemaFactory.java
@@ -24,7 +24,9 @@ import java.util.Set;
 import com.google.common.base.Joiner;
 import com.google.common.collect.Lists;
 import com.google.common.collect.Sets;
+
 import net.hydromatic.optiq.Table;
+
 import org.apache.drill.common.exceptions.ExecutionSetupException;
 import org.apache.drill.exec.ExecConstants;
 import org.apache.drill.exec.planner.logical.CreateTableEntry;
@@ -79,7 +81,7 @@ public class WorkspaceSchemaFactory implements ExpandingConcurrentMap.MapValueFa
 
       FileSelection fileSelection = FileSelection.create(fs, config.getLocation(), key);
       if(fileSelection == null) return null;
-      
+
       if (fileSelection.containsDirectories(fs)) {
         for (FormatMatcher m : dirMatchers) {
           try {
@@ -159,6 +161,11 @@ public class WorkspaceSchemaFactory implements ExpandingConcurrentMap.MapValueFa
           formatPlugin,
           config.getLocation() + Path.SEPARATOR + tableName);
     }
+
+    @Override
+    public String getTypeName() {
+      return FileSystemConfig.NAME;
+    }
   }
 
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePluginConfig.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePluginConfig.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePluginConfig.java
index c9d76e5..cbd7906 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePluginConfig.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/HiveStoragePluginConfig.java
@@ -21,18 +21,21 @@ import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonIgnore;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonTypeName;
+
 import org.apache.drill.common.logical.StoragePluginConfigBase;
 import org.apache.hadoop.hive.conf.HiveConf;
 
 import java.util.Map;
 
-@JsonTypeName("hive")
+@JsonTypeName(HiveStoragePluginConfig.NAME)
 public class HiveStoragePluginConfig extends StoragePluginConfigBase {
   @JsonProperty
   public Map<String, String> configProps;
   @JsonIgnore
   private HiveConf hiveConf;
 
+  public static final String NAME = "hive";
+
   @JsonIgnore
   public HiveConf getHiveConf() {
     if (hiveConf == null) {

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveDatabaseSchema.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveDatabaseSchema.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveDatabaseSchema.java
index 4390d74..0df2374 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveDatabaseSchema.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveDatabaseSchema.java
@@ -21,8 +21,11 @@ import java.util.List;
 import java.util.Set;
 
 import net.hydromatic.optiq.Table;
+
 import org.apache.drill.exec.planner.logical.DrillTable;
 import org.apache.drill.exec.store.AbstractSchema;
+import org.apache.drill.exec.store.dfs.FileSystemConfig;
+import org.apache.drill.exec.store.hive.HiveStoragePluginConfig;
 import org.apache.drill.exec.store.hive.schema.HiveSchemaFactory.HiveSchema;
 
 import com.google.common.collect.Sets;
@@ -32,7 +35,7 @@ public class HiveDatabaseSchema extends AbstractSchema{
 
   private final HiveSchema hiveSchema;
   private final Set<String> tables;
-  
+
   public HiveDatabaseSchema( //
       List<String> tableList, //
       HiveSchema hiveSchema, //
@@ -52,4 +55,9 @@ public class HiveDatabaseSchema extends AbstractSchema{
     return tables;
   }
 
+  @Override
+  public String getTypeName() {
+    return HiveStoragePluginConfig.NAME;
+  }
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveSchemaFactory.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveSchemaFactory.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveSchemaFactory.java
index 6dd6143..fb672d4 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveSchemaFactory.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/hive/schema/HiveSchemaFactory.java
@@ -24,6 +24,7 @@ import java.util.concurrent.ExecutionException;
 import java.util.concurrent.TimeUnit;
 
 import com.google.common.collect.ImmutableList;
+
 import net.hydromatic.optiq.Schema;
 import net.hydromatic.optiq.SchemaPlus;
 
@@ -35,6 +36,7 @@ import org.apache.drill.exec.store.AbstractSchema;
 import org.apache.drill.exec.store.SchemaFactory;
 import org.apache.drill.exec.store.hive.HiveReadEntry;
 import org.apache.drill.exec.store.hive.HiveStoragePlugin;
+import org.apache.drill.exec.store.hive.HiveStoragePluginConfig;
 import org.apache.drill.exec.store.hive.HiveTable;
 import org.apache.hadoop.hive.conf.HiveConf;
 import org.apache.hadoop.hive.metastore.HiveMetaStoreClient;
@@ -273,6 +275,12 @@ public class HiveSchemaFactory implements SchemaFactory {
     public AbstractSchema getDefaultSchema() {
       return defaultSchema;
     }
+
+    @Override
+    public String getTypeName() {
+      return HiveStoragePluginConfig.NAME;
+    }
+
   }
 
 

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaConfig.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaConfig.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaConfig.java
index d0ae77a..77bd254 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaConfig.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaConfig.java
@@ -21,15 +21,17 @@ import org.apache.drill.common.logical.StoragePluginConfig;
 
 public class InfoSchemaConfig implements StoragePluginConfig{
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(InfoSchemaConfig.class);
-  
+
+  public static final String NAME = "ischema";
+
   @Override
   public int hashCode(){
     return 1;
   }
-  
+
   @Override
   public boolean equals(Object o){
     return o instanceof InfoSchemaConfig;
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaStoragePlugin.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaStoragePlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaStoragePlugin.java
index ecf5a8b..db91f08 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaStoragePlugin.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaStoragePlugin.java
@@ -23,9 +23,10 @@ import java.util.Map;
 import java.util.Set;
 
 import com.google.common.collect.ImmutableList;
-import net.hydromatic.optiq.SchemaPlus;
 
+import net.hydromatic.optiq.SchemaPlus;
 import net.hydromatic.optiq.Table;
+
 import org.apache.drill.common.JSONOptions;
 import org.apache.drill.common.expression.SchemaPath;
 import org.apache.drill.common.logical.StoragePluginConfig;
@@ -35,6 +36,7 @@ import org.apache.drill.exec.rpc.user.UserSession;
 import org.apache.drill.exec.server.DrillbitContext;
 import org.apache.drill.exec.store.AbstractSchema;
 import org.apache.drill.exec.store.AbstractStoragePlugin;
+import org.apache.drill.exec.store.dfs.FileSystemConfig;
 
 import com.google.common.collect.ImmutableMap;
 import com.google.common.collect.Maps;
@@ -60,7 +62,7 @@ public class InfoSchemaStoragePlugin extends AbstractStoragePlugin{
   @Override
   public InfoSchemaGroupScan getPhysicalScan(JSONOptions selection, List<SchemaPath> columns) throws IOException {
     SelectedTable table = selection.getWith(context.getConfig(),  SelectedTable.class);
-    return new InfoSchemaGroupScan(table, columns);  
+    return new InfoSchemaGroupScan(table, columns);
   }
 
   @Override
@@ -95,5 +97,9 @@ public class InfoSchemaStoragePlugin extends AbstractStoragePlugin{
       return tables.keySet();
     }
 
+    @Override
+    public String getTypeName() {
+      return InfoSchemaConfig.NAME;
+    }
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaTable.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaTable.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaTable.java
index 595488f..6ab41b0 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaTable.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/InfoSchemaTable.java
@@ -39,8 +39,8 @@ public class InfoSchemaTable{
    */
   public static class Schemata extends FixedTable {
     static final String tableName = "SCHEMATA";
-    static final String[] fieldNames = {"CATALOG_NAME", "SCHEMA_NAME", "SCHEMA_OWNER"};
-    static final MajorType[] fieldTypes = {VARCHAR,         VARCHAR,       VARCHAR};
+    static final String[] fieldNames = {"CATALOG_NAME", "SCHEMA_NAME", "SCHEMA_OWNER", "TYPE"};
+    static final MajorType[] fieldTypes = {VARCHAR,         VARCHAR,       VARCHAR, VARCHAR};
 
     public Schemata() {
       super(tableName, fieldNames, fieldTypes);
@@ -48,10 +48,11 @@ public class InfoSchemaTable{
 
     // Optional ...
     public boolean writeRowToVectors(int index, Object[] row) {
-      return 
+      return
           setSafe((VarCharVector)vectors.get(0), index, (String)row[0])  &&
           setSafe((VarCharVector)vectors.get(1), index,  (String)row[1]) &&
-          setSafe((VarCharVector)vectors.get(2), index,  (String)row[2]);
+          setSafe((VarCharVector)vectors.get(2), index,  (String)row[2]) &&
+          setSafe((VarCharVector)vectors.get(3), index,  (String)row[3]);
     }
   }
 
@@ -65,7 +66,7 @@ public class InfoSchemaTable{
 
     public Tables() {
       super(tableName, fieldNames, fieldTypes);
-    }  
+    }
 
     // Optional ...
     public boolean writeRowToVectors(int index, Object[] row) {
@@ -96,14 +97,14 @@ public class InfoSchemaTable{
 
     // Optional ...
     public boolean writeRowToVectors(int index, Object[] row) {
-      return 
+      return
           setSafe((VarCharVector)vectors.get(0), index, (String)row[0]) &&
           setSafe((VarCharVector)vectors.get(1), index, (String)row[1]) &&
           setSafe((VarCharVector)vectors.get(2), index, (String)row[2]) &&
-          setSafe((VarCharVector)vectors.get(3), index, (String)row[3]) && 
+          setSafe((VarCharVector)vectors.get(3), index, (String)row[3]) &&
           setSafe((IntVector)vectors.get(4), index, (int)row[4])        &&
           setSafe((VarCharVector)vectors.get(5), index, (String)row[5])     &&
-          setSafe((VarCharVector)vectors.get(6), index, (String)row[6]) &&  
+          setSafe((VarCharVector)vectors.get(6), index, (String)row[6]) &&
           setSafe((IntVector)vectors.get(7), index, (int)row[7]) &&
           setSafe((IntVector)vectors.get(8), index, (int)row[8])        &&
           setSafe((IntVector)vectors.get(9), index, (int)row[9])        &&
@@ -146,6 +147,6 @@ public class InfoSchemaTable{
       super(tableName, fieldNames, fieldTypes);
     }
   }
-  
-  
+
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/OptiqProvider.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/OptiqProvider.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/OptiqProvider.java
index e12e5d6..1aee579 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/OptiqProvider.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/ischema/OptiqProvider.java
@@ -61,7 +61,8 @@ public class OptiqProvider  {
     @Override
     public boolean visitSchema(String schemaName, SchemaPlus schema) {
       if (shouldVisitSchema(schema) && schemaName != null && schemaName != "") {
-          writeRow("DRILL", schemaName, "<owner>");
+        AbstractSchema as = schema.unwrap(AbstractSchema.class);
+        writeRow("DRILL", schemaName, "<owner>", as.getTypeName());
       }
       return false;
     }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/MockStorageEngineConfig.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/MockStorageEngineConfig.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/MockStorageEngineConfig.java
index 8262544..c566182 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/MockStorageEngineConfig.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/mock/MockStorageEngineConfig.java
@@ -23,13 +23,15 @@ import com.fasterxml.jackson.annotation.JsonCreator;
 import com.fasterxml.jackson.annotation.JsonProperty;
 import com.fasterxml.jackson.annotation.JsonTypeName;
 
-@JsonTypeName("mock")
+@JsonTypeName(MockStorageEngineConfig.NAME)
 public class MockStorageEngineConfig extends StoragePluginConfigBase{
 
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(MockStorageEngineConfig.class);
 
   private String url;
-  
+
+  public static final String NAME = "mock";
+
   @JsonCreator
   public MockStorageEngineConfig(@JsonProperty("url") String url) {
     this.url = url;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java
index fd3a898..4abd253 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePlugin.java
@@ -115,5 +115,10 @@ public class SystemTablePlugin extends AbstractStoragePlugin{
 
     }
 
+    @Override
+    public String getTypeName() {
+      return SystemTablePluginConfig.NAME;
+    }
+
   }
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/a4a02ef4/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePluginConfig.java
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePluginConfig.java b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePluginConfig.java
index bca9881..758368f 100644
--- a/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePluginConfig.java
+++ b/exec/java-exec/src/main/java/org/apache/drill/exec/store/sys/SystemTablePluginConfig.java
@@ -22,7 +22,7 @@ import org.apache.drill.common.logical.StoragePluginConfig;
 public class SystemTablePluginConfig implements StoragePluginConfig{
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(SystemTablePluginConfig.class);
 
-  String name = "system-tables";
+  public static String NAME = "system-tables";
 
   public static SystemTablePluginConfig INSTANCE = new SystemTablePluginConfig();