You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@calcite.apache.org by jc...@apache.org on 2015/11/11 13:25:17 UTC
[11/50] [abbrv] calcite git commit: [CALCITE-908] Bump protobuf to
3.0.0-beta-1, fix deprecations and update docs (Josh Elser)
http://git-wip-us.apache.org/repos/asf/calcite/blob/86610552/avatica/src/main/java/org/apache/calcite/avatica/proto/Requests.java
----------------------------------------------------------------------
diff --git a/avatica/src/main/java/org/apache/calcite/avatica/proto/Requests.java b/avatica/src/main/java/org/apache/calcite/avatica/proto/Requests.java
index 00b8623..15a9a2e 100644
--- a/avatica/src/main/java/org/apache/calcite/avatica/proto/Requests.java
+++ b/avatica/src/main/java/org/apache/calcite/avatica/proto/Requests.java
@@ -50,7 +50,7 @@ package org.apache.calcite.avatica.proto;
// @@protoc_insertion_point(message_implements:CatalogsRequest)
CatalogsRequestOrBuilder {
// Use CatalogsRequest.newBuilder() to construct.
- private CatalogsRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
+ private CatalogsRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private CatalogsRequest() {
@@ -64,8 +64,7 @@ package org.apache.calcite.avatica.proto;
}
private CatalogsRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -83,18 +82,19 @@ package org.apache.calcite.avatica.proto;
break;
}
case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- connectionId_ = bs;
+ connectionId_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -111,23 +111,8 @@ package org.apache.calcite.avatica.proto;
org.apache.calcite.avatica.proto.Requests.CatalogsRequest.class, org.apache.calcite.avatica.proto.Requests.CatalogsRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<CatalogsRequest> PARSER =
- new com.google.protobuf.AbstractParser<CatalogsRequest>() {
- public CatalogsRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new CatalogsRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<CatalogsRequest> getParserForType() {
- return PARSER;
- }
-
public static final int CONNECTION_ID_FIELD_NUMBER = 1;
- private java.lang.Object connectionId_;
+ private volatile java.lang.Object connectionId_;
/**
* <code>optional string connection_id = 1;</code>
*/
@@ -139,9 +124,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
}
}
@@ -174,23 +157,20 @@ package org.apache.calcite.avatica.proto;
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getConnectionIdBytes().isEmpty()) {
- output.writeBytes(1, getConnectionIdBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, connectionId_);
}
}
- private int memoizedSerializedSize = -1;
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getConnectionIdBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getConnectionIdBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, connectionId_);
}
- memoizedSerializedSize = size;
+ memoizedSize = size;
return size;
}
@@ -248,12 +228,17 @@ package org.apache.calcite.avatica.proto;
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.CatalogsRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
@@ -380,9 +365,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -434,7 +417,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
connectionId_ = value;
onChanged();
return this;
@@ -454,16 +438,45 @@ package org.apache.calcite.avatica.proto;
}
// @@protoc_insertion_point(class_scope:CatalogsRequest)
- private static final org.apache.calcite.avatica.proto.Requests.CatalogsRequest defaultInstance;static {
- defaultInstance = new org.apache.calcite.avatica.proto.Requests.CatalogsRequest();
+ private static final org.apache.calcite.avatica.proto.Requests.CatalogsRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Requests.CatalogsRequest();
}
public static org.apache.calcite.avatica.proto.Requests.CatalogsRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<CatalogsRequest>
+ PARSER = new com.google.protobuf.AbstractParser<CatalogsRequest>() {
+ public CatalogsRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new CatalogsRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ public static com.google.protobuf.Parser<CatalogsRequest> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<CatalogsRequest> getParserForType() {
+ return PARSER;
}
public org.apache.calcite.avatica.proto.Requests.CatalogsRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -494,7 +507,7 @@ package org.apache.calcite.avatica.proto;
// @@protoc_insertion_point(message_implements:DatabasePropertyRequest)
DatabasePropertyRequestOrBuilder {
// Use DatabasePropertyRequest.newBuilder() to construct.
- private DatabasePropertyRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
+ private DatabasePropertyRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private DatabasePropertyRequest() {
@@ -508,8 +521,7 @@ package org.apache.calcite.avatica.proto;
}
private DatabasePropertyRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -527,18 +539,19 @@ package org.apache.calcite.avatica.proto;
break;
}
case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- connectionId_ = bs;
+ connectionId_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -555,23 +568,8 @@ package org.apache.calcite.avatica.proto;
org.apache.calcite.avatica.proto.Requests.DatabasePropertyRequest.class, org.apache.calcite.avatica.proto.Requests.DatabasePropertyRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<DatabasePropertyRequest> PARSER =
- new com.google.protobuf.AbstractParser<DatabasePropertyRequest>() {
- public DatabasePropertyRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new DatabasePropertyRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<DatabasePropertyRequest> getParserForType() {
- return PARSER;
- }
-
public static final int CONNECTION_ID_FIELD_NUMBER = 1;
- private java.lang.Object connectionId_;
+ private volatile java.lang.Object connectionId_;
/**
* <code>optional string connection_id = 1;</code>
*/
@@ -583,9 +581,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
}
}
@@ -618,23 +614,20 @@ package org.apache.calcite.avatica.proto;
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getConnectionIdBytes().isEmpty()) {
- output.writeBytes(1, getConnectionIdBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, connectionId_);
}
}
- private int memoizedSerializedSize = -1;
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getConnectionIdBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getConnectionIdBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, connectionId_);
}
- memoizedSerializedSize = size;
+ memoizedSize = size;
return size;
}
@@ -692,12 +685,17 @@ package org.apache.calcite.avatica.proto;
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.DatabasePropertyRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
@@ -824,9 +822,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -878,7 +874,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
connectionId_ = value;
onChanged();
return this;
@@ -898,16 +895,45 @@ package org.apache.calcite.avatica.proto;
}
// @@protoc_insertion_point(class_scope:DatabasePropertyRequest)
- private static final org.apache.calcite.avatica.proto.Requests.DatabasePropertyRequest defaultInstance;static {
- defaultInstance = new org.apache.calcite.avatica.proto.Requests.DatabasePropertyRequest();
+ private static final org.apache.calcite.avatica.proto.Requests.DatabasePropertyRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Requests.DatabasePropertyRequest();
}
public static org.apache.calcite.avatica.proto.Requests.DatabasePropertyRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<DatabasePropertyRequest>
+ PARSER = new com.google.protobuf.AbstractParser<DatabasePropertyRequest>() {
+ public DatabasePropertyRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new DatabasePropertyRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ public static com.google.protobuf.Parser<DatabasePropertyRequest> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<DatabasePropertyRequest> getParserForType() {
+ return PARSER;
}
public org.apache.calcite.avatica.proto.Requests.DatabasePropertyRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -958,7 +984,7 @@ package org.apache.calcite.avatica.proto;
// @@protoc_insertion_point(message_implements:SchemasRequest)
SchemasRequestOrBuilder {
// Use SchemasRequest.newBuilder() to construct.
- private SchemasRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
+ private SchemasRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private SchemasRequest() {
@@ -974,8 +1000,7 @@ package org.apache.calcite.avatica.proto;
}
private SchemasRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -993,30 +1018,31 @@ package org.apache.calcite.avatica.proto;
break;
}
case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- catalog_ = bs;
+ catalog_ = s;
break;
}
case 18: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- schemaPattern_ = bs;
+ schemaPattern_ = s;
break;
}
case 26: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- connectionId_ = bs;
+ connectionId_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -1033,23 +1059,8 @@ package org.apache.calcite.avatica.proto;
org.apache.calcite.avatica.proto.Requests.SchemasRequest.class, org.apache.calcite.avatica.proto.Requests.SchemasRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<SchemasRequest> PARSER =
- new com.google.protobuf.AbstractParser<SchemasRequest>() {
- public SchemasRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new SchemasRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<SchemasRequest> getParserForType() {
- return PARSER;
- }
-
public static final int CATALOG_FIELD_NUMBER = 1;
- private java.lang.Object catalog_;
+ private volatile java.lang.Object catalog_;
/**
* <code>optional string catalog = 1;</code>
*/
@@ -1061,9 +1072,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- catalog_ = s;
- }
+ catalog_ = s;
return s;
}
}
@@ -1085,7 +1094,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int SCHEMA_PATTERN_FIELD_NUMBER = 2;
- private java.lang.Object schemaPattern_;
+ private volatile java.lang.Object schemaPattern_;
/**
* <code>optional string schema_pattern = 2;</code>
*/
@@ -1097,9 +1106,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- schemaPattern_ = s;
- }
+ schemaPattern_ = s;
return s;
}
}
@@ -1121,7 +1128,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int CONNECTION_ID_FIELD_NUMBER = 3;
- private java.lang.Object connectionId_;
+ private volatile java.lang.Object connectionId_;
/**
* <code>optional string connection_id = 3;</code>
*/
@@ -1133,9 +1140,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
}
}
@@ -1168,37 +1173,32 @@ package org.apache.calcite.avatica.proto;
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getCatalogBytes().isEmpty()) {
- output.writeBytes(1, getCatalogBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, catalog_);
}
if (!getSchemaPatternBytes().isEmpty()) {
- output.writeBytes(2, getSchemaPatternBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, schemaPattern_);
}
if (!getConnectionIdBytes().isEmpty()) {
- output.writeBytes(3, getConnectionIdBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 3, connectionId_);
}
}
- private int memoizedSerializedSize = -1;
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCatalogBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getCatalogBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, catalog_);
}
if (!getSchemaPatternBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getSchemaPatternBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, schemaPattern_);
}
if (!getConnectionIdBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, getConnectionIdBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(3, connectionId_);
}
- memoizedSerializedSize = size;
+ memoizedSize = size;
return size;
}
@@ -1256,12 +1256,17 @@ package org.apache.calcite.avatica.proto;
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.SchemasRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
@@ -1402,9 +1407,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- catalog_ = s;
- }
+ catalog_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -1456,7 +1459,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
catalog_ = value;
onChanged();
return this;
@@ -1472,9 +1476,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- schemaPattern_ = s;
- }
+ schemaPattern_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -1526,7 +1528,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
schemaPattern_ = value;
onChanged();
return this;
@@ -1542,9 +1545,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -1596,7 +1597,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
connectionId_ = value;
onChanged();
return this;
@@ -1616,16 +1618,45 @@ package org.apache.calcite.avatica.proto;
}
// @@protoc_insertion_point(class_scope:SchemasRequest)
- private static final org.apache.calcite.avatica.proto.Requests.SchemasRequest defaultInstance;static {
- defaultInstance = new org.apache.calcite.avatica.proto.Requests.SchemasRequest();
+ private static final org.apache.calcite.avatica.proto.Requests.SchemasRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Requests.SchemasRequest();
}
public static org.apache.calcite.avatica.proto.Requests.SchemasRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<SchemasRequest>
+ PARSER = new com.google.protobuf.AbstractParser<SchemasRequest>() {
+ public SchemasRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new SchemasRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ public static com.google.protobuf.Parser<SchemasRequest> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<SchemasRequest> getParserForType() {
+ return PARSER;
}
public org.apache.calcite.avatica.proto.Requests.SchemasRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -1715,7 +1746,7 @@ package org.apache.calcite.avatica.proto;
// @@protoc_insertion_point(message_implements:TablesRequest)
TablesRequestOrBuilder {
// Use TablesRequest.newBuilder() to construct.
- private TablesRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
+ private TablesRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private TablesRequest() {
@@ -1734,8 +1765,7 @@ package org.apache.calcite.avatica.proto;
}
private TablesRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -1753,30 +1783,30 @@ package org.apache.calcite.avatica.proto;
break;
}
case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- catalog_ = bs;
+ catalog_ = s;
break;
}
case 18: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- schemaPattern_ = bs;
+ schemaPattern_ = s;
break;
}
case 26: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- tableNamePattern_ = bs;
+ tableNamePattern_ = s;
break;
}
case 34: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
if (!((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
typeList_ = new com.google.protobuf.LazyStringArrayList();
mutable_bitField0_ |= 0x00000008;
}
- typeList_.add(bs);
+ typeList_.add(s);
break;
}
case 48: {
@@ -1785,18 +1815,19 @@ package org.apache.calcite.avatica.proto;
break;
}
case 58: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- connectionId_ = bs;
+ connectionId_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
if (((mutable_bitField0_ & 0x00000008) == 0x00000008)) {
typeList_ = typeList_.getUnmodifiableView();
@@ -1816,24 +1847,9 @@ package org.apache.calcite.avatica.proto;
org.apache.calcite.avatica.proto.Requests.TablesRequest.class, org.apache.calcite.avatica.proto.Requests.TablesRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<TablesRequest> PARSER =
- new com.google.protobuf.AbstractParser<TablesRequest>() {
- public TablesRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new TablesRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<TablesRequest> getParserForType() {
- return PARSER;
- }
-
private int bitField0_;
public static final int CATALOG_FIELD_NUMBER = 1;
- private java.lang.Object catalog_;
+ private volatile java.lang.Object catalog_;
/**
* <code>optional string catalog = 1;</code>
*/
@@ -1845,9 +1861,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- catalog_ = s;
- }
+ catalog_ = s;
return s;
}
}
@@ -1869,7 +1883,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int SCHEMA_PATTERN_FIELD_NUMBER = 2;
- private java.lang.Object schemaPattern_;
+ private volatile java.lang.Object schemaPattern_;
/**
* <code>optional string schema_pattern = 2;</code>
*/
@@ -1881,9 +1895,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- schemaPattern_ = s;
- }
+ schemaPattern_ = s;
return s;
}
}
@@ -1905,7 +1917,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int TABLE_NAME_PATTERN_FIELD_NUMBER = 3;
- private java.lang.Object tableNamePattern_;
+ private volatile java.lang.Object tableNamePattern_;
/**
* <code>optional string table_name_pattern = 3;</code>
*/
@@ -1917,9 +1929,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- tableNamePattern_ = s;
- }
+ tableNamePattern_ = s;
return s;
}
}
@@ -1983,7 +1993,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int CONNECTION_ID_FIELD_NUMBER = 7;
- private java.lang.Object connectionId_;
+ private volatile java.lang.Object connectionId_;
/**
* <code>optional string connection_id = 7;</code>
*/
@@ -1995,9 +2005,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
}
}
@@ -2030,50 +2038,44 @@ package org.apache.calcite.avatica.proto;
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getCatalogBytes().isEmpty()) {
- output.writeBytes(1, getCatalogBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, catalog_);
}
if (!getSchemaPatternBytes().isEmpty()) {
- output.writeBytes(2, getSchemaPatternBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, schemaPattern_);
}
if (!getTableNamePatternBytes().isEmpty()) {
- output.writeBytes(3, getTableNamePatternBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 3, tableNamePattern_);
}
for (int i = 0; i < typeList_.size(); i++) {
- output.writeBytes(4, typeList_.getByteString(i));
+ com.google.protobuf.GeneratedMessage.writeString(output, 4, typeList_.getRaw(i));
}
if (hasTypeList_ != false) {
output.writeBool(6, hasTypeList_);
}
if (!getConnectionIdBytes().isEmpty()) {
- output.writeBytes(7, getConnectionIdBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 7, connectionId_);
}
}
- private int memoizedSerializedSize = -1;
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCatalogBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getCatalogBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, catalog_);
}
if (!getSchemaPatternBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getSchemaPatternBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, schemaPattern_);
}
if (!getTableNamePatternBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, getTableNamePatternBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(3, tableNamePattern_);
}
{
int dataSize = 0;
for (int i = 0; i < typeList_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(typeList_.getByteString(i));
+ dataSize += computeStringSizeNoTag(typeList_.getRaw(i));
}
size += dataSize;
size += 1 * getTypeListList().size();
@@ -2083,10 +2085,9 @@ package org.apache.calcite.avatica.proto;
.computeBoolSize(6, hasTypeList_);
}
if (!getConnectionIdBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(7, getConnectionIdBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(7, connectionId_);
}
- memoizedSerializedSize = size;
+ memoizedSize = size;
return size;
}
@@ -2144,12 +2145,17 @@ package org.apache.calcite.avatica.proto;
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.TablesRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
@@ -2325,9 +2331,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- catalog_ = s;
- }
+ catalog_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -2379,7 +2383,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
catalog_ = value;
onChanged();
return this;
@@ -2395,9 +2400,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- schemaPattern_ = s;
- }
+ schemaPattern_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -2449,7 +2452,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
schemaPattern_ = value;
onChanged();
return this;
@@ -2465,9 +2469,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- tableNamePattern_ = s;
- }
+ tableNamePattern_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -2519,7 +2521,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
tableNamePattern_ = value;
onChanged();
return this;
@@ -2612,7 +2615,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
- ensureTypeListIsMutable();
+ checkByteStringIsUtf8(value);
+ ensureTypeListIsMutable();
typeList_.add(value);
onChanged();
return this;
@@ -2666,9 +2670,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -2720,7 +2722,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
connectionId_ = value;
onChanged();
return this;
@@ -2740,16 +2743,45 @@ package org.apache.calcite.avatica.proto;
}
// @@protoc_insertion_point(class_scope:TablesRequest)
- private static final org.apache.calcite.avatica.proto.Requests.TablesRequest defaultInstance;static {
- defaultInstance = new org.apache.calcite.avatica.proto.Requests.TablesRequest();
+ private static final org.apache.calcite.avatica.proto.Requests.TablesRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Requests.TablesRequest();
}
public static org.apache.calcite.avatica.proto.Requests.TablesRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<TablesRequest>
+ PARSER = new com.google.protobuf.AbstractParser<TablesRequest>() {
+ public TablesRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new TablesRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ public static com.google.protobuf.Parser<TablesRequest> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<TablesRequest> getParserForType() {
+ return PARSER;
}
public org.apache.calcite.avatica.proto.Requests.TablesRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -2780,7 +2812,7 @@ package org.apache.calcite.avatica.proto;
// @@protoc_insertion_point(message_implements:TableTypesRequest)
TableTypesRequestOrBuilder {
// Use TableTypesRequest.newBuilder() to construct.
- private TableTypesRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
+ private TableTypesRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private TableTypesRequest() {
@@ -2794,8 +2826,7 @@ package org.apache.calcite.avatica.proto;
}
private TableTypesRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -2813,18 +2844,19 @@ package org.apache.calcite.avatica.proto;
break;
}
case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- connectionId_ = bs;
+ connectionId_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -2841,23 +2873,8 @@ package org.apache.calcite.avatica.proto;
org.apache.calcite.avatica.proto.Requests.TableTypesRequest.class, org.apache.calcite.avatica.proto.Requests.TableTypesRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<TableTypesRequest> PARSER =
- new com.google.protobuf.AbstractParser<TableTypesRequest>() {
- public TableTypesRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new TableTypesRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<TableTypesRequest> getParserForType() {
- return PARSER;
- }
-
public static final int CONNECTION_ID_FIELD_NUMBER = 1;
- private java.lang.Object connectionId_;
+ private volatile java.lang.Object connectionId_;
/**
* <code>optional string connection_id = 1;</code>
*/
@@ -2869,9 +2886,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
}
}
@@ -2904,23 +2919,20 @@ package org.apache.calcite.avatica.proto;
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getConnectionIdBytes().isEmpty()) {
- output.writeBytes(1, getConnectionIdBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, connectionId_);
}
}
- private int memoizedSerializedSize = -1;
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getConnectionIdBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getConnectionIdBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, connectionId_);
}
- memoizedSerializedSize = size;
+ memoizedSize = size;
return size;
}
@@ -2978,12 +2990,17 @@ package org.apache.calcite.avatica.proto;
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.TableTypesRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
@@ -3110,9 +3127,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -3164,7 +3179,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
connectionId_ = value;
onChanged();
return this;
@@ -3184,16 +3200,45 @@ package org.apache.calcite.avatica.proto;
}
// @@protoc_insertion_point(class_scope:TableTypesRequest)
- private static final org.apache.calcite.avatica.proto.Requests.TableTypesRequest defaultInstance;static {
- defaultInstance = new org.apache.calcite.avatica.proto.Requests.TableTypesRequest();
+ private static final org.apache.calcite.avatica.proto.Requests.TableTypesRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Requests.TableTypesRequest();
}
public static org.apache.calcite.avatica.proto.Requests.TableTypesRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<TableTypesRequest>
+ PARSER = new com.google.protobuf.AbstractParser<TableTypesRequest>() {
+ public TableTypesRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new TableTypesRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ public static com.google.protobuf.Parser<TableTypesRequest> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<TableTypesRequest> getParserForType() {
+ return PARSER;
}
public org.apache.calcite.avatica.proto.Requests.TableTypesRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -3265,7 +3310,7 @@ package org.apache.calcite.avatica.proto;
// @@protoc_insertion_point(message_implements:ColumnsRequest)
ColumnsRequestOrBuilder {
// Use ColumnsRequest.newBuilder() to construct.
- private ColumnsRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
+ private ColumnsRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private ColumnsRequest() {
@@ -3283,8 +3328,7 @@ package org.apache.calcite.avatica.proto;
}
private ColumnsRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -3302,42 +3346,43 @@ package org.apache.calcite.avatica.proto;
break;
}
case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- catalog_ = bs;
+ catalog_ = s;
break;
}
case 18: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- schemaPattern_ = bs;
+ schemaPattern_ = s;
break;
}
case 26: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- tableNamePattern_ = bs;
+ tableNamePattern_ = s;
break;
}
case 34: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- columnNamePattern_ = bs;
+ columnNamePattern_ = s;
break;
}
case 42: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- connectionId_ = bs;
+ connectionId_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -3350,27 +3395,12 @@ package org.apache.calcite.avatica.proto;
protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
internalGetFieldAccessorTable() {
return org.apache.calcite.avatica.proto.Requests.internal_static_ColumnsRequest_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- org.apache.calcite.avatica.proto.Requests.ColumnsRequest.class, org.apache.calcite.avatica.proto.Requests.ColumnsRequest.Builder.class);
- }
-
- public static final com.google.protobuf.Parser<ColumnsRequest> PARSER =
- new com.google.protobuf.AbstractParser<ColumnsRequest>() {
- public ColumnsRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ColumnsRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<ColumnsRequest> getParserForType() {
- return PARSER;
+ .ensureFieldAccessorsInitialized(
+ org.apache.calcite.avatica.proto.Requests.ColumnsRequest.class, org.apache.calcite.avatica.proto.Requests.ColumnsRequest.Builder.class);
}
public static final int CATALOG_FIELD_NUMBER = 1;
- private java.lang.Object catalog_;
+ private volatile java.lang.Object catalog_;
/**
* <code>optional string catalog = 1;</code>
*/
@@ -3382,9 +3412,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- catalog_ = s;
- }
+ catalog_ = s;
return s;
}
}
@@ -3406,7 +3434,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int SCHEMA_PATTERN_FIELD_NUMBER = 2;
- private java.lang.Object schemaPattern_;
+ private volatile java.lang.Object schemaPattern_;
/**
* <code>optional string schema_pattern = 2;</code>
*/
@@ -3418,9 +3446,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- schemaPattern_ = s;
- }
+ schemaPattern_ = s;
return s;
}
}
@@ -3442,7 +3468,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int TABLE_NAME_PATTERN_FIELD_NUMBER = 3;
- private java.lang.Object tableNamePattern_;
+ private volatile java.lang.Object tableNamePattern_;
/**
* <code>optional string table_name_pattern = 3;</code>
*/
@@ -3454,9 +3480,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- tableNamePattern_ = s;
- }
+ tableNamePattern_ = s;
return s;
}
}
@@ -3478,7 +3502,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int COLUMN_NAME_PATTERN_FIELD_NUMBER = 4;
- private java.lang.Object columnNamePattern_;
+ private volatile java.lang.Object columnNamePattern_;
/**
* <code>optional string column_name_pattern = 4;</code>
*/
@@ -3490,9 +3514,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- columnNamePattern_ = s;
- }
+ columnNamePattern_ = s;
return s;
}
}
@@ -3514,7 +3536,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int CONNECTION_ID_FIELD_NUMBER = 5;
- private java.lang.Object connectionId_;
+ private volatile java.lang.Object connectionId_;
/**
* <code>optional string connection_id = 5;</code>
*/
@@ -3526,9 +3548,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
}
}
@@ -3561,51 +3581,44 @@ package org.apache.calcite.avatica.proto;
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getCatalogBytes().isEmpty()) {
- output.writeBytes(1, getCatalogBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, catalog_);
}
if (!getSchemaPatternBytes().isEmpty()) {
- output.writeBytes(2, getSchemaPatternBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, schemaPattern_);
}
if (!getTableNamePatternBytes().isEmpty()) {
- output.writeBytes(3, getTableNamePatternBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 3, tableNamePattern_);
}
if (!getColumnNamePatternBytes().isEmpty()) {
- output.writeBytes(4, getColumnNamePatternBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 4, columnNamePattern_);
}
if (!getConnectionIdBytes().isEmpty()) {
- output.writeBytes(5, getConnectionIdBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 5, connectionId_);
}
}
- private int memoizedSerializedSize = -1;
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getCatalogBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getCatalogBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, catalog_);
}
if (!getSchemaPatternBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getSchemaPatternBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, schemaPattern_);
}
if (!getTableNamePatternBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(3, getTableNamePatternBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(3, tableNamePattern_);
}
if (!getColumnNamePatternBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(4, getColumnNamePatternBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(4, columnNamePattern_);
}
if (!getConnectionIdBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(5, getConnectionIdBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(5, connectionId_);
}
- memoizedSerializedSize = size;
+ memoizedSize = size;
return size;
}
@@ -3663,12 +3676,17 @@ package org.apache.calcite.avatica.proto;
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.ColumnsRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
@@ -3824,9 +3842,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- catalog_ = s;
- }
+ catalog_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -3878,7 +3894,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
catalog_ = value;
onChanged();
return this;
@@ -3894,9 +3911,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- schemaPattern_ = s;
- }
+ schemaPattern_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -3948,7 +3963,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
schemaPattern_ = value;
onChanged();
return this;
@@ -3964,9 +3980,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- tableNamePattern_ = s;
- }
+ tableNamePattern_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -4018,7 +4032,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
tableNamePattern_ = value;
onChanged();
return this;
@@ -4034,9 +4049,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- columnNamePattern_ = s;
- }
+ columnNamePattern_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -4088,7 +4101,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
columnNamePattern_ = value;
onChanged();
return this;
@@ -4104,9 +4118,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -4158,7 +4170,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
connectionId_ = value;
onChanged();
return this;
@@ -4178,16 +4191,45 @@ package org.apache.calcite.avatica.proto;
}
// @@protoc_insertion_point(class_scope:ColumnsRequest)
- private static final org.apache.calcite.avatica.proto.Requests.ColumnsRequest defaultInstance;static {
- defaultInstance = new org.apache.calcite.avatica.proto.Requests.ColumnsRequest();
+ private static final org.apache.calcite.avatica.proto.Requests.ColumnsRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Requests.ColumnsRequest();
}
public static org.apache.calcite.avatica.proto.Requests.ColumnsRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<ColumnsRequest>
+ PARSER = new com.google.protobuf.AbstractParser<ColumnsRequest>() {
+ public ColumnsRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new ColumnsRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ public static com.google.protobuf.Parser<ColumnsRequest> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<ColumnsRequest> getParserForType() {
+ return PARSER;
}
public org.apache.calcite.avatica.proto.Requests.ColumnsRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -4218,7 +4260,7 @@ package org.apache.calcite.avatica.proto;
// @@protoc_insertion_point(message_implements:TypeInfoRequest)
TypeInfoRequestOrBuilder {
// Use TypeInfoRequest.newBuilder() to construct.
- private TypeInfoRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
+ private TypeInfoRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private TypeInfoRequest() {
@@ -4232,8 +4274,7 @@ package org.apache.calcite.avatica.proto;
}
private TypeInfoRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -4251,18 +4292,19 @@ package org.apache.calcite.avatica.proto;
break;
}
case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- connectionId_ = bs;
+ connectionId_ = s;
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -4279,23 +4321,8 @@ package org.apache.calcite.avatica.proto;
org.apache.calcite.avatica.proto.Requests.TypeInfoRequest.class, org.apache.calcite.avatica.proto.Requests.TypeInfoRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<TypeInfoRequest> PARSER =
- new com.google.protobuf.AbstractParser<TypeInfoRequest>() {
- public TypeInfoRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new TypeInfoRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<TypeInfoRequest> getParserForType() {
- return PARSER;
- }
-
public static final int CONNECTION_ID_FIELD_NUMBER = 1;
- private java.lang.Object connectionId_;
+ private volatile java.lang.Object connectionId_;
/**
* <code>optional string connection_id = 1;</code>
*/
@@ -4307,9 +4334,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
}
}
@@ -4342,23 +4367,20 @@ package org.apache.calcite.avatica.proto;
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getConnectionIdBytes().isEmpty()) {
- output.writeBytes(1, getConnectionIdBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, connectionId_);
}
}
- private int memoizedSerializedSize = -1;
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getConnectionIdBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getConnectionIdBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, connectionId_);
}
- memoizedSerializedSize = size;
+ memoizedSize = size;
return size;
}
@@ -4416,12 +4438,17 @@ package org.apache.calcite.avatica.proto;
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.TypeInfoRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
@@ -4548,9 +4575,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -4602,7 +4627,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
connectionId_ = value;
onChanged();
return this;
@@ -4622,16 +4648,45 @@ package org.apache.calcite.avatica.proto;
}
// @@protoc_insertion_point(class_scope:TypeInfoRequest)
- private static final org.apache.calcite.avatica.proto.Requests.TypeInfoRequest defaultInstance;static {
- defaultInstance = new org.apache.calcite.avatica.proto.Requests.TypeInfoRequest();
+ private static final org.apache.calcite.avatica.proto.Requests.TypeInfoRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Requests.TypeInfoRequest();
}
public static org.apache.calcite.avatica.proto.Requests.TypeInfoRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<TypeInfoRequest>
+ PARSER = new com.google.protobuf.AbstractParser<TypeInfoRequest>() {
+ public TypeInfoRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new TypeInfoRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ public static com.google.protobuf.Parser<TypeInfoRequest> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<TypeInfoRequest> getParserForType() {
+ return PARSER;
}
public org.apache.calcite.avatica.proto.Requests.TypeInfoRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -4682,7 +4737,7 @@ package org.apache.calcite.avatica.proto;
// @@protoc_insertion_point(message_implements:PrepareAndExecuteRequest)
PrepareAndExecuteRequestOrBuilder {
// Use PrepareAndExecuteRequest.newBuilder() to construct.
- private PrepareAndExecuteRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
+ private PrepareAndExecuteRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private PrepareAndExecuteRequest() {
@@ -4699,8 +4754,7 @@ package org.apache.calcite.avatica.proto;
}
private PrepareAndExecuteRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -4718,15 +4772,15 @@ package org.apache.calcite.avatica.proto;
break;
}
case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- connectionId_ = bs;
+ connectionId_ = s;
break;
}
case 18: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- sql_ = bs;
+ sql_ = s;
break;
}
case 24: {
@@ -4742,10 +4796,11 @@ package org.apache.calcite.avatica.proto;
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -4762,23 +4817,8 @@ package org.apache.calcite.avatica.proto;
org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest.class, org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<PrepareAndExecuteRequest> PARSER =
- new com.google.protobuf.AbstractParser<PrepareAndExecuteRequest>() {
- public PrepareAndExecuteRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new PrepareAndExecuteRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<PrepareAndExecuteRequest> getParserForType() {
- return PARSER;
- }
-
public static final int CONNECTION_ID_FIELD_NUMBER = 1;
- private java.lang.Object connectionId_;
+ private volatile java.lang.Object connectionId_;
/**
* <code>optional string connection_id = 1;</code>
*/
@@ -4790,9 +4830,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
}
}
@@ -4814,7 +4852,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int SQL_FIELD_NUMBER = 2;
- private java.lang.Object sql_;
+ private volatile java.lang.Object sql_;
/**
* <code>optional string sql = 2;</code>
*/
@@ -4826,9 +4864,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- sql_ = s;
- }
+ sql_ = s;
return s;
}
}
@@ -4879,12 +4915,11 @@ package org.apache.calcite.avatica.proto;
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
- getSerializedSize();
if (!getConnectionIdBytes().isEmpty()) {
- output.writeBytes(1, getConnectionIdBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 1, connectionId_);
}
if (!getSqlBytes().isEmpty()) {
- output.writeBytes(2, getSqlBytes());
+ com.google.protobuf.GeneratedMessage.writeString(output, 2, sql_);
}
if (maxRowCount_ != 0L) {
output.writeUInt64(3, maxRowCount_);
@@ -4894,19 +4929,16 @@ package org.apache.calcite.avatica.proto;
}
}
- private int memoizedSerializedSize = -1;
public int getSerializedSize() {
- int size = memoizedSerializedSize;
+ int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!getConnectionIdBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(1, getConnectionIdBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(1, connectionId_);
}
if (!getSqlBytes().isEmpty()) {
- size += com.google.protobuf.CodedOutputStream
- .computeBytesSize(2, getSqlBytes());
+ size += com.google.protobuf.GeneratedMessage.computeStringSize(2, sql_);
}
if (maxRowCount_ != 0L) {
size += com.google.protobuf.CodedOutputStream
@@ -4916,7 +4948,7 @@ package org.apache.calcite.avatica.proto;
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(4, statementId_);
}
- memoizedSerializedSize = size;
+ memoizedSize = size;
return size;
}
@@ -4974,12 +5006,17 @@ package org.apache.calcite.avatica.proto;
return PARSER.parseFrom(input, extensionRegistry);
}
- public static Builder newBuilder() { return new Builder(); }
public Builder newBuilderForType() { return newBuilder(); }
+ public static Builder newBuilder() {
+ return DEFAULT_INSTANCE.toBuilder();
+ }
public static Builder newBuilder(org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest prototype) {
- return newBuilder().mergeFrom(prototype);
+ return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
+ }
+ public Builder toBuilder() {
+ return this == DEFAULT_INSTANCE
+ ? new Builder() : new Builder().mergeFrom(this);
}
- public Builder toBuilder() { return newBuilder(this); }
@java.lang.Override
protected Builder newBuilderForType(
@@ -5125,9 +5162,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -5179,7 +5214,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
connectionId_ = value;
onChanged();
return this;
@@ -5195,9 +5231,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- sql_ = s;
- }
+ sql_ = s;
return s;
} else {
return (java.lang.String) ref;
@@ -5249,7 +5283,8 @@ package org.apache.calcite.avatica.proto;
if (value == null) {
throw new NullPointerException();
}
-
+ checkByteStringIsUtf8(value);
+
sql_ = value;
onChanged();
return this;
@@ -5321,16 +5356,45 @@ package org.apache.calcite.avatica.proto;
}
// @@protoc_insertion_point(class_scope:PrepareAndExecuteRequest)
- private static final org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest defaultInstance;static {
- defaultInstance = new org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest();
+ private static final org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest DEFAULT_INSTANCE;
+ static {
+ DEFAULT_INSTANCE = new org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest();
}
public static org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest getDefaultInstance() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
+ }
+
+ private static final com.google.protobuf.Parser<PrepareAndExecuteRequest>
+ PARSER = new com.google.protobuf.AbstractParser<PrepareAndExecuteRequest>() {
+ public PrepareAndExecuteRequest parsePartialFrom(
+ com.google.protobuf.CodedInputStream input,
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry)
+ throws com.google.protobuf.InvalidProtocolBufferException {
+ try {
+ return new PrepareAndExecuteRequest(input, extensionRegistry);
+ } catch (RuntimeException e) {
+ if (e.getCause() instanceof
+ com.google.protobuf.InvalidProtocolBufferException) {
+ throw (com.google.protobuf.InvalidProtocolBufferException)
+ e.getCause();
+ }
+ throw e;
+ }
+ }
+ };
+
+ public static com.google.protobuf.Parser<PrepareAndExecuteRequest> parser() {
+ return PARSER;
+ }
+
+ @java.lang.Override
+ public com.google.protobuf.Parser<PrepareAndExecuteRequest> getParserForType() {
+ return PARSER;
}
public org.apache.calcite.avatica.proto.Requests.PrepareAndExecuteRequest getDefaultInstanceForType() {
- return defaultInstance;
+ return DEFAULT_INSTANCE;
}
}
@@ -5376,7 +5440,7 @@ package org.apache.calcite.avatica.proto;
// @@protoc_insertion_point(message_implements:PrepareRequest)
PrepareRequestOrBuilder {
// Use PrepareRequest.newBuilder() to construct.
- private PrepareRequest(com.google.protobuf.GeneratedMessage.Builder builder) {
+ private PrepareRequest(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
super(builder);
}
private PrepareRequest() {
@@ -5392,8 +5456,7 @@ package org.apache.calcite.avatica.proto;
}
private PrepareRequest(
com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
+ com.google.protobuf.ExtensionRegistryLite extensionRegistry) {
this();
int mutable_bitField0_ = 0;
try {
@@ -5411,15 +5474,15 @@ package org.apache.calcite.avatica.proto;
break;
}
case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- connectionId_ = bs;
+ connectionId_ = s;
break;
}
case 18: {
- com.google.protobuf.ByteString bs = input.readBytes();
+ String s = input.readStringRequireUtf8();
- sql_ = bs;
+ sql_ = s;
break;
}
case 24: {
@@ -5430,10 +5493,11 @@ package org.apache.calcite.avatica.proto;
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
+ throw new RuntimeException(e.setUnfinishedMessage(this));
} catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e.getMessage()).setUnfinishedMessage(this);
+ throw new RuntimeException(
+ new com.google.protobuf.InvalidProtocolBufferException(
+ e.getMessage()).setUnfinishedMessage(this));
} finally {
makeExtensionsImmutable();
}
@@ -5450,23 +5514,8 @@ package org.apache.calcite.avatica.proto;
org.apache.calcite.avatica.proto.Requests.PrepareRequest.class, org.apache.calcite.avatica.proto.Requests.PrepareRequest.Builder.class);
}
- public static final com.google.protobuf.Parser<PrepareRequest> PARSER =
- new com.google.protobuf.AbstractParser<PrepareRequest>() {
- public PrepareRequest parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new PrepareRequest(input, extensionRegistry);
- }
- };
-
- @java.lang.Override
- public com.google.protobuf.Parser<PrepareRequest> getParserForType() {
- return PARSER;
- }
-
public static final int CONNECTION_ID_FIELD_NUMBER = 1;
- private java.lang.Object connectionId_;
+ private volatile java.lang.Object connectionId_;
/**
* <code>optional string connection_id = 1;</code>
*/
@@ -5478,9 +5527,7 @@ package org.apache.calcite.avatica.proto;
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- connectionId_ = s;
- }
+ connectionId_ = s;
return s;
}
}
@@ -5502,7 +5549,7 @@ package org.apache.calcite.avatica.proto;
}
public static final int SQL_FIELD_NUMBER = 2;
- private java.lang.Object sql_;
+ private volatile java.lang.Object sql_;
<TRUNCATED>