com.pingcap.tidb.tipb.Expr Maven / Gradle / Ivy
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: expression.proto
package com.pingcap.tidb.tipb;
/**
*
* Evaluators should implement evaluation functions for every expression type.
*
*
* Protobuf type {@code tipb.Expr}
*/
public final class Expr extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tipb.Expr)
ExprOrBuilder {
private static final long serialVersionUID = 0L;
// Use Expr.newBuilder() to construct.
private Expr(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private Expr() {
tp_ = 0;
val_ = com.google.protobuf.ByteString.EMPTY;
children_ = java.util.Collections.emptyList();
rpnArgsLen_ = 0;
sig_ = 0;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private Expr(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
this();
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
int mutable_bitField0_ = 0;
com.google.protobuf.UnknownFieldSet.Builder unknownFields =
com.google.protobuf.UnknownFieldSet.newBuilder();
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
default: {
if (!parseUnknownField(
input, unknownFields, extensionRegistry, tag)) {
done = true;
}
break;
}
case 8: {
int rawValue = input.readEnum();
com.pingcap.tidb.tipb.ExprType value = com.pingcap.tidb.tipb.ExprType.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(1, rawValue);
} else {
bitField0_ |= 0x00000001;
tp_ = rawValue;
}
break;
}
case 18: {
bitField0_ |= 0x00000002;
val_ = input.readBytes();
break;
}
case 26: {
if (!((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
children_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000004;
}
children_.add(
input.readMessage(com.pingcap.tidb.tipb.Expr.PARSER, extensionRegistry));
break;
}
case 32: {
int rawValue = input.readEnum();
com.pingcap.tidb.tipb.ScalarFuncSig value = com.pingcap.tidb.tipb.ScalarFuncSig.valueOf(rawValue);
if (value == null) {
unknownFields.mergeVarintField(4, rawValue);
} else {
bitField0_ |= 0x00000008;
sig_ = rawValue;
}
break;
}
case 42: {
com.pingcap.tidb.tipb.FieldType.Builder subBuilder = null;
if (((bitField0_ & 0x00000010) == 0x00000010)) {
subBuilder = fieldType_.toBuilder();
}
fieldType_ = input.readMessage(com.pingcap.tidb.tipb.FieldType.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fieldType_);
fieldType_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000010;
break;
}
case 48: {
bitField0_ |= 0x00000004;
rpnArgsLen_ = input.readUInt32();
break;
}
}
}
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(this);
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(
e).setUnfinishedMessage(this);
} finally {
if (((mutable_bitField0_ & 0x00000004) == 0x00000004)) {
children_ = java.util.Collections.unmodifiableList(children_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.pingcap.tidb.tipb.Expression.internal_static_tipb_Expr_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.pingcap.tidb.tipb.Expression.internal_static_tipb_Expr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.pingcap.tidb.tipb.Expr.class, com.pingcap.tidb.tipb.Expr.Builder.class);
}
private int bitField0_;
public static final int TP_FIELD_NUMBER = 1;
private int tp_;
/**
* optional .tipb.ExprType tp = 1 [(.gogoproto.nullable) = false];
*/
public boolean hasTp() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .tipb.ExprType tp = 1 [(.gogoproto.nullable) = false];
*/
public com.pingcap.tidb.tipb.ExprType getTp() {
com.pingcap.tidb.tipb.ExprType result = com.pingcap.tidb.tipb.ExprType.valueOf(tp_);
return result == null ? com.pingcap.tidb.tipb.ExprType.Null : result;
}
public static final int VAL_FIELD_NUMBER = 2;
private com.google.protobuf.ByteString val_;
/**
* optional bytes val = 2;
*/
public boolean hasVal() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional bytes val = 2;
*/
public com.google.protobuf.ByteString getVal() {
return val_;
}
public static final int CHILDREN_FIELD_NUMBER = 3;
private java.util.List children_;
/**
* repeated .tipb.Expr children = 3;
*/
public java.util.List getChildrenList() {
return children_;
}
/**
* repeated .tipb.Expr children = 3;
*/
public java.util.List extends com.pingcap.tidb.tipb.ExprOrBuilder>
getChildrenOrBuilderList() {
return children_;
}
/**
* repeated .tipb.Expr children = 3;
*/
public int getChildrenCount() {
return children_.size();
}
/**
* repeated .tipb.Expr children = 3;
*/
public com.pingcap.tidb.tipb.Expr getChildren(int index) {
return children_.get(index);
}
/**
* repeated .tipb.Expr children = 3;
*/
public com.pingcap.tidb.tipb.ExprOrBuilder getChildrenOrBuilder(
int index) {
return children_.get(index);
}
public static final int RPN_ARGS_LEN_FIELD_NUMBER = 6;
private int rpnArgsLen_;
/**
* optional uint32 rpn_args_len = 6;
*/
public boolean hasRpnArgsLen() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional uint32 rpn_args_len = 6;
*/
public int getRpnArgsLen() {
return rpnArgsLen_;
}
public static final int SIG_FIELD_NUMBER = 4;
private int sig_;
/**
* optional .tipb.ScalarFuncSig sig = 4 [(.gogoproto.nullable) = false];
*/
public boolean hasSig() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .tipb.ScalarFuncSig sig = 4 [(.gogoproto.nullable) = false];
*/
public com.pingcap.tidb.tipb.ScalarFuncSig getSig() {
com.pingcap.tidb.tipb.ScalarFuncSig result = com.pingcap.tidb.tipb.ScalarFuncSig.valueOf(sig_);
return result == null ? com.pingcap.tidb.tipb.ScalarFuncSig.Unspecified : result;
}
public static final int FIELD_TYPE_FIELD_NUMBER = 5;
private com.pingcap.tidb.tipb.FieldType fieldType_;
/**
* optional .tipb.FieldType field_type = 5;
*/
public boolean hasFieldType() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .tipb.FieldType field_type = 5;
*/
public com.pingcap.tidb.tipb.FieldType getFieldType() {
return fieldType_ == null ? com.pingcap.tidb.tipb.FieldType.getDefaultInstance() : fieldType_;
}
/**
* optional .tipb.FieldType field_type = 5;
*/
public com.pingcap.tidb.tipb.FieldTypeOrBuilder getFieldTypeOrBuilder() {
return fieldType_ == null ? com.pingcap.tidb.tipb.FieldType.getDefaultInstance() : fieldType_;
}
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 {
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeEnum(1, tp_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeBytes(2, val_);
}
for (int i = 0; i < children_.size(); i++) {
output.writeMessage(3, children_.get(i));
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeEnum(4, sig_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeMessage(5, getFieldType());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeUInt32(6, rpnArgsLen_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(1, tp_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeBytesSize(2, val_);
}
for (int i = 0; i < children_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, children_.get(i));
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, sig_);
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getFieldType());
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeUInt32Size(6, rpnArgsLen_);
}
size += unknownFields.getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.pingcap.tidb.tipb.Expr)) {
return super.equals(obj);
}
com.pingcap.tidb.tipb.Expr other = (com.pingcap.tidb.tipb.Expr) obj;
boolean result = true;
result = result && (hasTp() == other.hasTp());
if (hasTp()) {
result = result && tp_ == other.tp_;
}
result = result && (hasVal() == other.hasVal());
if (hasVal()) {
result = result && getVal()
.equals(other.getVal());
}
result = result && getChildrenList()
.equals(other.getChildrenList());
result = result && (hasRpnArgsLen() == other.hasRpnArgsLen());
if (hasRpnArgsLen()) {
result = result && (getRpnArgsLen()
== other.getRpnArgsLen());
}
result = result && (hasSig() == other.hasSig());
if (hasSig()) {
result = result && sig_ == other.sig_;
}
result = result && (hasFieldType() == other.hasFieldType());
if (hasFieldType()) {
result = result && getFieldType()
.equals(other.getFieldType());
}
result = result && unknownFields.equals(other.unknownFields);
return result;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasTp()) {
hash = (37 * hash) + TP_FIELD_NUMBER;
hash = (53 * hash) + tp_;
}
if (hasVal()) {
hash = (37 * hash) + VAL_FIELD_NUMBER;
hash = (53 * hash) + getVal().hashCode();
}
if (getChildrenCount() > 0) {
hash = (37 * hash) + CHILDREN_FIELD_NUMBER;
hash = (53 * hash) + getChildrenList().hashCode();
}
if (hasRpnArgsLen()) {
hash = (37 * hash) + RPN_ARGS_LEN_FIELD_NUMBER;
hash = (53 * hash) + getRpnArgsLen();
}
if (hasSig()) {
hash = (37 * hash) + SIG_FIELD_NUMBER;
hash = (53 * hash) + sig_;
}
if (hasFieldType()) {
hash = (37 * hash) + FIELD_TYPE_FIELD_NUMBER;
hash = (53 * hash) + getFieldType().hashCode();
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.pingcap.tidb.tipb.Expr parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.pingcap.tidb.tipb.Expr parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.pingcap.tidb.tipb.Expr parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.pingcap.tidb.tipb.Expr parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.pingcap.tidb.tipb.Expr parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.pingcap.tidb.tipb.Expr parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.pingcap.tidb.tipb.Expr parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.pingcap.tidb.tipb.Expr parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.pingcap.tidb.tipb.Expr parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.pingcap.tidb.tipb.Expr parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.pingcap.tidb.tipb.Expr parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.pingcap.tidb.tipb.Expr parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.pingcap.tidb.tipb.Expr prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
*
* Evaluators should implement evaluation functions for every expression type.
*
*
* Protobuf type {@code tipb.Expr}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tipb.Expr)
com.pingcap.tidb.tipb.ExprOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.pingcap.tidb.tipb.Expression.internal_static_tipb_Expr_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.pingcap.tidb.tipb.Expression.internal_static_tipb_Expr_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.pingcap.tidb.tipb.Expr.class, com.pingcap.tidb.tipb.Expr.Builder.class);
}
// Construct using com.pingcap.tidb.tipb.Expr.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getChildrenFieldBuilder();
getFieldTypeFieldBuilder();
}
}
public Builder clear() {
super.clear();
tp_ = 0;
bitField0_ = (bitField0_ & ~0x00000001);
val_ = com.google.protobuf.ByteString.EMPTY;
bitField0_ = (bitField0_ & ~0x00000002);
if (childrenBuilder_ == null) {
children_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
} else {
childrenBuilder_.clear();
}
rpnArgsLen_ = 0;
bitField0_ = (bitField0_ & ~0x00000008);
sig_ = 0;
bitField0_ = (bitField0_ & ~0x00000010);
if (fieldTypeBuilder_ == null) {
fieldType_ = null;
} else {
fieldTypeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.pingcap.tidb.tipb.Expression.internal_static_tipb_Expr_descriptor;
}
public com.pingcap.tidb.tipb.Expr getDefaultInstanceForType() {
return com.pingcap.tidb.tipb.Expr.getDefaultInstance();
}
public com.pingcap.tidb.tipb.Expr build() {
com.pingcap.tidb.tipb.Expr result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.pingcap.tidb.tipb.Expr buildPartial() {
com.pingcap.tidb.tipb.Expr result = new com.pingcap.tidb.tipb.Expr(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) == 0x00000001)) {
to_bitField0_ |= 0x00000001;
}
result.tp_ = tp_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000002;
}
result.val_ = val_;
if (childrenBuilder_ == null) {
if (((bitField0_ & 0x00000004) == 0x00000004)) {
children_ = java.util.Collections.unmodifiableList(children_);
bitField0_ = (bitField0_ & ~0x00000004);
}
result.children_ = children_;
} else {
result.children_ = childrenBuilder_.build();
}
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000004;
}
result.rpnArgsLen_ = rpnArgsLen_;
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000008;
}
result.sig_ = sig_;
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000010;
}
if (fieldTypeBuilder_ == null) {
result.fieldType_ = fieldType_;
} else {
result.fieldType_ = fieldTypeBuilder_.build();
}
result.bitField0_ = to_bitField0_;
onBuilt();
return result;
}
public Builder clone() {
return (Builder) super.clone();
}
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.setField(field, value);
}
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return (Builder) super.clearField(field);
}
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return (Builder) super.clearOneof(oneof);
}
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return (Builder) super.setRepeatedField(field, index, value);
}
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return (Builder) super.addRepeatedField(field, value);
}
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.pingcap.tidb.tipb.Expr) {
return mergeFrom((com.pingcap.tidb.tipb.Expr)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.pingcap.tidb.tipb.Expr other) {
if (other == com.pingcap.tidb.tipb.Expr.getDefaultInstance()) return this;
if (other.hasTp()) {
setTp(other.getTp());
}
if (other.hasVal()) {
setVal(other.getVal());
}
if (childrenBuilder_ == null) {
if (!other.children_.isEmpty()) {
if (children_.isEmpty()) {
children_ = other.children_;
bitField0_ = (bitField0_ & ~0x00000004);
} else {
ensureChildrenIsMutable();
children_.addAll(other.children_);
}
onChanged();
}
} else {
if (!other.children_.isEmpty()) {
if (childrenBuilder_.isEmpty()) {
childrenBuilder_.dispose();
childrenBuilder_ = null;
children_ = other.children_;
bitField0_ = (bitField0_ & ~0x00000004);
childrenBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getChildrenFieldBuilder() : null;
} else {
childrenBuilder_.addAllMessages(other.children_);
}
}
}
if (other.hasRpnArgsLen()) {
setRpnArgsLen(other.getRpnArgsLen());
}
if (other.hasSig()) {
setSig(other.getSig());
}
if (other.hasFieldType()) {
mergeFieldType(other.getFieldType());
}
this.mergeUnknownFields(other.unknownFields);
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 {
com.pingcap.tidb.tipb.Expr parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.pingcap.tidb.tipb.Expr) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private int tp_ = 0;
/**
* optional .tipb.ExprType tp = 1 [(.gogoproto.nullable) = false];
*/
public boolean hasTp() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional .tipb.ExprType tp = 1 [(.gogoproto.nullable) = false];
*/
public com.pingcap.tidb.tipb.ExprType getTp() {
com.pingcap.tidb.tipb.ExprType result = com.pingcap.tidb.tipb.ExprType.valueOf(tp_);
return result == null ? com.pingcap.tidb.tipb.ExprType.Null : result;
}
/**
* optional .tipb.ExprType tp = 1 [(.gogoproto.nullable) = false];
*/
public Builder setTp(com.pingcap.tidb.tipb.ExprType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000001;
tp_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .tipb.ExprType tp = 1 [(.gogoproto.nullable) = false];
*/
public Builder clearTp() {
bitField0_ = (bitField0_ & ~0x00000001);
tp_ = 0;
onChanged();
return this;
}
private com.google.protobuf.ByteString val_ = com.google.protobuf.ByteString.EMPTY;
/**
* optional bytes val = 2;
*/
public boolean hasVal() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional bytes val = 2;
*/
public com.google.protobuf.ByteString getVal() {
return val_;
}
/**
* optional bytes val = 2;
*/
public Builder setVal(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
val_ = value;
onChanged();
return this;
}
/**
* optional bytes val = 2;
*/
public Builder clearVal() {
bitField0_ = (bitField0_ & ~0x00000002);
val_ = getDefaultInstance().getVal();
onChanged();
return this;
}
private java.util.List children_ =
java.util.Collections.emptyList();
private void ensureChildrenIsMutable() {
if (!((bitField0_ & 0x00000004) == 0x00000004)) {
children_ = new java.util.ArrayList(children_);
bitField0_ |= 0x00000004;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.pingcap.tidb.tipb.Expr, com.pingcap.tidb.tipb.Expr.Builder, com.pingcap.tidb.tipb.ExprOrBuilder> childrenBuilder_;
/**
* repeated .tipb.Expr children = 3;
*/
public java.util.List getChildrenList() {
if (childrenBuilder_ == null) {
return java.util.Collections.unmodifiableList(children_);
} else {
return childrenBuilder_.getMessageList();
}
}
/**
* repeated .tipb.Expr children = 3;
*/
public int getChildrenCount() {
if (childrenBuilder_ == null) {
return children_.size();
} else {
return childrenBuilder_.getCount();
}
}
/**
* repeated .tipb.Expr children = 3;
*/
public com.pingcap.tidb.tipb.Expr getChildren(int index) {
if (childrenBuilder_ == null) {
return children_.get(index);
} else {
return childrenBuilder_.getMessage(index);
}
}
/**
* repeated .tipb.Expr children = 3;
*/
public Builder setChildren(
int index, com.pingcap.tidb.tipb.Expr value) {
if (childrenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChildrenIsMutable();
children_.set(index, value);
onChanged();
} else {
childrenBuilder_.setMessage(index, value);
}
return this;
}
/**
* repeated .tipb.Expr children = 3;
*/
public Builder setChildren(
int index, com.pingcap.tidb.tipb.Expr.Builder builderForValue) {
if (childrenBuilder_ == null) {
ensureChildrenIsMutable();
children_.set(index, builderForValue.build());
onChanged();
} else {
childrenBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tipb.Expr children = 3;
*/
public Builder addChildren(com.pingcap.tidb.tipb.Expr value) {
if (childrenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChildrenIsMutable();
children_.add(value);
onChanged();
} else {
childrenBuilder_.addMessage(value);
}
return this;
}
/**
* repeated .tipb.Expr children = 3;
*/
public Builder addChildren(
int index, com.pingcap.tidb.tipb.Expr value) {
if (childrenBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureChildrenIsMutable();
children_.add(index, value);
onChanged();
} else {
childrenBuilder_.addMessage(index, value);
}
return this;
}
/**
* repeated .tipb.Expr children = 3;
*/
public Builder addChildren(
com.pingcap.tidb.tipb.Expr.Builder builderForValue) {
if (childrenBuilder_ == null) {
ensureChildrenIsMutable();
children_.add(builderForValue.build());
onChanged();
} else {
childrenBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
* repeated .tipb.Expr children = 3;
*/
public Builder addChildren(
int index, com.pingcap.tidb.tipb.Expr.Builder builderForValue) {
if (childrenBuilder_ == null) {
ensureChildrenIsMutable();
children_.add(index, builderForValue.build());
onChanged();
} else {
childrenBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
* repeated .tipb.Expr children = 3;
*/
public Builder addAllChildren(
java.lang.Iterable extends com.pingcap.tidb.tipb.Expr> values) {
if (childrenBuilder_ == null) {
ensureChildrenIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, children_);
onChanged();
} else {
childrenBuilder_.addAllMessages(values);
}
return this;
}
/**
* repeated .tipb.Expr children = 3;
*/
public Builder clearChildren() {
if (childrenBuilder_ == null) {
children_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
} else {
childrenBuilder_.clear();
}
return this;
}
/**
* repeated .tipb.Expr children = 3;
*/
public Builder removeChildren(int index) {
if (childrenBuilder_ == null) {
ensureChildrenIsMutable();
children_.remove(index);
onChanged();
} else {
childrenBuilder_.remove(index);
}
return this;
}
/**
* repeated .tipb.Expr children = 3;
*/
public com.pingcap.tidb.tipb.Expr.Builder getChildrenBuilder(
int index) {
return getChildrenFieldBuilder().getBuilder(index);
}
/**
* repeated .tipb.Expr children = 3;
*/
public com.pingcap.tidb.tipb.ExprOrBuilder getChildrenOrBuilder(
int index) {
if (childrenBuilder_ == null) {
return children_.get(index); } else {
return childrenBuilder_.getMessageOrBuilder(index);
}
}
/**
* repeated .tipb.Expr children = 3;
*/
public java.util.List extends com.pingcap.tidb.tipb.ExprOrBuilder>
getChildrenOrBuilderList() {
if (childrenBuilder_ != null) {
return childrenBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(children_);
}
}
/**
* repeated .tipb.Expr children = 3;
*/
public com.pingcap.tidb.tipb.Expr.Builder addChildrenBuilder() {
return getChildrenFieldBuilder().addBuilder(
com.pingcap.tidb.tipb.Expr.getDefaultInstance());
}
/**
* repeated .tipb.Expr children = 3;
*/
public com.pingcap.tidb.tipb.Expr.Builder addChildrenBuilder(
int index) {
return getChildrenFieldBuilder().addBuilder(
index, com.pingcap.tidb.tipb.Expr.getDefaultInstance());
}
/**
* repeated .tipb.Expr children = 3;
*/
public java.util.List
getChildrenBuilderList() {
return getChildrenFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.pingcap.tidb.tipb.Expr, com.pingcap.tidb.tipb.Expr.Builder, com.pingcap.tidb.tipb.ExprOrBuilder>
getChildrenFieldBuilder() {
if (childrenBuilder_ == null) {
childrenBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.pingcap.tidb.tipb.Expr, com.pingcap.tidb.tipb.Expr.Builder, com.pingcap.tidb.tipb.ExprOrBuilder>(
children_,
((bitField0_ & 0x00000004) == 0x00000004),
getParentForChildren(),
isClean());
children_ = null;
}
return childrenBuilder_;
}
private int rpnArgsLen_ ;
/**
* optional uint32 rpn_args_len = 6;
*/
public boolean hasRpnArgsLen() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional uint32 rpn_args_len = 6;
*/
public int getRpnArgsLen() {
return rpnArgsLen_;
}
/**
* optional uint32 rpn_args_len = 6;
*/
public Builder setRpnArgsLen(int value) {
bitField0_ |= 0x00000008;
rpnArgsLen_ = value;
onChanged();
return this;
}
/**
* optional uint32 rpn_args_len = 6;
*/
public Builder clearRpnArgsLen() {
bitField0_ = (bitField0_ & ~0x00000008);
rpnArgsLen_ = 0;
onChanged();
return this;
}
private int sig_ = 0;
/**
* optional .tipb.ScalarFuncSig sig = 4 [(.gogoproto.nullable) = false];
*/
public boolean hasSig() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .tipb.ScalarFuncSig sig = 4 [(.gogoproto.nullable) = false];
*/
public com.pingcap.tidb.tipb.ScalarFuncSig getSig() {
com.pingcap.tidb.tipb.ScalarFuncSig result = com.pingcap.tidb.tipb.ScalarFuncSig.valueOf(sig_);
return result == null ? com.pingcap.tidb.tipb.ScalarFuncSig.Unspecified : result;
}
/**
* optional .tipb.ScalarFuncSig sig = 4 [(.gogoproto.nullable) = false];
*/
public Builder setSig(com.pingcap.tidb.tipb.ScalarFuncSig value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000010;
sig_ = value.getNumber();
onChanged();
return this;
}
/**
* optional .tipb.ScalarFuncSig sig = 4 [(.gogoproto.nullable) = false];
*/
public Builder clearSig() {
bitField0_ = (bitField0_ & ~0x00000010);
sig_ = 0;
onChanged();
return this;
}
private com.pingcap.tidb.tipb.FieldType fieldType_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.pingcap.tidb.tipb.FieldType, com.pingcap.tidb.tipb.FieldType.Builder, com.pingcap.tidb.tipb.FieldTypeOrBuilder> fieldTypeBuilder_;
/**
* optional .tipb.FieldType field_type = 5;
*/
public boolean hasFieldType() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional .tipb.FieldType field_type = 5;
*/
public com.pingcap.tidb.tipb.FieldType getFieldType() {
if (fieldTypeBuilder_ == null) {
return fieldType_ == null ? com.pingcap.tidb.tipb.FieldType.getDefaultInstance() : fieldType_;
} else {
return fieldTypeBuilder_.getMessage();
}
}
/**
* optional .tipb.FieldType field_type = 5;
*/
public Builder setFieldType(com.pingcap.tidb.tipb.FieldType value) {
if (fieldTypeBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fieldType_ = value;
onChanged();
} else {
fieldTypeBuilder_.setMessage(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
* optional .tipb.FieldType field_type = 5;
*/
public Builder setFieldType(
com.pingcap.tidb.tipb.FieldType.Builder builderForValue) {
if (fieldTypeBuilder_ == null) {
fieldType_ = builderForValue.build();
onChanged();
} else {
fieldTypeBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
return this;
}
/**
* optional .tipb.FieldType field_type = 5;
*/
public Builder mergeFieldType(com.pingcap.tidb.tipb.FieldType value) {
if (fieldTypeBuilder_ == null) {
if (((bitField0_ & 0x00000020) == 0x00000020) &&
fieldType_ != null &&
fieldType_ != com.pingcap.tidb.tipb.FieldType.getDefaultInstance()) {
fieldType_ =
com.pingcap.tidb.tipb.FieldType.newBuilder(fieldType_).mergeFrom(value).buildPartial();
} else {
fieldType_ = value;
}
onChanged();
} else {
fieldTypeBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000020;
return this;
}
/**
* optional .tipb.FieldType field_type = 5;
*/
public Builder clearFieldType() {
if (fieldTypeBuilder_ == null) {
fieldType_ = null;
onChanged();
} else {
fieldTypeBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
/**
* optional .tipb.FieldType field_type = 5;
*/
public com.pingcap.tidb.tipb.FieldType.Builder getFieldTypeBuilder() {
bitField0_ |= 0x00000020;
onChanged();
return getFieldTypeFieldBuilder().getBuilder();
}
/**
* optional .tipb.FieldType field_type = 5;
*/
public com.pingcap.tidb.tipb.FieldTypeOrBuilder getFieldTypeOrBuilder() {
if (fieldTypeBuilder_ != null) {
return fieldTypeBuilder_.getMessageOrBuilder();
} else {
return fieldType_ == null ?
com.pingcap.tidb.tipb.FieldType.getDefaultInstance() : fieldType_;
}
}
/**
* optional .tipb.FieldType field_type = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.pingcap.tidb.tipb.FieldType, com.pingcap.tidb.tipb.FieldType.Builder, com.pingcap.tidb.tipb.FieldTypeOrBuilder>
getFieldTypeFieldBuilder() {
if (fieldTypeBuilder_ == null) {
fieldTypeBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.pingcap.tidb.tipb.FieldType, com.pingcap.tidb.tipb.FieldType.Builder, com.pingcap.tidb.tipb.FieldTypeOrBuilder>(
getFieldType(),
getParentForChildren(),
isClean());
fieldType_ = null;
}
return fieldTypeBuilder_;
}
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:tipb.Expr)
}
// @@protoc_insertion_point(class_scope:tipb.Expr)
private static final com.pingcap.tidb.tipb.Expr DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.pingcap.tidb.tipb.Expr();
}
public static com.pingcap.tidb.tipb.Expr getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public Expr parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new Expr(input, extensionRegistry);
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
public com.pingcap.tidb.tipb.Expr getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy