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/04/20 03:18:48 UTC

[40/51] [abbrv] Move to Optiq 0.6 Also includes: -improve exception catching -move schema path parsing to Antlr -close zookeeper connection on if client created -enhance BaseTestQuery and have other query tests utilize it -Various test fixes for better m

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/exec/java-exec/src/test/resources/functions/string/testRight.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/functions/string/testRight.json b/exec/java-exec/src/test/resources/functions/string/testRight.json
index db5a5a5..74abcd4 100644
--- a/exec/java-exec/src/test/resources/functions/string/testRight.json
+++ b/exec/java-exec/src/test/resources/functions/string/testRight.json
@@ -23,13 +23,13 @@
             child: 1,
             pop:"project",
             exprs: [
-							{ ref: "col1", expr: "right(\"abcdef\", 2)"},
-							{ ref: "col2", expr: "right(\"abcdef\", 6)"}, 
-              { ref: "col3", expr: "right(\"abcdef\", 7)"},
-              { ref: "col4", expr: "right(\"abcdef\", -2)"},
-              { ref: "col5", expr: "right(\"abcdef\", -5)"},
-              { ref: "col6", expr: "right(\"abcdef\", -6)"},
-              { ref: "col7", expr: "right(\"abcdef\", -7)"}
+							{ ref: "col1", expr: "right('abcdef', 2)"},
+							{ ref: "col2", expr: "right('abcdef', 6)"}, 
+              { ref: "col3", expr: "right('abcdef', 7)"},
+              { ref: "col4", expr: "right('abcdef', -2)"},
+              { ref: "col5", expr: "right('abcdef', -5)"},
+              { ref: "col6", expr: "right('abcdef', -6)"},
+              { ref: "col7", expr: "right('abcdef', -7)"}
      			]
         },
         {

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/exec/java-exec/src/test/resources/functions/string/testRpad.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/functions/string/testRpad.json b/exec/java-exec/src/test/resources/functions/string/testRpad.json
index 18f34d9..e41da4b 100644
--- a/exec/java-exec/src/test/resources/functions/string/testRpad.json
+++ b/exec/java-exec/src/test/resources/functions/string/testRpad.json
@@ -23,16 +23,16 @@
             child: 1,
             pop:"project",
             exprs: [
-						  { ref: "col1", expr: "rpad(\"abcdef\", 0, \"abc\")"},
-						  { ref: "col2", expr: "rpad(\"abcdef\", -3, \"abc\")"},
-						  { ref: "col3", expr: "rpad(\"abcdef\", 6, \"abc\")"},
-						  { ref: "col4", expr: "rpad(\"abcdef\", 2, \"abc\")"},
-						  { ref: "col5", expr: "rpad(\"abcdef\", 2, \"\")"},
-						  { ref: "col7", expr: "rpad(\"abcdef\", 10, \"\")"},
-						  { ref: "col8", expr: "rpad(\"abcdef\", 10, \"A\")"},
-						  { ref: "col9", expr: "rpad(\"abcdef\", 10, \"AB\")"},
-						  { ref: "col10", expr: "rpad(\"abcdef\", 10, \"ABC\")"},
-						  { ref: "col11", expr: "rpad(\"abcdef\", 10, \"ABCDEFGHIJKLMN\")"}
+						  { ref: "col1", expr: "rpad('abcdef', 0, 'abc')"},
+						  { ref: "col2", expr: "rpad('abcdef', -3, 'abc')"},
+						  { ref: "col3", expr: "rpad('abcdef', 6, 'abc')"},
+						  { ref: "col4", expr: "rpad('abcdef', 2, 'abc')"},
+						  { ref: "col5", expr: "rpad('abcdef', 2, '')"},
+						  { ref: "col7", expr: "rpad('abcdef', 10, '')"},
+						  { ref: "col8", expr: "rpad('abcdef', 10, 'A')"},
+						  { ref: "col9", expr: "rpad('abcdef', 10, 'AB')"},
+						  { ref: "col10", expr: "rpad('abcdef', 10, 'ABC')"},
+						  { ref: "col11", expr: "rpad('abcdef', 10, 'ABCDEFGHIJKLMN')"}
 
         ]
         },

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/exec/java-exec/src/test/resources/functions/string/testRtrim.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/functions/string/testRtrim.json b/exec/java-exec/src/test/resources/functions/string/testRtrim.json
index 414534a..d3608d2 100644
--- a/exec/java-exec/src/test/resources/functions/string/testRtrim.json
+++ b/exec/java-exec/src/test/resources/functions/string/testRtrim.json
@@ -23,12 +23,12 @@
             child: 1,
             pop:"project",
             exprs: [
-						  { ref: "col1", expr: "rtrim(\"abcdef\", \"def\")"},
-						  { ref: "col2", expr: "rtrim(\"abcdef\", \"\")"},
-						  { ref: "col3", expr: "rtrim(\"ABdabc\", \"abc\")"},
-						  { ref: "col4", expr: "rtrim(\"abc\", \"abc\")"},
-						  { ref: "col5", expr: "rtrim(\"\", \"abc\")"},
-						  { ref: "col6", expr: "rtrim(\"\", \"\")"}
+						  { ref: "col1", expr: "rtrim('abcdef', 'def')"},
+						  { ref: "col2", expr: "rtrim('abcdef', '')"},
+						  { ref: "col3", expr: "rtrim('ABdabc', 'abc')"},
+						  { ref: "col4", expr: "rtrim('abc', 'abc')"},
+						  { ref: "col5", expr: "rtrim('', 'abc')"},
+						  { ref: "col6", expr: "rtrim('', '')"}
         ]
         },
         {

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/exec/java-exec/src/test/resources/functions/string/testSimilar.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/functions/string/testSimilar.json b/exec/java-exec/src/test/resources/functions/string/testSimilar.json
index d7f303d..c0972ae 100644
--- a/exec/java-exec/src/test/resources/functions/string/testSimilar.json
+++ b/exec/java-exec/src/test/resources/functions/string/testSimilar.json
@@ -23,10 +23,10 @@
             child: 1,
             pop:"project",
             exprs: [
-              { ref: "issimilar", expr:" similar(\"abc\", \"abc\")" },
-              { ref: "issimilar", expr:" similar(\"abc\", \"a\")" },
-              { ref: "issimilar", expr:" similar(\"abc\", \"%(b|d)%\")" },
-              { ref: "issimilar", expr:" similar(\"abc\", \"(b|c)%\")" }
+              { ref: "issimilar", expr:" similar('abc', 'abc')" },
+              { ref: "issimilar", expr:" similar('abc', 'a')" },
+              { ref: "issimilar", expr:" similar('abc', '%(b|d)%')" },
+              { ref: "issimilar", expr:" similar('abc', '(b|c)%')" }
            ]
         },
         {

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/exec/java-exec/src/test/resources/functions/string/testUpper.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/functions/string/testUpper.json b/exec/java-exec/src/test/resources/functions/string/testUpper.json
index 5258367..c155e14 100644
--- a/exec/java-exec/src/test/resources/functions/string/testUpper.json
+++ b/exec/java-exec/src/test/resources/functions/string/testUpper.json
@@ -23,9 +23,9 @@
             child: 1,
             pop:"project",
             exprs: [
-              { ref: "lower", expr: "upper(\"ABcEFgh\")"}, 
-              { ref: "lower", expr: "upper(\"aBc\")"}, 
-              { ref: "lower", expr: "upper(\"\")"}
+              { ref: "lower", expr: "upper('ABcEFgh')"}, 
+              { ref: "lower", expr: "upper('aBc')"}, 
+              { ref: "lower", expr: "upper('')"}
            ]
         },
         {

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/exec/java-exec/src/test/resources/join/mj_multi_condition.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/join/mj_multi_condition.json b/exec/java-exec/src/test/resources/join/mj_multi_condition.json
index f27f279..25b1391 100644
--- a/exec/java-exec/src/test/resources/join/mj_multi_condition.json
+++ b/exec/java-exec/src/test/resources/join/mj_multi_condition.json
@@ -60,10 +60,10 @@
     "pop" : "project",
     "@id" : 5,
     "exprs" : [ {
-      "ref" : "output.ps_partkey",
+      "ref" : "ps_partkey",
       "expr" : "ps_partkey"
     }, {
-      "ref" : "output.ps_suppkey",
+      "ref" : "ps_suppkey",
       "expr" : "ps_suppkey"
     } ],
     "child" : 4
@@ -108,16 +108,16 @@
     "pop" : "project",
     "@id" : 10,
     "exprs" : [ {
-      "ref" : "output.l_partkey",
+      "ref" : "l_partkey",
       "expr" : "l_partkey"
     }, {
-      "ref" : "output.l_suppkey",
+      "ref" : "l_suppkey",
       "expr" : "l_suppkey"
     }, {
-      "ref" : "output.ps_partkey",
+      "ref" : "ps_partkey",
       "expr" : "ps_partkey"
     }, {
-      "ref" : "output.ps_suppkey",
+      "ref" : "ps_suppkey",
       "expr" : "ps_suppkey"
     } ],
     "child" : 9

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/exec/java-exec/src/test/resources/logical_string_filter.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/logical_string_filter.json b/exec/java-exec/src/test/resources/logical_string_filter.json
index 28cc5e7..d8875d3 100644
--- a/exec/java-exec/src/test/resources/logical_string_filter.json
+++ b/exec/java-exec/src/test/resources/logical_string_filter.json
@@ -26,7 +26,7 @@
     op : "filter",
     @id : 2,
     input : 1,
-    expr : " (_MAP.R_NAME)  == (\"AFRICA\") "
+    expr : " (_MAP.R_NAME)  == ('AFRICA') "
   }, {
     op : "project",
     @id : 3,

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/exec/java-exec/src/test/resources/simple_plan.json
----------------------------------------------------------------------
diff --git a/exec/java-exec/src/test/resources/simple_plan.json b/exec/java-exec/src/test/resources/simple_plan.json
index 2457b1f..7ffb504 100644
--- a/exec/java-exec/src/test/resources/simple_plan.json
+++ b/exec/java-exec/src/test/resources/simple_plan.json
@@ -45,11 +45,11 @@
       transforms:[
         {
           ref:"userId",
-          expr:"regex_like('activity.cookie', \"persistent=([^;]*)\")"
+          expr:"regex_like('activity.cookie', 'persistent=([^;]*)')"
         },
         {
           ref:"session",
-          expr:"regex_like('activity.cookie', \"session=([^;]*)\")"
+          expr:"regex_like('activity.cookie', 'session=([^;]*)')"
         }
       ]
     },
@@ -61,11 +61,11 @@
       transforms:[
         {
           ref:"userId",
-          expr:"regex_like('activity.cookie', \"persistent=([^;]*)\")"
+          expr:"regex_like('activity.cookie', 'persistent=([^;]*)')"
         },
         {
           ref:"session",
-          expr:"regex_like('activity.cookie', \"session=([^;]*)\")"
+          expr:"regex_like('activity.cookie', 'session=([^;]*)')"
         }
       ]
     },
@@ -80,7 +80,7 @@
           transforms:[
             {
               ref:"happy",
-              expr:"regex_like('ep2', \"dink\")"
+              expr:"regex_like('ep2', 'dink')"
             }
           ]
         }
@@ -105,7 +105,7 @@
       transforms:[
         {
           ref:"happy",
-          expr:"regex_like('ep2', \"dink\")"
+          expr:"regex_like('ep2', 'dink')"
         }
       ]
     },

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/pom.xml
----------------------------------------------------------------------
diff --git a/pom.xml b/pom.xml
index a6200cd..bb53650 100644
--- a/pom.xml
+++ b/pom.xml
@@ -253,9 +253,11 @@
         </plugin>
         <plugin>
           <artifactId>maven-surefire-plugin</artifactId>
-          <version>2.15</version>
+          <version>2.17</version>
           <configuration>
-            <argLine>-Xms1g -Xmx1g -XX:MaxDirectMemorySize=6096M </argLine>
+            <argLine>-Xms1g -Xmx2g -XX:MaxDirectMemorySize=6096M </argLine>
+            <forkCount>8</forkCount>
+            <reuseForks>true</reuseForks>
             <additionalClasspathElements>
               <additionalClasspathElement>./sqlparser/src/test/resources/storage-engines.json</additionalClasspathElement>
             </additionalClasspathElements>
@@ -608,7 +610,7 @@
           <dependency>
             <groupId>net.hydromatic</groupId>
             <artifactId>optiq-core</artifactId>
-            <version>0.6-SNAPSHOT</version>
+            <version>0.6</version>
             <exclusions>
               <exclusion>
                 <groupId>org.jgrapht</groupId>

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java b/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java
index f6ef3b1..f91a010 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/BitControl.java
@@ -3131,6 +3131,20 @@ public final class BitControl {
      * </pre>
      */
     long getQueryStartTime();
+
+    // optional .exec.shared.UserCredentials credentials = 15;
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+     */
+    boolean hasCredentials();
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+     */
+    org.apache.drill.exec.proto.UserBitShared.UserCredentials getCredentials();
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+     */
+    org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder getCredentialsOrBuilder();
   }
   /**
    * Protobuf type {@code exec.bit.control.PlanFragment}
@@ -3267,6 +3281,19 @@ public final class BitControl {
               queryStartTime_ = input.readInt64();
               break;
             }
+            case 122: {
+              org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder subBuilder = null;
+              if (((bitField0_ & 0x00001000) == 0x00001000)) {
+                subBuilder = credentials_.toBuilder();
+              }
+              credentials_ = input.readMessage(org.apache.drill.exec.proto.UserBitShared.UserCredentials.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(credentials_);
+                credentials_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00001000;
+              break;
+            }
           }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -3568,6 +3595,28 @@ public final class BitControl {
       return queryStartTime_;
     }
 
+    // optional .exec.shared.UserCredentials credentials = 15;
+    public static final int CREDENTIALS_FIELD_NUMBER = 15;
+    private org.apache.drill.exec.proto.UserBitShared.UserCredentials credentials_;
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+     */
+    public boolean hasCredentials() {
+      return ((bitField0_ & 0x00001000) == 0x00001000);
+    }
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+     */
+    public org.apache.drill.exec.proto.UserBitShared.UserCredentials getCredentials() {
+      return credentials_;
+    }
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+     */
+    public org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder getCredentialsOrBuilder() {
+      return credentials_;
+    }
+
     private void initFields() {
       handle_ = org.apache.drill.exec.proto.ExecProtos.FragmentHandle.getDefaultInstance();
       networkCost_ = 0F;
@@ -3581,6 +3630,7 @@ public final class BitControl {
       memInitial_ = 20000000L;
       memMax_ = 20000000000L;
       queryStartTime_ = 0L;
+      credentials_ = org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
@@ -3630,6 +3680,9 @@ public final class BitControl {
       if (((bitField0_ & 0x00000800) == 0x00000800)) {
         output.writeInt64(14, queryStartTime_);
       }
+      if (((bitField0_ & 0x00001000) == 0x00001000)) {
+        output.writeMessage(15, credentials_);
+      }
       getUnknownFields().writeTo(output);
     }
 
@@ -3687,6 +3740,10 @@ public final class BitControl {
         size += com.google.protobuf.CodedOutputStream
           .computeInt64Size(14, queryStartTime_);
       }
+      if (((bitField0_ & 0x00001000) == 0x00001000)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(15, credentials_);
+      }
       size += getUnknownFields().getSerializedSize();
       memoizedSerializedSize = size;
       return size;
@@ -3798,6 +3855,7 @@ public final class BitControl {
           getHandleFieldBuilder();
           getAssignmentFieldBuilder();
           getForemanFieldBuilder();
+          getCredentialsFieldBuilder();
         }
       }
       private static Builder create() {
@@ -3842,6 +3900,12 @@ public final class BitControl {
         bitField0_ = (bitField0_ & ~0x00000400);
         queryStartTime_ = 0L;
         bitField0_ = (bitField0_ & ~0x00000800);
+        if (credentialsBuilder_ == null) {
+          credentials_ = org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
+        } else {
+          credentialsBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00001000);
         return this;
       }
 
@@ -3930,6 +3994,14 @@ public final class BitControl {
           to_bitField0_ |= 0x00000800;
         }
         result.queryStartTime_ = queryStartTime_;
+        if (((from_bitField0_ & 0x00001000) == 0x00001000)) {
+          to_bitField0_ |= 0x00001000;
+        }
+        if (credentialsBuilder_ == null) {
+          result.credentials_ = credentials_;
+        } else {
+          result.credentials_ = credentialsBuilder_.build();
+        }
         result.bitField0_ = to_bitField0_;
         onBuilt();
         return result;
@@ -3984,6 +4056,9 @@ public final class BitControl {
         if (other.hasQueryStartTime()) {
           setQueryStartTime(other.getQueryStartTime());
         }
+        if (other.hasCredentials()) {
+          mergeCredentials(other.getCredentials());
+        }
         this.mergeUnknownFields(other.getUnknownFields());
         return this;
       }
@@ -4748,6 +4823,123 @@ public final class BitControl {
         return this;
       }
 
+      // optional .exec.shared.UserCredentials credentials = 15;
+      private org.apache.drill.exec.proto.UserBitShared.UserCredentials credentials_ = org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.drill.exec.proto.UserBitShared.UserCredentials, org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder, org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder> credentialsBuilder_;
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+       */
+      public boolean hasCredentials() {
+        return ((bitField0_ & 0x00001000) == 0x00001000);
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+       */
+      public org.apache.drill.exec.proto.UserBitShared.UserCredentials getCredentials() {
+        if (credentialsBuilder_ == null) {
+          return credentials_;
+        } else {
+          return credentialsBuilder_.getMessage();
+        }
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+       */
+      public Builder setCredentials(org.apache.drill.exec.proto.UserBitShared.UserCredentials value) {
+        if (credentialsBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          credentials_ = value;
+          onChanged();
+        } else {
+          credentialsBuilder_.setMessage(value);
+        }
+        bitField0_ |= 0x00001000;
+        return this;
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+       */
+      public Builder setCredentials(
+          org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder builderForValue) {
+        if (credentialsBuilder_ == null) {
+          credentials_ = builderForValue.build();
+          onChanged();
+        } else {
+          credentialsBuilder_.setMessage(builderForValue.build());
+        }
+        bitField0_ |= 0x00001000;
+        return this;
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+       */
+      public Builder mergeCredentials(org.apache.drill.exec.proto.UserBitShared.UserCredentials value) {
+        if (credentialsBuilder_ == null) {
+          if (((bitField0_ & 0x00001000) == 0x00001000) &&
+              credentials_ != org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance()) {
+            credentials_ =
+              org.apache.drill.exec.proto.UserBitShared.UserCredentials.newBuilder(credentials_).mergeFrom(value).buildPartial();
+          } else {
+            credentials_ = value;
+          }
+          onChanged();
+        } else {
+          credentialsBuilder_.mergeFrom(value);
+        }
+        bitField0_ |= 0x00001000;
+        return this;
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+       */
+      public Builder clearCredentials() {
+        if (credentialsBuilder_ == null) {
+          credentials_ = org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
+          onChanged();
+        } else {
+          credentialsBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00001000);
+        return this;
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+       */
+      public org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder getCredentialsBuilder() {
+        bitField0_ |= 0x00001000;
+        onChanged();
+        return getCredentialsFieldBuilder().getBuilder();
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+       */
+      public org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder getCredentialsOrBuilder() {
+        if (credentialsBuilder_ != null) {
+          return credentialsBuilder_.getMessageOrBuilder();
+        } else {
+          return credentials_;
+        }
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 15;</code>
+       */
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.drill.exec.proto.UserBitShared.UserCredentials, org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder, org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder> 
+          getCredentialsFieldBuilder() {
+        if (credentialsBuilder_ == null) {
+          credentialsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+              org.apache.drill.exec.proto.UserBitShared.UserCredentials, org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder, org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder>(
+                  credentials_,
+                  getParentForChildren(),
+                  isClean());
+          credentials_ = null;
+        }
+        return credentialsBuilder_;
+      }
+
       // @@protoc_insertion_point(builder_scope:exec.bit.control.PlanFragment)
     }
 
@@ -5480,7 +5672,7 @@ public final class BitControl {
       "shared.DrillPBError\022\024\n\014running_time\030\t \001(" +
       "\003\"k\n\rFragmentState\022\013\n\007SENDING\020\000\022\027\n\023AWAIT" +
       "ING_ALLOCATION\020\001\022\013\n\007RUNNING\020\002\022\014\n\010FINISHE" +
-      "D\020\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005\"\342\002\n\014PlanF" +
+      "D\020\003\022\r\n\tCANCELLED\020\004\022\n\n\006FAILED\020\005\"\225\003\n\014PlanF" +
       "ragment\022(\n\006handle\030\001 \001(\0132\030.exec.bit.Fragm",
       "entHandle\022\024\n\014network_cost\030\004 \001(\002\022\020\n\010cpu_c" +
       "ost\030\005 \001(\002\022\021\n\tdisk_cost\030\006 \001(\002\022\023\n\013memory_c" +
@@ -5489,16 +5681,18 @@ public final class BitControl {
       "leaf_fragment\030\t \001(\010\022\'\n\007foreman\030\013 \001(\0132\026.e" +
       "xec.DrillbitEndpoint\022\035\n\013mem_initial\030\014 \001(" +
       "\003:\01020000000\022\034\n\007mem_max\030\r \001(\003:\0132000000000" +
-      "0\022\030\n\020query_start_time\030\016 \001(\003\"f\n\017WorkQueue" +
-      "Status\022(\n\010endpoint\030\001 \001(\0132\026.exec.Drillbit" +
-      "Endpoint\022\024\n\014queue_length\030\002 \001(\005\022\023\n\013report",
-      "_time\030\003 \001(\003*\332\001\n\007RpcType\022\r\n\tHANDSHAKE\020\000\022\007" +
-      "\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\033\n\027REQ_INIATILIZE_F" +
-      "RAGMENT\020\003\022\027\n\023REQ_CANCEL_FRAGMENT\020\006\022\027\n\023RE" +
-      "Q_FRAGMENT_STATUS\020\007\022\022\n\016REQ_BIT_STATUS\020\010\022" +
-      "\030\n\024RESP_FRAGMENT_HANDLE\020\t\022\030\n\024RESP_FRAGME" +
-      "NT_STATUS\020\n\022\023\n\017RESP_BIT_STATUS\020\013B+\n\033org." +
-      "apache.drill.exec.protoB\nBitControlH\001"
+      "0\022\030\n\020query_start_time\030\016 \001(\003\0221\n\013credentia" +
+      "ls\030\017 \001(\0132\034.exec.shared.UserCredentials\"f" +
+      "\n\017WorkQueueStatus\022(\n\010endpoint\030\001 \001(\0132\026.ex",
+      "ec.DrillbitEndpoint\022\024\n\014queue_length\030\002 \001(" +
+      "\005\022\023\n\013report_time\030\003 \001(\003*\332\001\n\007RpcType\022\r\n\tHA" +
+      "NDSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOODBYE\020\002\022\033\n\027REQ_I" +
+      "NIATILIZE_FRAGMENT\020\003\022\027\n\023REQ_CANCEL_FRAGM" +
+      "ENT\020\006\022\027\n\023REQ_FRAGMENT_STATUS\020\007\022\022\n\016REQ_BI" +
+      "T_STATUS\020\010\022\030\n\024RESP_FRAGMENT_HANDLE\020\t\022\030\n\024" +
+      "RESP_FRAGMENT_STATUS\020\n\022\023\n\017RESP_BIT_STATU" +
+      "S\020\013B+\n\033org.apache.drill.exec.protoB\nBitC" +
+      "ontrolH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -5528,7 +5722,7 @@ public final class BitControl {
           internal_static_exec_bit_control_PlanFragment_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_bit_control_PlanFragment_descriptor,
-              new java.lang.String[] { "Handle", "NetworkCost", "CpuCost", "DiskCost", "MemoryCost", "FragmentJson", "Assignment", "LeafFragment", "Foreman", "MemInitial", "MemMax", "QueryStartTime", });
+              new java.lang.String[] { "Handle", "NetworkCost", "CpuCost", "DiskCost", "MemoryCost", "FragmentJson", "Assignment", "LeafFragment", "Foreman", "MemInitial", "MemMax", "QueryStartTime", "Credentials", });
           internal_static_exec_bit_control_WorkQueueStatus_descriptor =
             getDescriptor().getMessageTypes().get(4);
           internal_static_exec_bit_control_WorkQueueStatus_fieldAccessorTable = new

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
index 1b6d242..99b4df8 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/UserBitShared.java
@@ -116,6 +116,477 @@ public final class UserBitShared {
     // @@protoc_insertion_point(enum_scope:exec.shared.RpcChannel)
   }
 
+  public interface UserCredentialsOrBuilder
+      extends com.google.protobuf.MessageOrBuilder {
+
+    // optional string user_name = 1;
+    /**
+     * <code>optional string user_name = 1;</code>
+     */
+    boolean hasUserName();
+    /**
+     * <code>optional string user_name = 1;</code>
+     */
+    java.lang.String getUserName();
+    /**
+     * <code>optional string user_name = 1;</code>
+     */
+    com.google.protobuf.ByteString
+        getUserNameBytes();
+  }
+  /**
+   * Protobuf type {@code exec.shared.UserCredentials}
+   */
+  public static final class UserCredentials extends
+      com.google.protobuf.GeneratedMessage
+      implements UserCredentialsOrBuilder {
+    // Use UserCredentials.newBuilder() to construct.
+    private UserCredentials(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
+      super(builder);
+      this.unknownFields = builder.getUnknownFields();
+    }
+    private UserCredentials(boolean noInit) { this.unknownFields = com.google.protobuf.UnknownFieldSet.getDefaultInstance(); }
+
+    private static final UserCredentials defaultInstance;
+    public static UserCredentials getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    public UserCredentials getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+    private final com.google.protobuf.UnknownFieldSet unknownFields;
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+        getUnknownFields() {
+      return this.unknownFields;
+    }
+    private UserCredentials(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      initFields();
+      int mutable_bitField0_ = 0;
+      com.google.protobuf.UnknownFieldSet.Builder unknownFields =
+          com.google.protobuf.UnknownFieldSet.newBuilder();
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!parseUnknownField(input, unknownFields,
+                                     extensionRegistry, tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              bitField0_ |= 0x00000001;
+              userName_ = input.readBytes();
+              break;
+            }
+          }
+        }
+      } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+        throw e.setUnfinishedMessage(this);
+      } catch (java.io.IOException e) {
+        throw new com.google.protobuf.InvalidProtocolBufferException(
+            e.getMessage()).setUnfinishedMessage(this);
+      } finally {
+        this.unknownFields = unknownFields.build();
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_UserCredentials_descriptor;
+    }
+
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_UserCredentials_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.drill.exec.proto.UserBitShared.UserCredentials.class, org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder.class);
+    }
+
+    public static com.google.protobuf.Parser<UserCredentials> PARSER =
+        new com.google.protobuf.AbstractParser<UserCredentials>() {
+      public UserCredentials parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new UserCredentials(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<UserCredentials> getParserForType() {
+      return PARSER;
+    }
+
+    private int bitField0_;
+    // optional string user_name = 1;
+    public static final int USER_NAME_FIELD_NUMBER = 1;
+    private java.lang.Object userName_;
+    /**
+     * <code>optional string user_name = 1;</code>
+     */
+    public boolean hasUserName() {
+      return ((bitField0_ & 0x00000001) == 0x00000001);
+    }
+    /**
+     * <code>optional string user_name = 1;</code>
+     */
+    public java.lang.String getUserName() {
+      java.lang.Object ref = userName_;
+      if (ref instanceof java.lang.String) {
+        return (java.lang.String) ref;
+      } else {
+        com.google.protobuf.ByteString bs = 
+            (com.google.protobuf.ByteString) ref;
+        java.lang.String s = bs.toStringUtf8();
+        if (bs.isValidUtf8()) {
+          userName_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string user_name = 1;</code>
+     */
+    public com.google.protobuf.ByteString
+        getUserNameBytes() {
+      java.lang.Object ref = userName_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        userName_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    private void initFields() {
+      userName_ = "";
+    }
+    private byte memoizedIsInitialized = -1;
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized != -1) return isInitialized == 1;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        output.writeBytes(1, getUserNameBytes());
+      }
+      getUnknownFields().writeTo(output);
+    }
+
+    private int memoizedSerializedSize = -1;
+    public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (((bitField0_ & 0x00000001) == 0x00000001)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(1, getUserNameBytes());
+      }
+      size += getUnknownFields().getSerializedSize();
+      memoizedSerializedSize = size;
+      return size;
+    }
+
+    private static final long serialVersionUID = 0L;
+    @java.lang.Override
+    protected java.lang.Object writeReplace()
+        throws java.io.ObjectStreamException {
+      return super.writeReplace();
+    }
+
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseFrom(
+        com.google.protobuf.ByteString data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.drill.exec.proto.UserBitShared.UserCredentials parseFrom(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+
+    public static Builder newBuilder() { return Builder.create(); }
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.apache.drill.exec.proto.UserBitShared.UserCredentials prototype) {
+      return newBuilder().mergeFrom(prototype);
+    }
+    public Builder toBuilder() { return newBuilder(this); }
+
+    @java.lang.Override
+    protected Builder newBuilderForType(
+        com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+      Builder builder = new Builder(parent);
+      return builder;
+    }
+    /**
+     * Protobuf type {@code exec.shared.UserCredentials}
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder>
+       implements org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_UserCredentials_descriptor;
+      }
+
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_UserCredentials_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.drill.exec.proto.UserBitShared.UserCredentials.class, org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder.class);
+      }
+
+      // Construct using org.apache.drill.exec.proto.UserBitShared.UserCredentials.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+        }
+      }
+      private static Builder create() {
+        return new Builder();
+      }
+
+      public Builder clear() {
+        super.clear();
+        userName_ = "";
+        bitField0_ = (bitField0_ & ~0x00000001);
+        return this;
+      }
+
+      public Builder clone() {
+        return create().mergeFrom(buildPartial());
+      }
+
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.apache.drill.exec.proto.UserBitShared.internal_static_exec_shared_UserCredentials_descriptor;
+      }
+
+      public org.apache.drill.exec.proto.UserBitShared.UserCredentials getDefaultInstanceForType() {
+        return org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
+      }
+
+      public org.apache.drill.exec.proto.UserBitShared.UserCredentials build() {
+        org.apache.drill.exec.proto.UserBitShared.UserCredentials result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      public org.apache.drill.exec.proto.UserBitShared.UserCredentials buildPartial() {
+        org.apache.drill.exec.proto.UserBitShared.UserCredentials result = new org.apache.drill.exec.proto.UserBitShared.UserCredentials(this);
+        int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
+          to_bitField0_ |= 0x00000001;
+        }
+        result.userName_ = userName_;
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.apache.drill.exec.proto.UserBitShared.UserCredentials) {
+          return mergeFrom((org.apache.drill.exec.proto.UserBitShared.UserCredentials)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.apache.drill.exec.proto.UserBitShared.UserCredentials other) {
+        if (other == org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance()) return this;
+        if (other.hasUserName()) {
+          bitField0_ |= 0x00000001;
+          userName_ = other.userName_;
+          onChanged();
+        }
+        this.mergeUnknownFields(other.getUnknownFields());
+        return this;
+      }
+
+      public final boolean isInitialized() {
+        return true;
+      }
+
+      public Builder mergeFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws java.io.IOException {
+        org.apache.drill.exec.proto.UserBitShared.UserCredentials parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.apache.drill.exec.proto.UserBitShared.UserCredentials) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+      private int bitField0_;
+
+      // optional string user_name = 1;
+      private java.lang.Object userName_ = "";
+      /**
+       * <code>optional string user_name = 1;</code>
+       */
+      public boolean hasUserName() {
+        return ((bitField0_ & 0x00000001) == 0x00000001);
+      }
+      /**
+       * <code>optional string user_name = 1;</code>
+       */
+      public java.lang.String getUserName() {
+        java.lang.Object ref = userName_;
+        if (!(ref instanceof java.lang.String)) {
+          java.lang.String s = ((com.google.protobuf.ByteString) ref)
+              .toStringUtf8();
+          userName_ = s;
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string user_name = 1;</code>
+       */
+      public com.google.protobuf.ByteString
+          getUserNameBytes() {
+        java.lang.Object ref = userName_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          userName_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string user_name = 1;</code>
+       */
+      public Builder setUserName(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
+        userName_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string user_name = 1;</code>
+       */
+      public Builder clearUserName() {
+        bitField0_ = (bitField0_ & ~0x00000001);
+        userName_ = getDefaultInstance().getUserName();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string user_name = 1;</code>
+       */
+      public Builder setUserNameBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  bitField0_ |= 0x00000001;
+        userName_ = value;
+        onChanged();
+        return this;
+      }
+
+      // @@protoc_insertion_point(builder_scope:exec.shared.UserCredentials)
+    }
+
+    static {
+      defaultInstance = new UserCredentials(true);
+      defaultInstance.initFields();
+    }
+
+    // @@protoc_insertion_point(class_scope:exec.shared.UserCredentials)
+  }
+
   public interface QueryIdOrBuilder
       extends com.google.protobuf.MessageOrBuilder {
 
@@ -4719,6 +5190,11 @@ public final class UserBitShared {
   }
 
   private static com.google.protobuf.Descriptors.Descriptor
+    internal_static_exec_shared_UserCredentials_descriptor;
+  private static
+    com.google.protobuf.GeneratedMessage.FieldAccessorTable
+      internal_static_exec_shared_UserCredentials_fieldAccessorTable;
+  private static com.google.protobuf.Descriptors.Descriptor
     internal_static_exec_shared_QueryId_descriptor;
   private static
     com.google.protobuf.GeneratedMessage.FieldAccessorTable
@@ -4753,57 +5229,64 @@ public final class UserBitShared {
   static {
     java.lang.String[] descriptorData = {
       "\n\023UserBitShared.proto\022\013exec.shared\032\022Coor" +
-      "dination.proto\032\017SchemaDef.proto\"\'\n\007Query" +
-      "Id\022\r\n\005part1\030\001 \001(\020\022\r\n\005part2\030\002 \001(\020\"\241\001\n\014Dri" +
-      "llPBError\022\020\n\010error_id\030\001 \001(\t\022(\n\010endpoint\030" +
-      "\002 \001(\0132\026.exec.DrillbitEndpoint\022\022\n\nerror_t" +
-      "ype\030\003 \001(\005\022\017\n\007message\030\004 \001(\t\0220\n\rparsing_er" +
-      "ror\030\005 \003(\0132\031.exec.shared.ParsingError\"\\\n\014" +
-      "ParsingError\022\024\n\014start_column\030\002 \001(\005\022\021\n\tst" +
-      "art_row\030\003 \001(\005\022\022\n\nend_column\030\004 \001(\005\022\017\n\007end" +
-      "_row\030\005 \001(\005\"p\n\016RecordBatchDef\022)\n\005field\030\001 ",
-      "\003(\0132\032.exec.shared.FieldMetadata\022\024\n\014recor" +
-      "d_count\030\002 \001(\005\022\035\n\025is_selection_vector_2\030\003" +
-      " \001(\010\"\261\001\n\rFieldMetadata\022\033\n\003def\030\001 \001(\0132\016.ex" +
-      "ec.FieldDef\022\023\n\013value_count\030\002 \001(\005\022\027\n\017var_" +
-      "byte_length\030\003 \001(\005\022\023\n\013group_count\030\004 \001(\005\022\025" +
-      "\n\rbuffer_length\030\005 \001(\005\022)\n\005child\030\006 \003(\0132\032.e" +
-      "xec.shared.FieldMetadata*5\n\nRpcChannel\022\017" +
-      "\n\013BIT_CONTROL\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004USER\020\002B" +
-      ".\n\033org.apache.drill.exec.protoB\rUserBitS" +
-      "haredH\001"
+      "dination.proto\032\017SchemaDef.proto\"$\n\017UserC" +
+      "redentials\022\021\n\tuser_name\030\001 \001(\t\"\'\n\007QueryId" +
+      "\022\r\n\005part1\030\001 \001(\020\022\r\n\005part2\030\002 \001(\020\"\241\001\n\014Drill" +
+      "PBError\022\020\n\010error_id\030\001 \001(\t\022(\n\010endpoint\030\002 " +
+      "\001(\0132\026.exec.DrillbitEndpoint\022\022\n\nerror_typ" +
+      "e\030\003 \001(\005\022\017\n\007message\030\004 \001(\t\0220\n\rparsing_erro" +
+      "r\030\005 \003(\0132\031.exec.shared.ParsingError\"\\\n\014Pa" +
+      "rsingError\022\024\n\014start_column\030\002 \001(\005\022\021\n\tstar" +
+      "t_row\030\003 \001(\005\022\022\n\nend_column\030\004 \001(\005\022\017\n\007end_r",
+      "ow\030\005 \001(\005\"p\n\016RecordBatchDef\022)\n\005field\030\001 \003(" +
+      "\0132\032.exec.shared.FieldMetadata\022\024\n\014record_" +
+      "count\030\002 \001(\005\022\035\n\025is_selection_vector_2\030\003 \001" +
+      "(\010\"\261\001\n\rFieldMetadata\022\033\n\003def\030\001 \001(\0132\016.exec" +
+      ".FieldDef\022\023\n\013value_count\030\002 \001(\005\022\027\n\017var_by" +
+      "te_length\030\003 \001(\005\022\023\n\013group_count\030\004 \001(\005\022\025\n\r" +
+      "buffer_length\030\005 \001(\005\022)\n\005child\030\006 \003(\0132\032.exe" +
+      "c.shared.FieldMetadata*5\n\nRpcChannel\022\017\n\013" +
+      "BIT_CONTROL\020\000\022\014\n\010BIT_DATA\020\001\022\010\n\004USER\020\002B.\n" +
+      "\033org.apache.drill.exec.protoB\rUserBitSha",
+      "redH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
         public com.google.protobuf.ExtensionRegistry assignDescriptors(
             com.google.protobuf.Descriptors.FileDescriptor root) {
           descriptor = root;
-          internal_static_exec_shared_QueryId_descriptor =
+          internal_static_exec_shared_UserCredentials_descriptor =
             getDescriptor().getMessageTypes().get(0);
+          internal_static_exec_shared_UserCredentials_fieldAccessorTable = new
+            com.google.protobuf.GeneratedMessage.FieldAccessorTable(
+              internal_static_exec_shared_UserCredentials_descriptor,
+              new java.lang.String[] { "UserName", });
+          internal_static_exec_shared_QueryId_descriptor =
+            getDescriptor().getMessageTypes().get(1);
           internal_static_exec_shared_QueryId_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_QueryId_descriptor,
               new java.lang.String[] { "Part1", "Part2", });
           internal_static_exec_shared_DrillPBError_descriptor =
-            getDescriptor().getMessageTypes().get(1);
+            getDescriptor().getMessageTypes().get(2);
           internal_static_exec_shared_DrillPBError_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_DrillPBError_descriptor,
               new java.lang.String[] { "ErrorId", "Endpoint", "ErrorType", "Message", "ParsingError", });
           internal_static_exec_shared_ParsingError_descriptor =
-            getDescriptor().getMessageTypes().get(2);
+            getDescriptor().getMessageTypes().get(3);
           internal_static_exec_shared_ParsingError_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_ParsingError_descriptor,
               new java.lang.String[] { "StartColumn", "StartRow", "EndColumn", "EndRow", });
           internal_static_exec_shared_RecordBatchDef_descriptor =
-            getDescriptor().getMessageTypes().get(3);
+            getDescriptor().getMessageTypes().get(4);
           internal_static_exec_shared_RecordBatchDef_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_RecordBatchDef_descriptor,
               new java.lang.String[] { "Field", "RecordCount", "IsSelectionVector2", });
           internal_static_exec_shared_FieldMetadata_descriptor =
-            getDescriptor().getMessageTypes().get(4);
+            getDescriptor().getMessageTypes().get(5);
           internal_static_exec_shared_FieldMetadata_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_shared_FieldMetadata_descriptor,

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
----------------------------------------------------------------------
diff --git a/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java b/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
index b8efa84..f8729a9 100644
--- a/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
+++ b/protocol/src/main/java/org/apache/drill/exec/proto/UserProtos.java
@@ -403,6 +403,20 @@ public final class UserProtos {
      * <code>optional int32 rpc_version = 3;</code>
      */
     int getRpcVersion();
+
+    // optional .exec.shared.UserCredentials credentials = 4;
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+     */
+    boolean hasCredentials();
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+     */
+    org.apache.drill.exec.proto.UserBitShared.UserCredentials getCredentials();
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+     */
+    org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder getCredentialsOrBuilder();
   }
   /**
    * Protobuf type {@code exec.user.UserToBitHandshake}
@@ -476,6 +490,19 @@ public final class UserProtos {
               rpcVersion_ = input.readInt32();
               break;
             }
+            case 34: {
+              org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder subBuilder = null;
+              if (((bitField0_ & 0x00000008) == 0x00000008)) {
+                subBuilder = credentials_.toBuilder();
+              }
+              credentials_ = input.readMessage(org.apache.drill.exec.proto.UserBitShared.UserCredentials.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(credentials_);
+                credentials_ = subBuilder.buildPartial();
+              }
+              bitField0_ |= 0x00000008;
+              break;
+            }
           }
         }
       } catch (com.google.protobuf.InvalidProtocolBufferException e) {
@@ -564,10 +591,33 @@ public final class UserProtos {
       return rpcVersion_;
     }
 
+    // optional .exec.shared.UserCredentials credentials = 4;
+    public static final int CREDENTIALS_FIELD_NUMBER = 4;
+    private org.apache.drill.exec.proto.UserBitShared.UserCredentials credentials_;
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+     */
+    public boolean hasCredentials() {
+      return ((bitField0_ & 0x00000008) == 0x00000008);
+    }
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+     */
+    public org.apache.drill.exec.proto.UserBitShared.UserCredentials getCredentials() {
+      return credentials_;
+    }
+    /**
+     * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+     */
+    public org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder getCredentialsOrBuilder() {
+      return credentials_;
+    }
+
     private void initFields() {
       channel_ = org.apache.drill.exec.proto.UserBitShared.RpcChannel.USER;
       supportListening_ = false;
       rpcVersion_ = 0;
+      credentials_ = org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
     }
     private byte memoizedIsInitialized = -1;
     public final boolean isInitialized() {
@@ -590,6 +640,9 @@ public final class UserProtos {
       if (((bitField0_ & 0x00000004) == 0x00000004)) {
         output.writeInt32(3, rpcVersion_);
       }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        output.writeMessage(4, credentials_);
+      }
       getUnknownFields().writeTo(output);
     }
 
@@ -611,6 +664,10 @@ public final class UserProtos {
         size += com.google.protobuf.CodedOutputStream
           .computeInt32Size(3, rpcVersion_);
       }
+      if (((bitField0_ & 0x00000008) == 0x00000008)) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(4, credentials_);
+      }
       size += getUnknownFields().getSerializedSize();
       memoizedSerializedSize = size;
       return size;
@@ -719,6 +776,7 @@ public final class UserProtos {
       }
       private void maybeForceBuilderInitialization() {
         if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+          getCredentialsFieldBuilder();
         }
       }
       private static Builder create() {
@@ -733,6 +791,12 @@ public final class UserProtos {
         bitField0_ = (bitField0_ & ~0x00000002);
         rpcVersion_ = 0;
         bitField0_ = (bitField0_ & ~0x00000004);
+        if (credentialsBuilder_ == null) {
+          credentials_ = org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
+        } else {
+          credentialsBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000008);
         return this;
       }
 
@@ -773,6 +837,14 @@ public final class UserProtos {
           to_bitField0_ |= 0x00000004;
         }
         result.rpcVersion_ = rpcVersion_;
+        if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
+          to_bitField0_ |= 0x00000008;
+        }
+        if (credentialsBuilder_ == null) {
+          result.credentials_ = credentials_;
+        } else {
+          result.credentials_ = credentialsBuilder_.build();
+        }
         result.bitField0_ = to_bitField0_;
         onBuilt();
         return result;
@@ -798,6 +870,9 @@ public final class UserProtos {
         if (other.hasRpcVersion()) {
           setRpcVersion(other.getRpcVersion());
         }
+        if (other.hasCredentials()) {
+          mergeCredentials(other.getCredentials());
+        }
         this.mergeUnknownFields(other.getUnknownFields());
         return this;
       }
@@ -927,6 +1002,123 @@ public final class UserProtos {
         return this;
       }
 
+      // optional .exec.shared.UserCredentials credentials = 4;
+      private org.apache.drill.exec.proto.UserBitShared.UserCredentials credentials_ = org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.drill.exec.proto.UserBitShared.UserCredentials, org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder, org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder> credentialsBuilder_;
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+       */
+      public boolean hasCredentials() {
+        return ((bitField0_ & 0x00000008) == 0x00000008);
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+       */
+      public org.apache.drill.exec.proto.UserBitShared.UserCredentials getCredentials() {
+        if (credentialsBuilder_ == null) {
+          return credentials_;
+        } else {
+          return credentialsBuilder_.getMessage();
+        }
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+       */
+      public Builder setCredentials(org.apache.drill.exec.proto.UserBitShared.UserCredentials value) {
+        if (credentialsBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          credentials_ = value;
+          onChanged();
+        } else {
+          credentialsBuilder_.setMessage(value);
+        }
+        bitField0_ |= 0x00000008;
+        return this;
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+       */
+      public Builder setCredentials(
+          org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder builderForValue) {
+        if (credentialsBuilder_ == null) {
+          credentials_ = builderForValue.build();
+          onChanged();
+        } else {
+          credentialsBuilder_.setMessage(builderForValue.build());
+        }
+        bitField0_ |= 0x00000008;
+        return this;
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+       */
+      public Builder mergeCredentials(org.apache.drill.exec.proto.UserBitShared.UserCredentials value) {
+        if (credentialsBuilder_ == null) {
+          if (((bitField0_ & 0x00000008) == 0x00000008) &&
+              credentials_ != org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance()) {
+            credentials_ =
+              org.apache.drill.exec.proto.UserBitShared.UserCredentials.newBuilder(credentials_).mergeFrom(value).buildPartial();
+          } else {
+            credentials_ = value;
+          }
+          onChanged();
+        } else {
+          credentialsBuilder_.mergeFrom(value);
+        }
+        bitField0_ |= 0x00000008;
+        return this;
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+       */
+      public Builder clearCredentials() {
+        if (credentialsBuilder_ == null) {
+          credentials_ = org.apache.drill.exec.proto.UserBitShared.UserCredentials.getDefaultInstance();
+          onChanged();
+        } else {
+          credentialsBuilder_.clear();
+        }
+        bitField0_ = (bitField0_ & ~0x00000008);
+        return this;
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+       */
+      public org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder getCredentialsBuilder() {
+        bitField0_ |= 0x00000008;
+        onChanged();
+        return getCredentialsFieldBuilder().getBuilder();
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+       */
+      public org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder getCredentialsOrBuilder() {
+        if (credentialsBuilder_ != null) {
+          return credentialsBuilder_.getMessageOrBuilder();
+        } else {
+          return credentials_;
+        }
+      }
+      /**
+       * <code>optional .exec.shared.UserCredentials credentials = 4;</code>
+       */
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.drill.exec.proto.UserBitShared.UserCredentials, org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder, org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder> 
+          getCredentialsFieldBuilder() {
+        if (credentialsBuilder_ == null) {
+          credentialsBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+              org.apache.drill.exec.proto.UserBitShared.UserCredentials, org.apache.drill.exec.proto.UserBitShared.UserCredentials.Builder, org.apache.drill.exec.proto.UserBitShared.UserCredentialsOrBuilder>(
+                  credentials_,
+                  getParentForChildren(),
+                  isClean());
+          credentials_ = null;
+        }
+        return credentialsBuilder_;
+      }
+
       // @@protoc_insertion_point(builder_scope:exec.user.UserToBitHandshake)
     }
 
@@ -5207,37 +5399,39 @@ public final class UserProtos {
   static {
     java.lang.String[] descriptorData = {
       "\n\nUser.proto\022\texec.user\032\017SchemaDef.proto" +
-      "\032\023UserBitShared.proto\"t\n\022UserToBitHandsh" +
-      "ake\022.\n\007channel\030\001 \001(\0162\027.exec.shared.RpcCh" +
-      "annel:\004USER\022\031\n\021support_listening\030\002 \001(\010\022\023" +
-      "\n\013rpc_version\030\003 \001(\005\"S\n\016RequestResults\022&\n" +
-      "\010query_id\030\001 \001(\0132\024.exec.shared.QueryId\022\031\n" +
-      "\021maximum_responses\030\002 \001(\005\"o\n\010RunQuery\0221\n\014" +
-      "results_mode\030\001 \001(\0162\033.exec.user.QueryResu" +
-      "ltsMode\022\"\n\004type\030\002 \001(\0162\024.exec.user.QueryT" +
-      "ype\022\014\n\004plan\030\003 \001(\t\")\n\022BitToUserHandshake\022",
-      "\023\n\013rpc_version\030\002 \001(\005\"7\n\nNodeStatus\022\017\n\007no" +
-      "de_id\030\001 \001(\005\022\030\n\020memory_footprint\030\002 \001(\003\"\331\003" +
-      "\n\013QueryResult\0226\n\013query_state\030\001 \001(\0162!.exe" +
-      "c.user.QueryResult.QueryState\022&\n\010query_i" +
-      "d\030\002 \001(\0132\024.exec.shared.QueryId\022\025\n\ris_last" +
-      "_chunk\030\003 \001(\010\022\021\n\trow_count\030\004 \001(\005\022\024\n\014recor" +
-      "ds_scan\030\005 \001(\003\022\025\n\rrecords_error\030\006 \001(\003\022\027\n\017" +
-      "submission_time\030\007 \001(\003\022*\n\013node_status\030\010 \003" +
-      "(\0132\025.exec.user.NodeStatus\022(\n\005error\030\t \003(\013" +
-      "2\031.exec.shared.DrillPBError\022(\n\003def\030\n \001(\013",
-      "2\033.exec.shared.RecordBatchDef\022\026\n\016schema_" +
-      "changed\030\013 \001(\010\"b\n\nQueryState\022\013\n\007PENDING\020\000" +
-      "\022\013\n\007RUNNING\020\001\022\r\n\tCOMPLETED\020\002\022\014\n\010CANCELED" +
-      "\020\003\022\n\n\006FAILED\020\004\022\021\n\rUNKNOWN_QUERY\020\005*\270\001\n\007Rp" +
-      "cType\022\r\n\tHANDSHAKE\020\000\022\007\n\003ACK\020\001\022\013\n\007GOODBYE" +
-      "\020\002\022\r\n\tRUN_QUERY\020\003\022\020\n\014CANCEL_QUERY\020\004\022\023\n\017R" +
-      "EQUEST_RESULTS\020\005\022\020\n\014QUERY_RESULT\020\006\022\020\n\014QU" +
-      "ERY_HANDLE\020\007\022\026\n\022REQ_META_FUNCTIONS\020\010\022\026\n\022" +
-      "RESP_FUNCTION_LIST\020\t*/\n\tQueryType\022\007\n\003SQL" +
-      "\020\001\022\013\n\007LOGICAL\020\002\022\014\n\010PHYSICAL\020\003*#\n\020QueryRe",
-      "sultsMode\022\017\n\013STREAM_FULL\020\001B+\n\033org.apache" +
-      ".drill.exec.protoB\nUserProtosH\001"
+      "\032\023UserBitShared.proto\"\247\001\n\022UserToBitHands" +
+      "hake\022.\n\007channel\030\001 \001(\0162\027.exec.shared.RpcC" +
+      "hannel:\004USER\022\031\n\021support_listening\030\002 \001(\010\022" +
+      "\023\n\013rpc_version\030\003 \001(\005\0221\n\013credentials\030\004 \001(" +
+      "\0132\034.exec.shared.UserCredentials\"S\n\016Reque" +
+      "stResults\022&\n\010query_id\030\001 \001(\0132\024.exec.share" +
+      "d.QueryId\022\031\n\021maximum_responses\030\002 \001(\005\"o\n\010" +
+      "RunQuery\0221\n\014results_mode\030\001 \001(\0162\033.exec.us" +
+      "er.QueryResultsMode\022\"\n\004type\030\002 \001(\0162\024.exec",
+      ".user.QueryType\022\014\n\004plan\030\003 \001(\t\")\n\022BitToUs" +
+      "erHandshake\022\023\n\013rpc_version\030\002 \001(\005\"7\n\nNode" +
+      "Status\022\017\n\007node_id\030\001 \001(\005\022\030\n\020memory_footpr" +
+      "int\030\002 \001(\003\"\331\003\n\013QueryResult\0226\n\013query_state" +
+      "\030\001 \001(\0162!.exec.user.QueryResult.QueryStat" +
+      "e\022&\n\010query_id\030\002 \001(\0132\024.exec.shared.QueryI" +
+      "d\022\025\n\ris_last_chunk\030\003 \001(\010\022\021\n\trow_count\030\004 " +
+      "\001(\005\022\024\n\014records_scan\030\005 \001(\003\022\025\n\rrecords_err" +
+      "or\030\006 \001(\003\022\027\n\017submission_time\030\007 \001(\003\022*\n\013nod" +
+      "e_status\030\010 \003(\0132\025.exec.user.NodeStatus\022(\n",
+      "\005error\030\t \003(\0132\031.exec.shared.DrillPBError\022" +
+      "(\n\003def\030\n \001(\0132\033.exec.shared.RecordBatchDe" +
+      "f\022\026\n\016schema_changed\030\013 \001(\010\"b\n\nQueryState\022" +
+      "\013\n\007PENDING\020\000\022\013\n\007RUNNING\020\001\022\r\n\tCOMPLETED\020\002" +
+      "\022\014\n\010CANCELED\020\003\022\n\n\006FAILED\020\004\022\021\n\rUNKNOWN_QU" +
+      "ERY\020\005*\270\001\n\007RpcType\022\r\n\tHANDSHAKE\020\000\022\007\n\003ACK\020" +
+      "\001\022\013\n\007GOODBYE\020\002\022\r\n\tRUN_QUERY\020\003\022\020\n\014CANCEL_" +
+      "QUERY\020\004\022\023\n\017REQUEST_RESULTS\020\005\022\020\n\014QUERY_RE" +
+      "SULT\020\006\022\020\n\014QUERY_HANDLE\020\007\022\026\n\022REQ_META_FUN" +
+      "CTIONS\020\010\022\026\n\022RESP_FUNCTION_LIST\020\t*/\n\tQuer",
+      "yType\022\007\n\003SQL\020\001\022\013\n\007LOGICAL\020\002\022\014\n\010PHYSICAL\020" +
+      "\003*#\n\020QueryResultsMode\022\017\n\013STREAM_FULL\020\001B+" +
+      "\n\033org.apache.drill.exec.protoB\nUserProto" +
+      "sH\001"
     };
     com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner =
       new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() {
@@ -5249,7 +5443,7 @@ public final class UserProtos {
           internal_static_exec_user_UserToBitHandshake_fieldAccessorTable = new
             com.google.protobuf.GeneratedMessage.FieldAccessorTable(
               internal_static_exec_user_UserToBitHandshake_descriptor,
-              new java.lang.String[] { "Channel", "SupportListening", "RpcVersion", });
+              new java.lang.String[] { "Channel", "SupportListening", "RpcVersion", "Credentials", });
           internal_static_exec_user_RequestResults_descriptor =
             getDescriptor().getMessageTypes().get(1);
           internal_static_exec_user_RequestResults_fieldAccessorTable = new

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/protocol/src/main/protobuf/BitControl.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/BitControl.proto b/protocol/src/main/protobuf/BitControl.proto
index 95ec7e0..25cae11 100644
--- a/protocol/src/main/protobuf/BitControl.proto
+++ b/protocol/src/main/protobuf/BitControl.proto
@@ -75,6 +75,7 @@ message PlanFragment {
   optional int64 mem_initial = 12 [default = 20000000]; // 20 megs
   optional int64 mem_max = 13 [default = 20000000000]; // 20 gigs
   optional int64 query_start_time = 14; // start time of query in milliseconds
+  optional exec.shared.UserCredentials credentials = 15; 
 }
 
 message WorkQueueStatus{

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/protocol/src/main/protobuf/User.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/User.proto b/protocol/src/main/protobuf/User.proto
index 3bbe039..78447f7 100644
--- a/protocol/src/main/protobuf/User.proto
+++ b/protocol/src/main/protobuf/User.proto
@@ -35,8 +35,10 @@ message UserToBitHandshake {
   optional exec.shared.RpcChannel channel = 1 [default = USER];
   optional bool support_listening = 2;
   optional int32 rpc_version = 3;
+  optional exec.shared.UserCredentials credentials = 4;
 }
 
+
 message RequestResults {
   optional exec.shared.QueryId query_id = 1;
   optional int32 maximum_responses = 2;

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/protocol/src/main/protobuf/UserBitShared.proto
----------------------------------------------------------------------
diff --git a/protocol/src/main/protobuf/UserBitShared.proto b/protocol/src/main/protobuf/UserBitShared.proto
index d75a7f9..0eaa163 100644
--- a/protocol/src/main/protobuf/UserBitShared.proto
+++ b/protocol/src/main/protobuf/UserBitShared.proto
@@ -13,6 +13,10 @@ enum RpcChannel {
   USER = 2;
 }
 
+message UserCredentials {
+  optional string user_name = 1;
+}
+
 message QueryId {
   optional sfixed64 part1 = 1;
   optional sfixed64 part2 = 2;
@@ -46,4 +50,4 @@ message FieldMetadata {
   optional int32 group_count = 4; // number of groups.  (number of repeated records)
   optional int32 buffer_length = 5;
   repeated FieldMetadata child = 6;
-}
\ No newline at end of file
+}

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/sqlparser/pom.xml
----------------------------------------------------------------------
diff --git a/sqlparser/pom.xml b/sqlparser/pom.xml
index c32eb0b..3ba557c 100644
--- a/sqlparser/pom.xml
+++ b/sqlparser/pom.xml
@@ -79,6 +79,14 @@
   <build>
     <plugins>
       <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-surefire-plugin</artifactId>
+        <configuration>
+            <forkCount>1</forkCount>
+            <reuseForks>true</reuseForks>
+        </configuration>
+      </plugin>
+      <plugin>
         <groupId>org.apache.rat</groupId>
         <artifactId>apache-rat-plugin</artifactId>
         <inherited>true</inherited>

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/sqlparser/src/main/java/org/apache/drill/jdbc/DrillColumnMetaDataList.java
----------------------------------------------------------------------
diff --git a/sqlparser/src/main/java/org/apache/drill/jdbc/DrillColumnMetaDataList.java b/sqlparser/src/main/java/org/apache/drill/jdbc/DrillColumnMetaDataList.java
index 5119212..25d6226 100644
--- a/sqlparser/src/main/java/org/apache/drill/jdbc/DrillColumnMetaDataList.java
+++ b/sqlparser/src/main/java/org/apache/drill/jdbc/DrillColumnMetaDataList.java
@@ -33,17 +33,17 @@ public class DrillColumnMetaDataList extends BasicList<ColumnMetaData>{
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(DrillColumnMetaDataList.class);
 
   private ColumnMetaData[] columns = new ColumnMetaData[0];
-  
+
   @Override
   public int size() {
     return columns.length;
   }
-  
+
   @Override
   public ColumnMetaData get(int index) {
     return columns[index];
   }
-  
+
   public void updateColumnMetaData(String catalogName, String schemaName, String tableName, BatchSchema schema){
 
     columns = new ColumnMetaData[schema.getFieldCount()];
@@ -56,11 +56,11 @@ public class DrillColumnMetaDataList extends BasicList<ColumnMetaData>{
           true, // caseSensitive
           false, // searchable
           false, // currency
-          f.getDataMode() == DataMode.OPTIONAL ? ResultSetMetaData.columnNullable : ResultSetMetaData.columnNoNulls, //nullability 
+          f.getDataMode() == DataMode.OPTIONAL ? ResultSetMetaData.columnNullable : ResultSetMetaData.columnNoNulls, //nullability
           !Types.isUnSigned(t), // signed
           10, // display size.
-          f.getName(), // label
-          f.getName(), // columnname
+          f.getAsSchemaPath().getRootSegment().getPath(), // label
+          f.getAsSchemaPath().getRootSegment().getPath(), // columnname
           schemaName, // schemaname
           t.hasPrecision() ? t.getPrecision() : 0, // precision
           t.hasScale() ? t.getScale() : 0, // scale
@@ -77,5 +77,5 @@ public class DrillColumnMetaDataList extends BasicList<ColumnMetaData>{
       columns[i] =col;
     }
   }
-  
+
 }

http://git-wip-us.apache.org/repos/asf/incubator-drill/blob/ecaa838f/sqlparser/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
----------------------------------------------------------------------
diff --git a/sqlparser/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java b/sqlparser/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
index e6027fc..e2666f8 100644
--- a/sqlparser/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
+++ b/sqlparser/src/test/java/org/apache/drill/jdbc/test/TestJdbcQuery.java
@@ -39,7 +39,7 @@ import com.google.common.base.Stopwatch;
 public class TestJdbcQuery {
   static final org.slf4j.Logger logger = org.slf4j.LoggerFactory.getLogger(TestJdbcQuery.class);
 
-  
+
   // Set a timeout unless we're debugging.
   @Rule public TestRule TIMEOUT = TestTools.getTimeoutRule(200000000);
 
@@ -47,14 +47,14 @@ public class TestJdbcQuery {
   static{
     Driver.load();
     WORKING_PATH = Paths.get("").toAbsolutePath().toString();
-    
+
   }
-  
+
   @BeforeClass
   public static void generateHive() throws Exception{
     new HiveTestDataGenerator().generateTestData();
   }
-  
+
   @Test
   @Ignore
   public void testHiveRead() throws Exception{
@@ -73,6 +73,7 @@ public class TestJdbcQuery {
     testQuery("select * from cp.`employee.json`");
   }
 
+
   @Test
   public void testInfoSchema() throws Exception{
 //    testQuery("select * from INFORMATION_SCHEMA.SCHEMATA");
@@ -81,19 +82,19 @@ public class TestJdbcQuery {
 //    testQuery("select * from INFORMATION_SCHEMA.TABLES");
 //    testQuery("select * from INFORMATION_SCHEMA.COLUMNS");
   }
-  
-  @Test 
+
+  @Test
   public void testCast() throws Exception{
-    testQuery(String.format("select R_REGIONKEY, cast(R_NAME as varchar(15)) as region, cast(R_COMMENT as varchar(255)) as comment from dfs.`%s/../sample-data/region.parquet`", WORKING_PATH));    
+    testQuery(String.format("select R_REGIONKEY, cast(R_NAME as varchar(15)) as region, cast(R_COMMENT as varchar(255)) as comment from dfs.`%s/../sample-data/region.parquet`", WORKING_PATH));
   }
 
-  @Test 
+  @Test
   @Ignore
   public void testWorkspace() throws Exception{
     testQuery(String.format("select * from dfs.home.`%s/../sample-data/region.parquet`", WORKING_PATH));
   }
 
-  @Test 
+  @Test
   @Ignore
   public void testWildcard() throws Exception{
     testQuery(String.format("select * from dfs.`%s/../sample-data/region.parquet`", WORKING_PATH));
@@ -109,25 +110,24 @@ public class TestJdbcQuery {
     testQuery(String.format("select cast('test literal' as VARCHAR) from INFORMATION_SCHEMA.TABLES LIMIT 1"));
   }
 
-  @Test 
+  @Test
   @Ignore
   public void testLogicalExplain() throws Exception{
     testQuery(String.format("EXPLAIN PLAN WITHOUT IMPLEMENTATION FOR select * from dfs.`%s/../sample-data/region.parquet`", WORKING_PATH));
   }
 
-  @Test 
+  @Test
   @Ignore
   public void testPhysicalExplain() throws Exception{
     testQuery(String.format("EXPLAIN PLAN FOR select * from dfs.`%s/../sample-data/region.parquet`", WORKING_PATH));
   }
-  
-  @Test 
+
+  @Test
   @Ignore
   public void checkUnknownColumn() throws Exception{
     testQuery(String.format("SELECT unknownColumn FROM dfs.`%s/../sample-data/region.parquet`", WORKING_PATH));
   }
 
-  
   private void testQuery(String sql) throws Exception{
     boolean success = false;
     try (Connection c = DriverManager.getConnection("jdbc:drill:zk=local", null);) {