calcite-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jh...@apache.org
Subject [6/8] incubator-calcite git commit: [CALCITE-840] Protocol buffer serialization over HTTP for Avatica Server (Josh Elser)
Date Thu, 17 Sep 2015 00:10:52 GMT
http://git-wip-us.apache.org/repos/asf/incubator-calcite/blob/cb7c213c/avatica/src/main/java/org/apache/calcite/avatica/proto/Common.java
----------------------------------------------------------------------
diff --git a/avatica/src/main/java/org/apache/calcite/avatica/proto/Common.java b/avatica/src/main/java/org/apache/calcite/avatica/proto/Common.java
new file mode 100644
index 0000000..9bd6989
--- /dev/null
+++ b/avatica/src/main/java/org/apache/calcite/avatica/proto/Common.java
@@ -0,0 +1,12364 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to you under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+// Generated by the protocol buffer compiler.  DO NOT EDIT!
+// source: common.proto
+
+package org.apache.calcite.avatica.proto;
+
+@SuppressWarnings({"unused", "rawtypes"}) public final class Common {
+  private Common() {}
+  public static void registerAllExtensions(
+      com.google.protobuf.ExtensionRegistry registry) {
+  }
+  /**
+   * Protobuf enum {@code Rep}
+   */
+  public enum Rep
+      implements com.google.protobuf.ProtocolMessageEnum {
+    /**
+     * <code>PRIMITIVE_BOOLEAN = 0;</code>
+     */
+    PRIMITIVE_BOOLEAN(0, 0),
+    /**
+     * <code>PRIMITIVE_BYTE = 1;</code>
+     */
+    PRIMITIVE_BYTE(1, 1),
+    /**
+     * <code>PRIMITIVE_CHAR = 2;</code>
+     */
+    PRIMITIVE_CHAR(2, 2),
+    /**
+     * <code>PRIMITIVE_SHORT = 3;</code>
+     */
+    PRIMITIVE_SHORT(3, 3),
+    /**
+     * <code>PRIMITIVE_INT = 4;</code>
+     */
+    PRIMITIVE_INT(4, 4),
+    /**
+     * <code>PRIMITIVE_LONG = 5;</code>
+     */
+    PRIMITIVE_LONG(5, 5),
+    /**
+     * <code>PRIMITIVE_FLOAT = 6;</code>
+     */
+    PRIMITIVE_FLOAT(6, 6),
+    /**
+     * <code>PRIMITIVE_DOUBLE = 7;</code>
+     */
+    PRIMITIVE_DOUBLE(7, 7),
+    /**
+     * <code>BOOLEAN = 8;</code>
+     */
+    BOOLEAN(8, 8),
+    /**
+     * <code>BYTE = 9;</code>
+     */
+    BYTE(9, 9),
+    /**
+     * <code>CHARACTER = 10;</code>
+     */
+    CHARACTER(10, 10),
+    /**
+     * <code>SHORT = 11;</code>
+     */
+    SHORT(11, 11),
+    /**
+     * <code>INTEGER = 12;</code>
+     */
+    INTEGER(12, 12),
+    /**
+     * <code>LONG = 13;</code>
+     */
+    LONG(13, 13),
+    /**
+     * <code>FLOAT = 14;</code>
+     */
+    FLOAT(14, 14),
+    /**
+     * <code>DOUBLE = 15;</code>
+     */
+    DOUBLE(15, 15),
+    /**
+     * <code>BIG_INTEGER = 25;</code>
+     */
+    BIG_INTEGER(16, 25),
+    /**
+     * <code>BIG_DECIMAL = 26;</code>
+     */
+    BIG_DECIMAL(17, 26),
+    /**
+     * <code>JAVA_SQL_TIME = 16;</code>
+     */
+    JAVA_SQL_TIME(18, 16),
+    /**
+     * <code>JAVA_SQL_TIMESTAMP = 17;</code>
+     */
+    JAVA_SQL_TIMESTAMP(19, 17),
+    /**
+     * <code>JAVA_SQL_DATE = 18;</code>
+     */
+    JAVA_SQL_DATE(20, 18),
+    /**
+     * <code>JAVA_UTIL_DATE = 19;</code>
+     */
+    JAVA_UTIL_DATE(21, 19),
+    /**
+     * <code>BYTE_STRING = 20;</code>
+     */
+    BYTE_STRING(22, 20),
+    /**
+     * <code>STRING = 21;</code>
+     */
+    STRING(23, 21),
+    /**
+     * <code>NUMBER = 22;</code>
+     */
+    NUMBER(24, 22),
+    /**
+     * <code>OBJECT = 23;</code>
+     */
+    OBJECT(25, 23),
+    /**
+     * <code>NULL = 24;</code>
+     */
+    NULL(26, 24),
+    UNRECOGNIZED(-1, -1),
+    ;
+
+    /**
+     * <code>PRIMITIVE_BOOLEAN = 0;</code>
+     */
+    public static final int PRIMITIVE_BOOLEAN_VALUE = 0;
+    /**
+     * <code>PRIMITIVE_BYTE = 1;</code>
+     */
+    public static final int PRIMITIVE_BYTE_VALUE = 1;
+    /**
+     * <code>PRIMITIVE_CHAR = 2;</code>
+     */
+    public static final int PRIMITIVE_CHAR_VALUE = 2;
+    /**
+     * <code>PRIMITIVE_SHORT = 3;</code>
+     */
+    public static final int PRIMITIVE_SHORT_VALUE = 3;
+    /**
+     * <code>PRIMITIVE_INT = 4;</code>
+     */
+    public static final int PRIMITIVE_INT_VALUE = 4;
+    /**
+     * <code>PRIMITIVE_LONG = 5;</code>
+     */
+    public static final int PRIMITIVE_LONG_VALUE = 5;
+    /**
+     * <code>PRIMITIVE_FLOAT = 6;</code>
+     */
+    public static final int PRIMITIVE_FLOAT_VALUE = 6;
+    /**
+     * <code>PRIMITIVE_DOUBLE = 7;</code>
+     */
+    public static final int PRIMITIVE_DOUBLE_VALUE = 7;
+    /**
+     * <code>BOOLEAN = 8;</code>
+     */
+    public static final int BOOLEAN_VALUE = 8;
+    /**
+     * <code>BYTE = 9;</code>
+     */
+    public static final int BYTE_VALUE = 9;
+    /**
+     * <code>CHARACTER = 10;</code>
+     */
+    public static final int CHARACTER_VALUE = 10;
+    /**
+     * <code>SHORT = 11;</code>
+     */
+    public static final int SHORT_VALUE = 11;
+    /**
+     * <code>INTEGER = 12;</code>
+     */
+    public static final int INTEGER_VALUE = 12;
+    /**
+     * <code>LONG = 13;</code>
+     */
+    public static final int LONG_VALUE = 13;
+    /**
+     * <code>FLOAT = 14;</code>
+     */
+    public static final int FLOAT_VALUE = 14;
+    /**
+     * <code>DOUBLE = 15;</code>
+     */
+    public static final int DOUBLE_VALUE = 15;
+    /**
+     * <code>BIG_INTEGER = 25;</code>
+     */
+    public static final int BIG_INTEGER_VALUE = 25;
+    /**
+     * <code>BIG_DECIMAL = 26;</code>
+     */
+    public static final int BIG_DECIMAL_VALUE = 26;
+    /**
+     * <code>JAVA_SQL_TIME = 16;</code>
+     */
+    public static final int JAVA_SQL_TIME_VALUE = 16;
+    /**
+     * <code>JAVA_SQL_TIMESTAMP = 17;</code>
+     */
+    public static final int JAVA_SQL_TIMESTAMP_VALUE = 17;
+    /**
+     * <code>JAVA_SQL_DATE = 18;</code>
+     */
+    public static final int JAVA_SQL_DATE_VALUE = 18;
+    /**
+     * <code>JAVA_UTIL_DATE = 19;</code>
+     */
+    public static final int JAVA_UTIL_DATE_VALUE = 19;
+    /**
+     * <code>BYTE_STRING = 20;</code>
+     */
+    public static final int BYTE_STRING_VALUE = 20;
+    /**
+     * <code>STRING = 21;</code>
+     */
+    public static final int STRING_VALUE = 21;
+    /**
+     * <code>NUMBER = 22;</code>
+     */
+    public static final int NUMBER_VALUE = 22;
+    /**
+     * <code>OBJECT = 23;</code>
+     */
+    public static final int OBJECT_VALUE = 23;
+    /**
+     * <code>NULL = 24;</code>
+     */
+    public static final int NULL_VALUE = 24;
+
+
+    public final int getNumber() {
+      if (index == -1) {
+        throw new java.lang.IllegalArgumentException(
+            "Can't get the number of an unknown enum value.");
+      }
+      return value;
+    }
+
+    public static Rep valueOf(int value) {
+      switch (value) {
+        case 0: return PRIMITIVE_BOOLEAN;
+        case 1: return PRIMITIVE_BYTE;
+        case 2: return PRIMITIVE_CHAR;
+        case 3: return PRIMITIVE_SHORT;
+        case 4: return PRIMITIVE_INT;
+        case 5: return PRIMITIVE_LONG;
+        case 6: return PRIMITIVE_FLOAT;
+        case 7: return PRIMITIVE_DOUBLE;
+        case 8: return BOOLEAN;
+        case 9: return BYTE;
+        case 10: return CHARACTER;
+        case 11: return SHORT;
+        case 12: return INTEGER;
+        case 13: return LONG;
+        case 14: return FLOAT;
+        case 15: return DOUBLE;
+        case 25: return BIG_INTEGER;
+        case 26: return BIG_DECIMAL;
+        case 16: return JAVA_SQL_TIME;
+        case 17: return JAVA_SQL_TIMESTAMP;
+        case 18: return JAVA_SQL_DATE;
+        case 19: return JAVA_UTIL_DATE;
+        case 20: return BYTE_STRING;
+        case 21: return STRING;
+        case 22: return NUMBER;
+        case 23: return OBJECT;
+        case 24: return NULL;
+        default: return null;
+      }
+    }
+
+    public static com.google.protobuf.Internal.EnumLiteMap<Rep>
+        internalGetValueMap() {
+      return internalValueMap;
+    }
+    private static com.google.protobuf.Internal.EnumLiteMap<Rep>
+        internalValueMap =
+          new com.google.protobuf.Internal.EnumLiteMap<Rep>() {
+            public Rep findValueByNumber(int number) {
+              return Rep.valueOf(number);
+            }
+          };
+
+    public final com.google.protobuf.Descriptors.EnumValueDescriptor
+        getValueDescriptor() {
+      return getDescriptor().getValues().get(index);
+    }
+    public final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptorForType() {
+      return getDescriptor();
+    }
+    public static final com.google.protobuf.Descriptors.EnumDescriptor
+        getDescriptor() {
+      return org.apache.calcite.avatica.proto.Common.getDescriptor().getEnumTypes().get(0);
+    }
+
+    private static final Rep[] VALUES = values();
+
+    public static Rep valueOf(
+        com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
+      if (desc.getType() != getDescriptor()) {
+        throw new java.lang.IllegalArgumentException(
+          "EnumValueDescriptor is not for this type.");
+      }
+      if (desc.getIndex() == -1) {
+        return UNRECOGNIZED;
+      }
+      return VALUES[desc.getIndex()];
+    }
+
+    private final int index;
+    private final int value;
+
+    private Rep(int index, int value) {
+      this.index = index;
+      this.value = value;
+    }
+
+    // @@protoc_insertion_point(enum_scope:Rep)
+  }
+
+  public interface ConnectionPropertiesOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:ConnectionProperties)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * <code>optional bool is_dirty = 1;</code>
+     */
+    boolean getIsDirty();
+
+    /**
+     * <code>optional bool auto_commit = 2;</code>
+     */
+    boolean getAutoCommit();
+
+    /**
+     * <code>optional bool has_auto_commit = 7;</code>
+     *
+     * <pre>
+     * field is a Boolean, need to discern null and default value
+     * </pre>
+     */
+    boolean getHasAutoCommit();
+
+    /**
+     * <code>optional bool read_only = 3;</code>
+     */
+    boolean getReadOnly();
+
+    /**
+     * <code>optional bool has_read_only = 8;</code>
+     *
+     * <pre>
+     * field is a Boolean, need to discern null and default value
+     * </pre>
+     */
+    boolean getHasReadOnly();
+
+    /**
+     * <code>optional uint32 transaction_isolation = 4;</code>
+     */
+    int getTransactionIsolation();
+
+    /**
+     * <code>optional string catalog = 5;</code>
+     */
+    java.lang.String getCatalog();
+    /**
+     * <code>optional string catalog = 5;</code>
+     */
+    com.google.protobuf.ByteString
+        getCatalogBytes();
+
+    /**
+     * <code>optional string schema = 6;</code>
+     */
+    java.lang.String getSchema();
+    /**
+     * <code>optional string schema = 6;</code>
+     */
+    com.google.protobuf.ByteString
+        getSchemaBytes();
+  }
+  /**
+   * Protobuf type {@code ConnectionProperties}
+   *
+   * <pre>
+   * Details about a connection
+   * </pre>
+   */
+  public  static final class ConnectionProperties extends
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:ConnectionProperties)
+      ConnectionPropertiesOrBuilder {
+    // Use ConnectionProperties.newBuilder() to construct.
+    private ConnectionProperties(com.google.protobuf.GeneratedMessage.Builder builder) {
+      super(builder);
+    }
+    private ConnectionProperties() {
+      isDirty_ = false;
+      autoCommit_ = false;
+      hasAutoCommit_ = false;
+      readOnly_ = false;
+      hasReadOnly_ = false;
+      transactionIsolation_ = 0;
+      catalog_ = "";
+      schema_ = "";
+    }
+
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+    }
+    private ConnectionProperties(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      int mutable_bitField0_ = 0;
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!input.skipField(tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 8: {
+
+              isDirty_ = input.readBool();
+              break;
+            }
+            case 16: {
+
+              autoCommit_ = input.readBool();
+              break;
+            }
+            case 24: {
+
+              readOnly_ = input.readBool();
+              break;
+            }
+            case 32: {
+
+              transactionIsolation_ = input.readUInt32();
+              break;
+            }
+            case 42: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+
+              catalog_ = bs;
+              break;
+            }
+            case 50: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+
+              schema_ = bs;
+              break;
+            }
+            case 56: {
+
+              hasAutoCommit_ = input.readBool();
+              break;
+            }
+            case 64: {
+
+              hasReadOnly_ = input.readBool();
+              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 {
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.apache.calcite.avatica.proto.Common.internal_static_ConnectionProperties_descriptor;
+    }
+
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.calcite.avatica.proto.Common.internal_static_ConnectionProperties_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.calcite.avatica.proto.Common.ConnectionProperties.class, org.apache.calcite.avatica.proto.Common.ConnectionProperties.Builder.class);
+    }
+
+    public static final com.google.protobuf.Parser<ConnectionProperties> PARSER =
+        new com.google.protobuf.AbstractParser<ConnectionProperties>() {
+      public ConnectionProperties parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new ConnectionProperties(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<ConnectionProperties> getParserForType() {
+      return PARSER;
+    }
+
+    public static final int IS_DIRTY_FIELD_NUMBER = 1;
+    private boolean isDirty_;
+    /**
+     * <code>optional bool is_dirty = 1;</code>
+     */
+    public boolean getIsDirty() {
+      return isDirty_;
+    }
+
+    public static final int AUTO_COMMIT_FIELD_NUMBER = 2;
+    private boolean autoCommit_;
+    /**
+     * <code>optional bool auto_commit = 2;</code>
+     */
+    public boolean getAutoCommit() {
+      return autoCommit_;
+    }
+
+    public static final int HAS_AUTO_COMMIT_FIELD_NUMBER = 7;
+    private boolean hasAutoCommit_;
+    /**
+     * <code>optional bool has_auto_commit = 7;</code>
+     *
+     * <pre>
+     * field is a Boolean, need to discern null and default value
+     * </pre>
+     */
+    public boolean getHasAutoCommit() {
+      return hasAutoCommit_;
+    }
+
+    public static final int READ_ONLY_FIELD_NUMBER = 3;
+    private boolean readOnly_;
+    /**
+     * <code>optional bool read_only = 3;</code>
+     */
+    public boolean getReadOnly() {
+      return readOnly_;
+    }
+
+    public static final int HAS_READ_ONLY_FIELD_NUMBER = 8;
+    private boolean hasReadOnly_;
+    /**
+     * <code>optional bool has_read_only = 8;</code>
+     *
+     * <pre>
+     * field is a Boolean, need to discern null and default value
+     * </pre>
+     */
+    public boolean getHasReadOnly() {
+      return hasReadOnly_;
+    }
+
+    public static final int TRANSACTION_ISOLATION_FIELD_NUMBER = 4;
+    private int transactionIsolation_;
+    /**
+     * <code>optional uint32 transaction_isolation = 4;</code>
+     */
+    public int getTransactionIsolation() {
+      return transactionIsolation_;
+    }
+
+    public static final int CATALOG_FIELD_NUMBER = 5;
+    private java.lang.Object catalog_;
+    /**
+     * <code>optional string catalog = 5;</code>
+     */
+    public java.lang.String getCatalog() {
+      java.lang.Object ref = catalog_;
+      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()) {
+          catalog_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string catalog = 5;</code>
+     */
+    public com.google.protobuf.ByteString
+        getCatalogBytes() {
+      java.lang.Object ref = catalog_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        catalog_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int SCHEMA_FIELD_NUMBER = 6;
+    private java.lang.Object schema_;
+    /**
+     * <code>optional string schema = 6;</code>
+     */
+    public java.lang.String getSchema() {
+      java.lang.Object ref = schema_;
+      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()) {
+          schema_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string schema = 6;</code>
+     */
+    public com.google.protobuf.ByteString
+        getSchemaBytes() {
+      java.lang.Object ref = schema_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        schema_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    private byte memoizedIsInitialized = -1;
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      if (isDirty_ != false) {
+        output.writeBool(1, isDirty_);
+      }
+      if (autoCommit_ != false) {
+        output.writeBool(2, autoCommit_);
+      }
+      if (readOnly_ != false) {
+        output.writeBool(3, readOnly_);
+      }
+      if (transactionIsolation_ != 0) {
+        output.writeUInt32(4, transactionIsolation_);
+      }
+      if (!getCatalogBytes().isEmpty()) {
+        output.writeBytes(5, getCatalogBytes());
+      }
+      if (!getSchemaBytes().isEmpty()) {
+        output.writeBytes(6, getSchemaBytes());
+      }
+      if (hasAutoCommit_ != false) {
+        output.writeBool(7, hasAutoCommit_);
+      }
+      if (hasReadOnly_ != false) {
+        output.writeBool(8, hasReadOnly_);
+      }
+    }
+
+    private int memoizedSerializedSize = -1;
+    public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (isDirty_ != false) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBoolSize(1, isDirty_);
+      }
+      if (autoCommit_ != false) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBoolSize(2, autoCommit_);
+      }
+      if (readOnly_ != false) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBoolSize(3, readOnly_);
+      }
+      if (transactionIsolation_ != 0) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt32Size(4, transactionIsolation_);
+      }
+      if (!getCatalogBytes().isEmpty()) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(5, getCatalogBytes());
+      }
+      if (!getSchemaBytes().isEmpty()) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(6, getSchemaBytes());
+      }
+      if (hasAutoCommit_ != false) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBoolSize(7, hasAutoCommit_);
+      }
+      if (hasReadOnly_ != false) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBoolSize(8, hasReadOnly_);
+      }
+      memoizedSerializedSize = size;
+      return size;
+    }
+
+    private static final long serialVersionUID = 0L;
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties 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.calcite.avatica.proto.Common.ConnectionProperties parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
+    }
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties 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 new Builder(); }
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.ConnectionProperties 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 ConnectionProperties}
+     *
+     * <pre>
+     * Details about a connection
+     * </pre>
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:ConnectionProperties)
+        org.apache.calcite.avatica.proto.Common.ConnectionPropertiesOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.calcite.avatica.proto.Common.internal_static_ConnectionProperties_descriptor;
+      }
+
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.calcite.avatica.proto.Common.internal_static_ConnectionProperties_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.calcite.avatica.proto.Common.ConnectionProperties.class, org.apache.calcite.avatica.proto.Common.ConnectionProperties.Builder.class);
+      }
+
+      // Construct using org.apache.calcite.avatica.proto.Common.ConnectionProperties.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+        }
+      }
+      public Builder clear() {
+        super.clear();
+        isDirty_ = false;
+
+        autoCommit_ = false;
+
+        hasAutoCommit_ = false;
+
+        readOnly_ = false;
+
+        hasReadOnly_ = false;
+
+        transactionIsolation_ = 0;
+
+        catalog_ = "";
+
+        schema_ = "";
+
+        return this;
+      }
+
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.apache.calcite.avatica.proto.Common.internal_static_ConnectionProperties_descriptor;
+      }
+
+      public org.apache.calcite.avatica.proto.Common.ConnectionProperties getDefaultInstanceForType() {
+        return org.apache.calcite.avatica.proto.Common.ConnectionProperties.getDefaultInstance();
+      }
+
+      public org.apache.calcite.avatica.proto.Common.ConnectionProperties build() {
+        org.apache.calcite.avatica.proto.Common.ConnectionProperties result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      public org.apache.calcite.avatica.proto.Common.ConnectionProperties buildPartial() {
+        org.apache.calcite.avatica.proto.Common.ConnectionProperties result = new org.apache.calcite.avatica.proto.Common.ConnectionProperties(this);
+        result.isDirty_ = isDirty_;
+        result.autoCommit_ = autoCommit_;
+        result.hasAutoCommit_ = hasAutoCommit_;
+        result.readOnly_ = readOnly_;
+        result.hasReadOnly_ = hasReadOnly_;
+        result.transactionIsolation_ = transactionIsolation_;
+        result.catalog_ = catalog_;
+        result.schema_ = schema_;
+        onBuilt();
+        return result;
+      }
+
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.apache.calcite.avatica.proto.Common.ConnectionProperties) {
+          return mergeFrom((org.apache.calcite.avatica.proto.Common.ConnectionProperties)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.apache.calcite.avatica.proto.Common.ConnectionProperties other) {
+        if (other == org.apache.calcite.avatica.proto.Common.ConnectionProperties.getDefaultInstance()) return this;
+        if (other.getIsDirty() != false) {
+          setIsDirty(other.getIsDirty());
+        }
+        if (other.getAutoCommit() != false) {
+          setAutoCommit(other.getAutoCommit());
+        }
+        if (other.getHasAutoCommit() != false) {
+          setHasAutoCommit(other.getHasAutoCommit());
+        }
+        if (other.getReadOnly() != false) {
+          setReadOnly(other.getReadOnly());
+        }
+        if (other.getHasReadOnly() != false) {
+          setHasReadOnly(other.getHasReadOnly());
+        }
+        if (other.getTransactionIsolation() != 0) {
+          setTransactionIsolation(other.getTransactionIsolation());
+        }
+        if (!other.getCatalog().isEmpty()) {
+          catalog_ = other.catalog_;
+          onChanged();
+        }
+        if (!other.getSchema().isEmpty()) {
+          schema_ = other.schema_;
+          onChanged();
+        }
+        onChanged();
+        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.calcite.avatica.proto.Common.ConnectionProperties parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.apache.calcite.avatica.proto.Common.ConnectionProperties) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+
+      private boolean isDirty_ ;
+      /**
+       * <code>optional bool is_dirty = 1;</code>
+       */
+      public boolean getIsDirty() {
+        return isDirty_;
+      }
+      /**
+       * <code>optional bool is_dirty = 1;</code>
+       */
+      public Builder setIsDirty(boolean value) {
+        
+        isDirty_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional bool is_dirty = 1;</code>
+       */
+      public Builder clearIsDirty() {
+        
+        isDirty_ = false;
+        onChanged();
+        return this;
+      }
+
+      private boolean autoCommit_ ;
+      /**
+       * <code>optional bool auto_commit = 2;</code>
+       */
+      public boolean getAutoCommit() {
+        return autoCommit_;
+      }
+      /**
+       * <code>optional bool auto_commit = 2;</code>
+       */
+      public Builder setAutoCommit(boolean value) {
+        
+        autoCommit_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional bool auto_commit = 2;</code>
+       */
+      public Builder clearAutoCommit() {
+        
+        autoCommit_ = false;
+        onChanged();
+        return this;
+      }
+
+      private boolean hasAutoCommit_ ;
+      /**
+       * <code>optional bool has_auto_commit = 7;</code>
+       *
+       * <pre>
+       * field is a Boolean, need to discern null and default value
+       * </pre>
+       */
+      public boolean getHasAutoCommit() {
+        return hasAutoCommit_;
+      }
+      /**
+       * <code>optional bool has_auto_commit = 7;</code>
+       *
+       * <pre>
+       * field is a Boolean, need to discern null and default value
+       * </pre>
+       */
+      public Builder setHasAutoCommit(boolean value) {
+        
+        hasAutoCommit_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional bool has_auto_commit = 7;</code>
+       *
+       * <pre>
+       * field is a Boolean, need to discern null and default value
+       * </pre>
+       */
+      public Builder clearHasAutoCommit() {
+        
+        hasAutoCommit_ = false;
+        onChanged();
+        return this;
+      }
+
+      private boolean readOnly_ ;
+      /**
+       * <code>optional bool read_only = 3;</code>
+       */
+      public boolean getReadOnly() {
+        return readOnly_;
+      }
+      /**
+       * <code>optional bool read_only = 3;</code>
+       */
+      public Builder setReadOnly(boolean value) {
+        
+        readOnly_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional bool read_only = 3;</code>
+       */
+      public Builder clearReadOnly() {
+        
+        readOnly_ = false;
+        onChanged();
+        return this;
+      }
+
+      private boolean hasReadOnly_ ;
+      /**
+       * <code>optional bool has_read_only = 8;</code>
+       *
+       * <pre>
+       * field is a Boolean, need to discern null and default value
+       * </pre>
+       */
+      public boolean getHasReadOnly() {
+        return hasReadOnly_;
+      }
+      /**
+       * <code>optional bool has_read_only = 8;</code>
+       *
+       * <pre>
+       * field is a Boolean, need to discern null and default value
+       * </pre>
+       */
+      public Builder setHasReadOnly(boolean value) {
+        
+        hasReadOnly_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional bool has_read_only = 8;</code>
+       *
+       * <pre>
+       * field is a Boolean, need to discern null and default value
+       * </pre>
+       */
+      public Builder clearHasReadOnly() {
+        
+        hasReadOnly_ = false;
+        onChanged();
+        return this;
+      }
+
+      private int transactionIsolation_ ;
+      /**
+       * <code>optional uint32 transaction_isolation = 4;</code>
+       */
+      public int getTransactionIsolation() {
+        return transactionIsolation_;
+      }
+      /**
+       * <code>optional uint32 transaction_isolation = 4;</code>
+       */
+      public Builder setTransactionIsolation(int value) {
+        
+        transactionIsolation_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional uint32 transaction_isolation = 4;</code>
+       */
+      public Builder clearTransactionIsolation() {
+        
+        transactionIsolation_ = 0;
+        onChanged();
+        return this;
+      }
+
+      private java.lang.Object catalog_ = "";
+      /**
+       * <code>optional string catalog = 5;</code>
+       */
+      public java.lang.String getCatalog() {
+        java.lang.Object ref = catalog_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            catalog_ = s;
+          }
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string catalog = 5;</code>
+       */
+      public com.google.protobuf.ByteString
+          getCatalogBytes() {
+        java.lang.Object ref = catalog_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          catalog_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string catalog = 5;</code>
+       */
+      public Builder setCatalog(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        catalog_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string catalog = 5;</code>
+       */
+      public Builder clearCatalog() {
+        
+        catalog_ = getDefaultInstance().getCatalog();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string catalog = 5;</code>
+       */
+      public Builder setCatalogBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        catalog_ = value;
+        onChanged();
+        return this;
+      }
+
+      private java.lang.Object schema_ = "";
+      /**
+       * <code>optional string schema = 6;</code>
+       */
+      public java.lang.String getSchema() {
+        java.lang.Object ref = schema_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            schema_ = s;
+          }
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string schema = 6;</code>
+       */
+      public com.google.protobuf.ByteString
+          getSchemaBytes() {
+        java.lang.Object ref = schema_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          schema_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string schema = 6;</code>
+       */
+      public Builder setSchema(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        schema_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string schema = 6;</code>
+       */
+      public Builder clearSchema() {
+        
+        schema_ = getDefaultInstance().getSchema();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string schema = 6;</code>
+       */
+      public Builder setSchemaBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        schema_ = value;
+        onChanged();
+        return this;
+      }
+      public final Builder setUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return this;
+      }
+
+      public final Builder mergeUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return this;
+      }
+
+
+      // @@protoc_insertion_point(builder_scope:ConnectionProperties)
+    }
+
+    // @@protoc_insertion_point(class_scope:ConnectionProperties)
+    private static final org.apache.calcite.avatica.proto.Common.ConnectionProperties defaultInstance;static {
+      defaultInstance = new org.apache.calcite.avatica.proto.Common.ConnectionProperties();
+    }
+
+    public static org.apache.calcite.avatica.proto.Common.ConnectionProperties getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    public org.apache.calcite.avatica.proto.Common.ConnectionProperties getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+  }
+
+  public interface StatementHandleOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:StatementHandle)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * <code>optional string connection_id = 1;</code>
+     */
+    java.lang.String getConnectionId();
+    /**
+     * <code>optional string connection_id = 1;</code>
+     */
+    com.google.protobuf.ByteString
+        getConnectionIdBytes();
+
+    /**
+     * <code>optional uint32 id = 2;</code>
+     */
+    int getId();
+
+    /**
+     * <code>optional .Signature signature = 3;</code>
+     */
+    boolean hasSignature();
+    /**
+     * <code>optional .Signature signature = 3;</code>
+     */
+    org.apache.calcite.avatica.proto.Common.Signature getSignature();
+    /**
+     * <code>optional .Signature signature = 3;</code>
+     */
+    org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder();
+  }
+  /**
+   * Protobuf type {@code StatementHandle}
+   *
+   * <pre>
+   * Statement handle
+   * </pre>
+   */
+  public  static final class StatementHandle extends
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:StatementHandle)
+      StatementHandleOrBuilder {
+    // Use StatementHandle.newBuilder() to construct.
+    private StatementHandle(com.google.protobuf.GeneratedMessage.Builder builder) {
+      super(builder);
+    }
+    private StatementHandle() {
+      connectionId_ = "";
+      id_ = 0;
+    }
+
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+    }
+    private StatementHandle(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      int mutable_bitField0_ = 0;
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!input.skipField(tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+
+              connectionId_ = bs;
+              break;
+            }
+            case 16: {
+
+              id_ = input.readUInt32();
+              break;
+            }
+            case 26: {
+              org.apache.calcite.avatica.proto.Common.Signature.Builder subBuilder = null;
+              if (signature_ != null) {
+                subBuilder = signature_.toBuilder();
+              }
+              signature_ = input.readMessage(org.apache.calcite.avatica.proto.Common.Signature.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(signature_);
+                signature_ = subBuilder.buildPartial();
+              }
+
+              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 {
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.apache.calcite.avatica.proto.Common.internal_static_StatementHandle_descriptor;
+    }
+
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.calcite.avatica.proto.Common.internal_static_StatementHandle_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.calcite.avatica.proto.Common.StatementHandle.class, org.apache.calcite.avatica.proto.Common.StatementHandle.Builder.class);
+    }
+
+    public static final com.google.protobuf.Parser<StatementHandle> PARSER =
+        new com.google.protobuf.AbstractParser<StatementHandle>() {
+      public StatementHandle parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new StatementHandle(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<StatementHandle> getParserForType() {
+      return PARSER;
+    }
+
+    public static final int CONNECTION_ID_FIELD_NUMBER = 1;
+    private java.lang.Object connectionId_;
+    /**
+     * <code>optional string connection_id = 1;</code>
+     */
+    public java.lang.String getConnectionId() {
+      java.lang.Object ref = connectionId_;
+      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()) {
+          connectionId_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string connection_id = 1;</code>
+     */
+    public com.google.protobuf.ByteString
+        getConnectionIdBytes() {
+      java.lang.Object ref = connectionId_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        connectionId_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int ID_FIELD_NUMBER = 2;
+    private int id_;
+    /**
+     * <code>optional uint32 id = 2;</code>
+     */
+    public int getId() {
+      return id_;
+    }
+
+    public static final int SIGNATURE_FIELD_NUMBER = 3;
+    private org.apache.calcite.avatica.proto.Common.Signature signature_;
+    /**
+     * <code>optional .Signature signature = 3;</code>
+     */
+    public boolean hasSignature() {
+      return signature_ != null;
+    }
+    /**
+     * <code>optional .Signature signature = 3;</code>
+     */
+    public org.apache.calcite.avatica.proto.Common.Signature getSignature() {
+      return signature_ == null ? org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance() : signature_;
+    }
+    /**
+     * <code>optional .Signature signature = 3;</code>
+     */
+    public org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder() {
+      return getSignature();
+    }
+
+    private byte memoizedIsInitialized = -1;
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      if (!getConnectionIdBytes().isEmpty()) {
+        output.writeBytes(1, getConnectionIdBytes());
+      }
+      if (id_ != 0) {
+        output.writeUInt32(2, id_);
+      }
+      if (signature_ != null) {
+        output.writeMessage(3, getSignature());
+      }
+    }
+
+    private int memoizedSerializedSize = -1;
+    public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      if (!getConnectionIdBytes().isEmpty()) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(1, getConnectionIdBytes());
+      }
+      if (id_ != 0) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeUInt32Size(2, id_);
+      }
+      if (signature_ != null) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(3, getSignature());
+      }
+      memoizedSerializedSize = size;
+      return size;
+    }
+
+    private static final long serialVersionUID = 0L;
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle 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.calcite.avatica.proto.Common.StatementHandle parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
+    }
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle 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 new Builder(); }
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.StatementHandle 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 StatementHandle}
+     *
+     * <pre>
+     * Statement handle
+     * </pre>
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:StatementHandle)
+        org.apache.calcite.avatica.proto.Common.StatementHandleOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.calcite.avatica.proto.Common.internal_static_StatementHandle_descriptor;
+      }
+
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.calcite.avatica.proto.Common.internal_static_StatementHandle_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.calcite.avatica.proto.Common.StatementHandle.class, org.apache.calcite.avatica.proto.Common.StatementHandle.Builder.class);
+      }
+
+      // Construct using org.apache.calcite.avatica.proto.Common.StatementHandle.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+        }
+      }
+      public Builder clear() {
+        super.clear();
+        connectionId_ = "";
+
+        id_ = 0;
+
+        if (signatureBuilder_ == null) {
+          signature_ = null;
+        } else {
+          signature_ = null;
+          signatureBuilder_ = null;
+        }
+        return this;
+      }
+
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.apache.calcite.avatica.proto.Common.internal_static_StatementHandle_descriptor;
+      }
+
+      public org.apache.calcite.avatica.proto.Common.StatementHandle getDefaultInstanceForType() {
+        return org.apache.calcite.avatica.proto.Common.StatementHandle.getDefaultInstance();
+      }
+
+      public org.apache.calcite.avatica.proto.Common.StatementHandle build() {
+        org.apache.calcite.avatica.proto.Common.StatementHandle result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      public org.apache.calcite.avatica.proto.Common.StatementHandle buildPartial() {
+        org.apache.calcite.avatica.proto.Common.StatementHandle result = new org.apache.calcite.avatica.proto.Common.StatementHandle(this);
+        result.connectionId_ = connectionId_;
+        result.id_ = id_;
+        if (signatureBuilder_ == null) {
+          result.signature_ = signature_;
+        } else {
+          result.signature_ = signatureBuilder_.build();
+        }
+        onBuilt();
+        return result;
+      }
+
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.apache.calcite.avatica.proto.Common.StatementHandle) {
+          return mergeFrom((org.apache.calcite.avatica.proto.Common.StatementHandle)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.apache.calcite.avatica.proto.Common.StatementHandle other) {
+        if (other == org.apache.calcite.avatica.proto.Common.StatementHandle.getDefaultInstance()) return this;
+        if (!other.getConnectionId().isEmpty()) {
+          connectionId_ = other.connectionId_;
+          onChanged();
+        }
+        if (other.getId() != 0) {
+          setId(other.getId());
+        }
+        if (other.hasSignature()) {
+          mergeSignature(other.getSignature());
+        }
+        onChanged();
+        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.calcite.avatica.proto.Common.StatementHandle parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+          parsedMessage = (org.apache.calcite.avatica.proto.Common.StatementHandle) e.getUnfinishedMessage();
+          throw e;
+        } finally {
+          if (parsedMessage != null) {
+            mergeFrom(parsedMessage);
+          }
+        }
+        return this;
+      }
+
+      private java.lang.Object connectionId_ = "";
+      /**
+       * <code>optional string connection_id = 1;</code>
+       */
+      public java.lang.String getConnectionId() {
+        java.lang.Object ref = connectionId_;
+        if (!(ref instanceof java.lang.String)) {
+          com.google.protobuf.ByteString bs =
+              (com.google.protobuf.ByteString) ref;
+          java.lang.String s = bs.toStringUtf8();
+          if (bs.isValidUtf8()) {
+            connectionId_ = s;
+          }
+          return s;
+        } else {
+          return (java.lang.String) ref;
+        }
+      }
+      /**
+       * <code>optional string connection_id = 1;</code>
+       */
+      public com.google.protobuf.ByteString
+          getConnectionIdBytes() {
+        java.lang.Object ref = connectionId_;
+        if (ref instanceof String) {
+          com.google.protobuf.ByteString b = 
+              com.google.protobuf.ByteString.copyFromUtf8(
+                  (java.lang.String) ref);
+          connectionId_ = b;
+          return b;
+        } else {
+          return (com.google.protobuf.ByteString) ref;
+        }
+      }
+      /**
+       * <code>optional string connection_id = 1;</code>
+       */
+      public Builder setConnectionId(
+          java.lang.String value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        connectionId_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string connection_id = 1;</code>
+       */
+      public Builder clearConnectionId() {
+        
+        connectionId_ = getDefaultInstance().getConnectionId();
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional string connection_id = 1;</code>
+       */
+      public Builder setConnectionIdBytes(
+          com.google.protobuf.ByteString value) {
+        if (value == null) {
+    throw new NullPointerException();
+  }
+  
+        connectionId_ = value;
+        onChanged();
+        return this;
+      }
+
+      private int id_ ;
+      /**
+       * <code>optional uint32 id = 2;</code>
+       */
+      public int getId() {
+        return id_;
+      }
+      /**
+       * <code>optional uint32 id = 2;</code>
+       */
+      public Builder setId(int value) {
+        
+        id_ = value;
+        onChanged();
+        return this;
+      }
+      /**
+       * <code>optional uint32 id = 2;</code>
+       */
+      public Builder clearId() {
+        
+        id_ = 0;
+        onChanged();
+        return this;
+      }
+
+      private org.apache.calcite.avatica.proto.Common.Signature signature_ = null;
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.calcite.avatica.proto.Common.Signature, org.apache.calcite.avatica.proto.Common.Signature.Builder, org.apache.calcite.avatica.proto.Common.SignatureOrBuilder> signatureBuilder_;
+      /**
+       * <code>optional .Signature signature = 3;</code>
+       */
+      public boolean hasSignature() {
+        return signatureBuilder_ != null || signature_ != null;
+      }
+      /**
+       * <code>optional .Signature signature = 3;</code>
+       */
+      public org.apache.calcite.avatica.proto.Common.Signature getSignature() {
+        if (signatureBuilder_ == null) {
+          return signature_ == null ? org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance() : signature_;
+        } else {
+          return signatureBuilder_.getMessage();
+        }
+      }
+      /**
+       * <code>optional .Signature signature = 3;</code>
+       */
+      public Builder setSignature(org.apache.calcite.avatica.proto.Common.Signature value) {
+        if (signatureBuilder_ == null) {
+          if (value == null) {
+            throw new NullPointerException();
+          }
+          signature_ = value;
+          onChanged();
+        } else {
+          signatureBuilder_.setMessage(value);
+        }
+
+        return this;
+      }
+      /**
+       * <code>optional .Signature signature = 3;</code>
+       */
+      public Builder setSignature(
+          org.apache.calcite.avatica.proto.Common.Signature.Builder builderForValue) {
+        if (signatureBuilder_ == null) {
+          signature_ = builderForValue.build();
+          onChanged();
+        } else {
+          signatureBuilder_.setMessage(builderForValue.build());
+        }
+
+        return this;
+      }
+      /**
+       * <code>optional .Signature signature = 3;</code>
+       */
+      public Builder mergeSignature(org.apache.calcite.avatica.proto.Common.Signature value) {
+        if (signatureBuilder_ == null) {
+          if (signature_ != null) {
+            signature_ =
+              org.apache.calcite.avatica.proto.Common.Signature.newBuilder(signature_).mergeFrom(value).buildPartial();
+          } else {
+            signature_ = value;
+          }
+          onChanged();
+        } else {
+          signatureBuilder_.mergeFrom(value);
+        }
+
+        return this;
+      }
+      /**
+       * <code>optional .Signature signature = 3;</code>
+       */
+      public Builder clearSignature() {
+        if (signatureBuilder_ == null) {
+          signature_ = null;
+          onChanged();
+        } else {
+          signature_ = null;
+          signatureBuilder_ = null;
+        }
+
+        return this;
+      }
+      /**
+       * <code>optional .Signature signature = 3;</code>
+       */
+      public org.apache.calcite.avatica.proto.Common.Signature.Builder getSignatureBuilder() {
+        
+        onChanged();
+        return getSignatureFieldBuilder().getBuilder();
+      }
+      /**
+       * <code>optional .Signature signature = 3;</code>
+       */
+      public org.apache.calcite.avatica.proto.Common.SignatureOrBuilder getSignatureOrBuilder() {
+        if (signatureBuilder_ != null) {
+          return signatureBuilder_.getMessageOrBuilder();
+        } else {
+          return signature_ == null ?
+              org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance() : signature_;
+        }
+      }
+      /**
+       * <code>optional .Signature signature = 3;</code>
+       */
+      private com.google.protobuf.SingleFieldBuilder<
+          org.apache.calcite.avatica.proto.Common.Signature, org.apache.calcite.avatica.proto.Common.Signature.Builder, org.apache.calcite.avatica.proto.Common.SignatureOrBuilder> 
+          getSignatureFieldBuilder() {
+        if (signatureBuilder_ == null) {
+          signatureBuilder_ = new com.google.protobuf.SingleFieldBuilder<
+              org.apache.calcite.avatica.proto.Common.Signature, org.apache.calcite.avatica.proto.Common.Signature.Builder, org.apache.calcite.avatica.proto.Common.SignatureOrBuilder>(
+                  getSignature(),
+                  getParentForChildren(),
+                  isClean());
+          signature_ = null;
+        }
+        return signatureBuilder_;
+      }
+      public final Builder setUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return this;
+      }
+
+      public final Builder mergeUnknownFields(
+          final com.google.protobuf.UnknownFieldSet unknownFields) {
+        return this;
+      }
+
+
+      // @@protoc_insertion_point(builder_scope:StatementHandle)
+    }
+
+    // @@protoc_insertion_point(class_scope:StatementHandle)
+    private static final org.apache.calcite.avatica.proto.Common.StatementHandle defaultInstance;static {
+      defaultInstance = new org.apache.calcite.avatica.proto.Common.StatementHandle();
+    }
+
+    public static org.apache.calcite.avatica.proto.Common.StatementHandle getDefaultInstance() {
+      return defaultInstance;
+    }
+
+    public org.apache.calcite.avatica.proto.Common.StatementHandle getDefaultInstanceForType() {
+      return defaultInstance;
+    }
+
+  }
+
+  public interface SignatureOrBuilder extends
+      // @@protoc_insertion_point(interface_extends:Signature)
+      com.google.protobuf.MessageOrBuilder {
+
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    java.util.List<org.apache.calcite.avatica.proto.Common.ColumnMetaData> 
+        getColumnsList();
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    org.apache.calcite.avatica.proto.Common.ColumnMetaData getColumns(int index);
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    int getColumnsCount();
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    java.util.List<? extends org.apache.calcite.avatica.proto.Common.ColumnMetaDataOrBuilder> 
+        getColumnsOrBuilderList();
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    org.apache.calcite.avatica.proto.Common.ColumnMetaDataOrBuilder getColumnsOrBuilder(
+        int index);
+
+    /**
+     * <code>optional string sql = 2;</code>
+     */
+    java.lang.String getSql();
+    /**
+     * <code>optional string sql = 2;</code>
+     */
+    com.google.protobuf.ByteString
+        getSqlBytes();
+
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    java.util.List<org.apache.calcite.avatica.proto.Common.AvaticaParameter> 
+        getParametersList();
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    org.apache.calcite.avatica.proto.Common.AvaticaParameter getParameters(int index);
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    int getParametersCount();
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    java.util.List<? extends org.apache.calcite.avatica.proto.Common.AvaticaParameterOrBuilder> 
+        getParametersOrBuilderList();
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    org.apache.calcite.avatica.proto.Common.AvaticaParameterOrBuilder getParametersOrBuilder(
+        int index);
+
+    /**
+     * <code>optional .CursorFactory cursor_factory = 4;</code>
+     */
+    boolean hasCursorFactory();
+    /**
+     * <code>optional .CursorFactory cursor_factory = 4;</code>
+     */
+    org.apache.calcite.avatica.proto.Common.CursorFactory getCursorFactory();
+    /**
+     * <code>optional .CursorFactory cursor_factory = 4;</code>
+     */
+    org.apache.calcite.avatica.proto.Common.CursorFactoryOrBuilder getCursorFactoryOrBuilder();
+  }
+  /**
+   * Protobuf type {@code Signature}
+   *
+   * <pre>
+   * Results of preparing a statement
+   * </pre>
+   */
+  public  static final class Signature extends
+      com.google.protobuf.GeneratedMessage implements
+      // @@protoc_insertion_point(message_implements:Signature)
+      SignatureOrBuilder {
+    // Use Signature.newBuilder() to construct.
+    private Signature(com.google.protobuf.GeneratedMessage.Builder builder) {
+      super(builder);
+    }
+    private Signature() {
+      columns_ = java.util.Collections.emptyList();
+      sql_ = "";
+      parameters_ = java.util.Collections.emptyList();
+    }
+
+    @java.lang.Override
+    public final com.google.protobuf.UnknownFieldSet
+    getUnknownFields() {
+      return com.google.protobuf.UnknownFieldSet.getDefaultInstance();
+    }
+    private Signature(
+        com.google.protobuf.CodedInputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      this();
+      int mutable_bitField0_ = 0;
+      try {
+        boolean done = false;
+        while (!done) {
+          int tag = input.readTag();
+          switch (tag) {
+            case 0:
+              done = true;
+              break;
+            default: {
+              if (!input.skipField(tag)) {
+                done = true;
+              }
+              break;
+            }
+            case 10: {
+              if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+                columns_ = new java.util.ArrayList<org.apache.calcite.avatica.proto.Common.ColumnMetaData>();
+                mutable_bitField0_ |= 0x00000001;
+              }
+              columns_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.ColumnMetaData.PARSER, extensionRegistry));
+              break;
+            }
+            case 18: {
+              com.google.protobuf.ByteString bs = input.readBytes();
+
+              sql_ = bs;
+              break;
+            }
+            case 26: {
+              if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+                parameters_ = new java.util.ArrayList<org.apache.calcite.avatica.proto.Common.AvaticaParameter>();
+                mutable_bitField0_ |= 0x00000004;
+              }
+              parameters_.add(input.readMessage(org.apache.calcite.avatica.proto.Common.AvaticaParameter.PARSER, extensionRegistry));
+              break;
+            }
+            case 34: {
+              org.apache.calcite.avatica.proto.Common.CursorFactory.Builder subBuilder = null;
+              if (cursorFactory_ != null) {
+                subBuilder = cursorFactory_.toBuilder();
+              }
+              cursorFactory_ = input.readMessage(org.apache.calcite.avatica.proto.Common.CursorFactory.PARSER, extensionRegistry);
+              if (subBuilder != null) {
+                subBuilder.mergeFrom(cursorFactory_);
+                cursorFactory_ = subBuilder.buildPartial();
+              }
+
+              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 {
+        if (((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
+          columns_ = java.util.Collections.unmodifiableList(columns_);
+        }
+        if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
+          parameters_ = java.util.Collections.unmodifiableList(parameters_);
+        }
+        makeExtensionsImmutable();
+      }
+    }
+    public static final com.google.protobuf.Descriptors.Descriptor
+        getDescriptor() {
+      return org.apache.calcite.avatica.proto.Common.internal_static_Signature_descriptor;
+    }
+
+    protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+        internalGetFieldAccessorTable() {
+      return org.apache.calcite.avatica.proto.Common.internal_static_Signature_fieldAccessorTable
+          .ensureFieldAccessorsInitialized(
+              org.apache.calcite.avatica.proto.Common.Signature.class, org.apache.calcite.avatica.proto.Common.Signature.Builder.class);
+    }
+
+    public static final com.google.protobuf.Parser<Signature> PARSER =
+        new com.google.protobuf.AbstractParser<Signature>() {
+      public Signature parsePartialFrom(
+          com.google.protobuf.CodedInputStream input,
+          com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+          throws com.google.protobuf.InvalidProtocolBufferException {
+        return new Signature(input, extensionRegistry);
+      }
+    };
+
+    @java.lang.Override
+    public com.google.protobuf.Parser<Signature> getParserForType() {
+      return PARSER;
+    }
+
+    private int bitField0_;
+    public static final int COLUMNS_FIELD_NUMBER = 1;
+    private java.util.List<org.apache.calcite.avatica.proto.Common.ColumnMetaData> columns_;
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    public java.util.List<org.apache.calcite.avatica.proto.Common.ColumnMetaData> getColumnsList() {
+      return columns_;
+    }
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    public java.util.List<? extends org.apache.calcite.avatica.proto.Common.ColumnMetaDataOrBuilder> 
+        getColumnsOrBuilderList() {
+      return columns_;
+    }
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    public int getColumnsCount() {
+      return columns_.size();
+    }
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    public org.apache.calcite.avatica.proto.Common.ColumnMetaData getColumns(int index) {
+      return columns_.get(index);
+    }
+    /**
+     * <code>repeated .ColumnMetaData columns = 1;</code>
+     */
+    public org.apache.calcite.avatica.proto.Common.ColumnMetaDataOrBuilder getColumnsOrBuilder(
+        int index) {
+      return columns_.get(index);
+    }
+
+    public static final int SQL_FIELD_NUMBER = 2;
+    private java.lang.Object sql_;
+    /**
+     * <code>optional string sql = 2;</code>
+     */
+    public java.lang.String getSql() {
+      java.lang.Object ref = sql_;
+      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()) {
+          sql_ = s;
+        }
+        return s;
+      }
+    }
+    /**
+     * <code>optional string sql = 2;</code>
+     */
+    public com.google.protobuf.ByteString
+        getSqlBytes() {
+      java.lang.Object ref = sql_;
+      if (ref instanceof java.lang.String) {
+        com.google.protobuf.ByteString b = 
+            com.google.protobuf.ByteString.copyFromUtf8(
+                (java.lang.String) ref);
+        sql_ = b;
+        return b;
+      } else {
+        return (com.google.protobuf.ByteString) ref;
+      }
+    }
+
+    public static final int PARAMETERS_FIELD_NUMBER = 3;
+    private java.util.List<org.apache.calcite.avatica.proto.Common.AvaticaParameter> parameters_;
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    public java.util.List<org.apache.calcite.avatica.proto.Common.AvaticaParameter> getParametersList() {
+      return parameters_;
+    }
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    public java.util.List<? extends org.apache.calcite.avatica.proto.Common.AvaticaParameterOrBuilder> 
+        getParametersOrBuilderList() {
+      return parameters_;
+    }
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    public int getParametersCount() {
+      return parameters_.size();
+    }
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    public org.apache.calcite.avatica.proto.Common.AvaticaParameter getParameters(int index) {
+      return parameters_.get(index);
+    }
+    /**
+     * <code>repeated .AvaticaParameter parameters = 3;</code>
+     */
+    public org.apache.calcite.avatica.proto.Common.AvaticaParameterOrBuilder getParametersOrBuilder(
+        int index) {
+      return parameters_.get(index);
+    }
+
+    public static final int CURSOR_FACTORY_FIELD_NUMBER = 4;
+    private org.apache.calcite.avatica.proto.Common.CursorFactory cursorFactory_;
+    /**
+     * <code>optional .CursorFactory cursor_factory = 4;</code>
+     */
+    public boolean hasCursorFactory() {
+      return cursorFactory_ != null;
+    }
+    /**
+     * <code>optional .CursorFactory cursor_factory = 4;</code>
+     */
+    public org.apache.calcite.avatica.proto.Common.CursorFactory getCursorFactory() {
+      return cursorFactory_ == null ? org.apache.calcite.avatica.proto.Common.CursorFactory.getDefaultInstance() : cursorFactory_;
+    }
+    /**
+     * <code>optional .CursorFactory cursor_factory = 4;</code>
+     */
+    public org.apache.calcite.avatica.proto.Common.CursorFactoryOrBuilder getCursorFactoryOrBuilder() {
+      return getCursorFactory();
+    }
+
+    private byte memoizedIsInitialized = -1;
+    public final boolean isInitialized() {
+      byte isInitialized = memoizedIsInitialized;
+      if (isInitialized == 1) return true;
+      if (isInitialized == 0) return false;
+
+      memoizedIsInitialized = 1;
+      return true;
+    }
+
+    public void writeTo(com.google.protobuf.CodedOutputStream output)
+                        throws java.io.IOException {
+      getSerializedSize();
+      for (int i = 0; i < columns_.size(); i++) {
+        output.writeMessage(1, columns_.get(i));
+      }
+      if (!getSqlBytes().isEmpty()) {
+        output.writeBytes(2, getSqlBytes());
+      }
+      for (int i = 0; i < parameters_.size(); i++) {
+        output.writeMessage(3, parameters_.get(i));
+      }
+      if (cursorFactory_ != null) {
+        output.writeMessage(4, getCursorFactory());
+      }
+    }
+
+    private int memoizedSerializedSize = -1;
+    public int getSerializedSize() {
+      int size = memoizedSerializedSize;
+      if (size != -1) return size;
+
+      size = 0;
+      for (int i = 0; i < columns_.size(); i++) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(1, columns_.get(i));
+      }
+      if (!getSqlBytes().isEmpty()) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeBytesSize(2, getSqlBytes());
+      }
+      for (int i = 0; i < parameters_.size(); i++) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(3, parameters_.get(i));
+      }
+      if (cursorFactory_ != null) {
+        size += com.google.protobuf.CodedOutputStream
+          .computeMessageSize(4, getCursorFactory());
+      }
+      memoizedSerializedSize = size;
+      return size;
+    }
+
+    private static final long serialVersionUID = 0L;
+    public static org.apache.calcite.avatica.proto.Common.Signature parseFrom(
+        com.google.protobuf.ByteString data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.calcite.avatica.proto.Common.Signature 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.calcite.avatica.proto.Common.Signature parseFrom(byte[] data)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data);
+    }
+    public static org.apache.calcite.avatica.proto.Common.Signature parseFrom(
+        byte[] data,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws com.google.protobuf.InvalidProtocolBufferException {
+      return PARSER.parseFrom(data, extensionRegistry);
+    }
+    public static org.apache.calcite.avatica.proto.Common.Signature parseFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.calcite.avatica.proto.Common.Signature parseFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input, extensionRegistry);
+    }
+    public static org.apache.calcite.avatica.proto.Common.Signature parseDelimitedFrom(java.io.InputStream input)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input);
+    }
+    public static org.apache.calcite.avatica.proto.Common.Signature parseDelimitedFrom(
+        java.io.InputStream input,
+        com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+        throws java.io.IOException {
+      return PARSER.parseDelimitedFrom(input, extensionRegistry);
+    }
+    public static org.apache.calcite.avatica.proto.Common.Signature parseFrom(
+        com.google.protobuf.CodedInputStream input)
+        throws java.io.IOException {
+      return PARSER.parseFrom(input);
+    }
+    public static org.apache.calcite.avatica.proto.Common.Signature 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 new Builder(); }
+    public Builder newBuilderForType() { return newBuilder(); }
+    public static Builder newBuilder(org.apache.calcite.avatica.proto.Common.Signature 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 Signature}
+     *
+     * <pre>
+     * Results of preparing a statement
+     * </pre>
+     */
+    public static final class Builder extends
+        com.google.protobuf.GeneratedMessage.Builder<Builder> implements
+        // @@protoc_insertion_point(builder_implements:Signature)
+        org.apache.calcite.avatica.proto.Common.SignatureOrBuilder {
+      public static final com.google.protobuf.Descriptors.Descriptor
+          getDescriptor() {
+        return org.apache.calcite.avatica.proto.Common.internal_static_Signature_descriptor;
+      }
+
+      protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
+          internalGetFieldAccessorTable() {
+        return org.apache.calcite.avatica.proto.Common.internal_static_Signature_fieldAccessorTable
+            .ensureFieldAccessorsInitialized(
+                org.apache.calcite.avatica.proto.Common.Signature.class, org.apache.calcite.avatica.proto.Common.Signature.Builder.class);
+      }
+
+      // Construct using org.apache.calcite.avatica.proto.Common.Signature.newBuilder()
+      private Builder() {
+        maybeForceBuilderInitialization();
+      }
+
+      private Builder(
+          com.google.protobuf.GeneratedMessage.BuilderParent parent) {
+        super(parent);
+        maybeForceBuilderInitialization();
+      }
+      private void maybeForceBuilderInitialization() {
+        if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) {
+          getColumnsFieldBuilder();
+          getParametersFieldBuilder();
+        }
+      }
+      public Builder clear() {
+        super.clear();
+        if (columnsBuilder_ == null) {
+          columns_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000001);
+        } else {
+          columnsBuilder_.clear();
+        }
+        sql_ = "";
+
+        if (parametersBuilder_ == null) {
+          parameters_ = java.util.Collections.emptyList();
+          bitField0_ = (bitField0_ & ~0x00000004);
+        } else {
+          parametersBuilder_.clear();
+        }
+        if (cursorFactoryBuilder_ == null) {
+          cursorFactory_ = null;
+        } else {
+          cursorFactory_ = null;
+          cursorFactoryBuilder_ = null;
+        }
+        return this;
+      }
+
+      public com.google.protobuf.Descriptors.Descriptor
+          getDescriptorForType() {
+        return org.apache.calcite.avatica.proto.Common.internal_static_Signature_descriptor;
+      }
+
+      public org.apache.calcite.avatica.proto.Common.Signature getDefaultInstanceForType() {
+        return org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance();
+      }
+
+      public org.apache.calcite.avatica.proto.Common.Signature build() {
+        org.apache.calcite.avatica.proto.Common.Signature result = buildPartial();
+        if (!result.isInitialized()) {
+          throw newUninitializedMessageException(result);
+        }
+        return result;
+      }
+
+      public org.apache.calcite.avatica.proto.Common.Signature buildPartial() {
+        org.apache.calcite.avatica.proto.Common.Signature result = new org.apache.calcite.avatica.proto.Common.Signature(this);
+        int from_bitField0_ = bitField0_;
+        int to_bitField0_ = 0;
+        if (columnsBuilder_ == null) {
+          if (((bitField0_ & 0x00000001) == 0x00000001)) {
+            columns_ = java.util.Collections.unmodifiableList(columns_);
+            bitField0_ = (bitField0_ & ~0x00000001);
+          }
+          result.columns_ = columns_;
+        } else {
+          result.columns_ = columnsBuilder_.build();
+        }
+        result.sql_ = sql_;
+        if (parametersBuilder_ == null) {
+          if (((bitField0_ & 0x00000004) == 0x00000004)) {
+            parameters_ = java.util.Collections.unmodifiableList(parameters_);
+            bitField0_ = (bitField0_ & ~0x00000004);
+          }
+          result.parameters_ = parameters_;
+        } else {
+          result.parameters_ = parametersBuilder_.build();
+        }
+        if (cursorFactoryBuilder_ == null) {
+          result.cursorFactory_ = cursorFactory_;
+        } else {
+          result.cursorFactory_ = cursorFactoryBuilder_.build();
+        }
+        result.bitField0_ = to_bitField0_;
+        onBuilt();
+        return result;
+      }
+
+      public Builder mergeFrom(com.google.protobuf.Message other) {
+        if (other instanceof org.apache.calcite.avatica.proto.Common.Signature) {
+          return mergeFrom((org.apache.calcite.avatica.proto.Common.Signature)other);
+        } else {
+          super.mergeFrom(other);
+          return this;
+        }
+      }
+
+      public Builder mergeFrom(org.apache.calcite.avatica.proto.Common.Signature other) {
+        if (other == org.apache.calcite.avatica.proto.Common.Signature.getDefaultInstance()) return this;
+        if (columnsBuilder_ == null) {
+          if (!other.columns_.isEmpty()) {
+            if (columns_.isEmpty()) {
+              columns_ = other.columns_;
+              bitField0_ = (bitField0_ & ~0x00000001);
+            } else {
+              ensureColumnsIsMutable();
+              columns_.addAll(other.columns_);
+            }
+            onChanged();
+          }
+        } else {
+          if (!other.columns_.isEmpty()) {
+            if (columnsBuilder_.isEmpty()) {
+              columnsBuilder_.dispose();
+              columnsBuilder_ = null;
+              columns_ = other.columns_;
+              bitField0_ = (bitField0_ & ~0x00000001);
+              columnsBuilder_ = 
+                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+                   getColumnsFieldBuilder() : null;
+            } else {
+              columnsBuilder_.addAllMessages(other.columns_);
+            }
+          }
+        }
+        if (!other.getSql().isEmpty()) {
+          sql_ = other.sql_;
+          onChanged();
+        }
+        if (parametersBuilder_ == null) {
+          if (!other.parameters_.isEmpty()) {
+            if (parameters_.isEmpty()) {
+              parameters_ = other.parameters_;
+              bitField0_ = (bitField0_ & ~0x00000004);
+            } else {
+              ensureParametersIsMutable();
+              parameters_.addAll(other.parameters_);
+            }
+            onChanged();
+          }
+        } else {
+          if (!other.parameters_.isEmpty()) {
+            if (parametersBuilder_.isEmpty()) {
+              parametersBuilder_.dispose();
+              parametersBuilder_ = null;
+              parameters_ = other.parameters_;
+              bitField0_ = (bitField0_ & ~0x00000004);
+              parametersBuilder_ = 
+                com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ?
+                   getParametersFieldBuilder() : null;
+            } else {
+              parametersBuilder_.addAllMessages(other.parameters_);
+            }
+          }
+        }
+        if (other.hasCursorFactory()) {
+          mergeCursorFactory(other.getCursorFactory());
+        }
+        onChanged();
+        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.calcite.avatica.proto.Common.Signature parsedMessage = null;
+        try {
+          parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+        } catch (com.google.protobuf.InvalidProtocolBuffe

<TRUNCATED>


Mime
View raw message