com.pingcap.tidb.tipb.SampleCollector Maven / Gradle / Ivy
The newest version!
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: analyze.proto
package com.pingcap.tidb.tipb;
/**
*
* SampleCollector is used for collect samples and calculate the count and ndv of an column.
*
*
* Protobuf type {@code tipb.SampleCollector}
*/
public final class SampleCollector extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:tipb.SampleCollector)
SampleCollectorOrBuilder {
private static final long serialVersionUID = 0L;
// Use SampleCollector.newBuilder() to construct.
private SampleCollector(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SampleCollector() {
samples_ = java.util.Collections.emptyList();
nullCount_ = 0L;
count_ = 0L;
totalSize_ = 0L;
}
@java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
private SampleCollector(
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 10: {
if (!((mutable_bitField0_ & 0x00000001) == 0x00000001)) {
samples_ = new java.util.ArrayList();
mutable_bitField0_ |= 0x00000001;
}
samples_.add(input.readBytes());
break;
}
case 16: {
bitField0_ |= 0x00000001;
nullCount_ = input.readInt64();
break;
}
case 24: {
bitField0_ |= 0x00000002;
count_ = input.readInt64();
break;
}
case 34: {
com.pingcap.tidb.tipb.FMSketch.Builder subBuilder = null;
if (((bitField0_ & 0x00000004) == 0x00000004)) {
subBuilder = fmSketch_.toBuilder();
}
fmSketch_ = input.readMessage(com.pingcap.tidb.tipb.FMSketch.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(fmSketch_);
fmSketch_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000004;
break;
}
case 42: {
com.pingcap.tidb.tipb.CMSketch.Builder subBuilder = null;
if (((bitField0_ & 0x00000008) == 0x00000008)) {
subBuilder = cmSketch_.toBuilder();
}
cmSketch_ = input.readMessage(com.pingcap.tidb.tipb.CMSketch.PARSER, extensionRegistry);
if (subBuilder != null) {
subBuilder.mergeFrom(cmSketch_);
cmSketch_ = subBuilder.buildPartial();
}
bitField0_ |= 0x00000008;
break;
}
case 48: {
bitField0_ |= 0x00000010;
totalSize_ = input.readInt64();
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_ & 0x00000001) == 0x00000001)) {
samples_ = java.util.Collections.unmodifiableList(samples_);
}
this.unknownFields = unknownFields.build();
makeExtensionsImmutable();
}
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.pingcap.tidb.tipb.Analyze.internal_static_tipb_SampleCollector_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.pingcap.tidb.tipb.Analyze.internal_static_tipb_SampleCollector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.pingcap.tidb.tipb.SampleCollector.class, com.pingcap.tidb.tipb.SampleCollector.Builder.class);
}
private int bitField0_;
public static final int SAMPLES_FIELD_NUMBER = 1;
private java.util.List samples_;
/**
* repeated bytes samples = 1;
*/
public java.util.List
getSamplesList() {
return samples_;
}
/**
* repeated bytes samples = 1;
*/
public int getSamplesCount() {
return samples_.size();
}
/**
* repeated bytes samples = 1;
*/
public com.google.protobuf.ByteString getSamples(int index) {
return samples_.get(index);
}
public static final int NULL_COUNT_FIELD_NUMBER = 2;
private long nullCount_;
/**
* optional int64 null_count = 2 [(.gogoproto.nullable) = false];
*/
public boolean hasNullCount() {
return ((bitField0_ & 0x00000001) == 0x00000001);
}
/**
* optional int64 null_count = 2 [(.gogoproto.nullable) = false];
*/
public long getNullCount() {
return nullCount_;
}
public static final int COUNT_FIELD_NUMBER = 3;
private long count_;
/**
* optional int64 count = 3 [(.gogoproto.nullable) = false];
*/
public boolean hasCount() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int64 count = 3 [(.gogoproto.nullable) = false];
*/
public long getCount() {
return count_;
}
public static final int FM_SKETCH_FIELD_NUMBER = 4;
private com.pingcap.tidb.tipb.FMSketch fmSketch_;
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public boolean hasFmSketch() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public com.pingcap.tidb.tipb.FMSketch getFmSketch() {
return fmSketch_ == null ? com.pingcap.tidb.tipb.FMSketch.getDefaultInstance() : fmSketch_;
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public com.pingcap.tidb.tipb.FMSketchOrBuilder getFmSketchOrBuilder() {
return fmSketch_ == null ? com.pingcap.tidb.tipb.FMSketch.getDefaultInstance() : fmSketch_;
}
public static final int CM_SKETCH_FIELD_NUMBER = 5;
private com.pingcap.tidb.tipb.CMSketch cmSketch_;
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public boolean hasCmSketch() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public com.pingcap.tidb.tipb.CMSketch getCmSketch() {
return cmSketch_ == null ? com.pingcap.tidb.tipb.CMSketch.getDefaultInstance() : cmSketch_;
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public com.pingcap.tidb.tipb.CMSketchOrBuilder getCmSketchOrBuilder() {
return cmSketch_ == null ? com.pingcap.tidb.tipb.CMSketch.getDefaultInstance() : cmSketch_;
}
public static final int TOTAL_SIZE_FIELD_NUMBER = 6;
private long totalSize_;
/**
* optional int64 total_size = 6;
*/
public boolean hasTotalSize() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional int64 total_size = 6;
*/
public long getTotalSize() {
return totalSize_;
}
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 {
for (int i = 0; i < samples_.size(); i++) {
output.writeBytes(1, samples_.get(i));
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
output.writeInt64(2, nullCount_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
output.writeInt64(3, count_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
output.writeMessage(4, getFmSketch());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
output.writeMessage(5, getCmSketch());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
output.writeInt64(6, totalSize_);
}
unknownFields.writeTo(output);
}
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < samples_.size(); i++) {
dataSize += com.google.protobuf.CodedOutputStream
.computeBytesSizeNoTag(samples_.get(i));
}
size += dataSize;
size += 1 * getSamplesList().size();
}
if (((bitField0_ & 0x00000001) == 0x00000001)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(2, nullCount_);
}
if (((bitField0_ & 0x00000002) == 0x00000002)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(3, count_);
}
if (((bitField0_ & 0x00000004) == 0x00000004)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, getFmSketch());
}
if (((bitField0_ & 0x00000008) == 0x00000008)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(5, getCmSketch());
}
if (((bitField0_ & 0x00000010) == 0x00000010)) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(6, totalSize_);
}
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.SampleCollector)) {
return super.equals(obj);
}
com.pingcap.tidb.tipb.SampleCollector other = (com.pingcap.tidb.tipb.SampleCollector) obj;
boolean result = true;
result = result && getSamplesList()
.equals(other.getSamplesList());
result = result && (hasNullCount() == other.hasNullCount());
if (hasNullCount()) {
result = result && (getNullCount()
== other.getNullCount());
}
result = result && (hasCount() == other.hasCount());
if (hasCount()) {
result = result && (getCount()
== other.getCount());
}
result = result && (hasFmSketch() == other.hasFmSketch());
if (hasFmSketch()) {
result = result && getFmSketch()
.equals(other.getFmSketch());
}
result = result && (hasCmSketch() == other.hasCmSketch());
if (hasCmSketch()) {
result = result && getCmSketch()
.equals(other.getCmSketch());
}
result = result && (hasTotalSize() == other.hasTotalSize());
if (hasTotalSize()) {
result = result && (getTotalSize()
== other.getTotalSize());
}
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 (getSamplesCount() > 0) {
hash = (37 * hash) + SAMPLES_FIELD_NUMBER;
hash = (53 * hash) + getSamplesList().hashCode();
}
if (hasNullCount()) {
hash = (37 * hash) + NULL_COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getNullCount());
}
if (hasCount()) {
hash = (37 * hash) + COUNT_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getCount());
}
if (hasFmSketch()) {
hash = (37 * hash) + FM_SKETCH_FIELD_NUMBER;
hash = (53 * hash) + getFmSketch().hashCode();
}
if (hasCmSketch()) {
hash = (37 * hash) + CM_SKETCH_FIELD_NUMBER;
hash = (53 * hash) + getCmSketch().hashCode();
}
if (hasTotalSize()) {
hash = (37 * hash) + TOTAL_SIZE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getTotalSize());
}
hash = (29 * hash) + unknownFields.hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.pingcap.tidb.tipb.SampleCollector parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.pingcap.tidb.tipb.SampleCollector 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.SampleCollector parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.pingcap.tidb.tipb.SampleCollector 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.SampleCollector parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.pingcap.tidb.tipb.SampleCollector parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.pingcap.tidb.tipb.SampleCollector parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.pingcap.tidb.tipb.SampleCollector 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.SampleCollector parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.pingcap.tidb.tipb.SampleCollector 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.SampleCollector parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.pingcap.tidb.tipb.SampleCollector 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.SampleCollector 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;
}
/**
*
* SampleCollector is used for collect samples and calculate the count and ndv of an column.
*
*
* Protobuf type {@code tipb.SampleCollector}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:tipb.SampleCollector)
com.pingcap.tidb.tipb.SampleCollectorOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.pingcap.tidb.tipb.Analyze.internal_static_tipb_SampleCollector_descriptor;
}
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.pingcap.tidb.tipb.Analyze.internal_static_tipb_SampleCollector_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.pingcap.tidb.tipb.SampleCollector.class, com.pingcap.tidb.tipb.SampleCollector.Builder.class);
}
// Construct using com.pingcap.tidb.tipb.SampleCollector.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFmSketchFieldBuilder();
getCmSketchFieldBuilder();
}
}
public Builder clear() {
super.clear();
samples_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
nullCount_ = 0L;
bitField0_ = (bitField0_ & ~0x00000002);
count_ = 0L;
bitField0_ = (bitField0_ & ~0x00000004);
if (fmSketchBuilder_ == null) {
fmSketch_ = null;
} else {
fmSketchBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
if (cmSketchBuilder_ == null) {
cmSketch_ = null;
} else {
cmSketchBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
totalSize_ = 0L;
bitField0_ = (bitField0_ & ~0x00000020);
return this;
}
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.pingcap.tidb.tipb.Analyze.internal_static_tipb_SampleCollector_descriptor;
}
public com.pingcap.tidb.tipb.SampleCollector getDefaultInstanceForType() {
return com.pingcap.tidb.tipb.SampleCollector.getDefaultInstance();
}
public com.pingcap.tidb.tipb.SampleCollector build() {
com.pingcap.tidb.tipb.SampleCollector result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
public com.pingcap.tidb.tipb.SampleCollector buildPartial() {
com.pingcap.tidb.tipb.SampleCollector result = new com.pingcap.tidb.tipb.SampleCollector(this);
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((bitField0_ & 0x00000001) == 0x00000001)) {
samples_ = java.util.Collections.unmodifiableList(samples_);
bitField0_ = (bitField0_ & ~0x00000001);
}
result.samples_ = samples_;
if (((from_bitField0_ & 0x00000002) == 0x00000002)) {
to_bitField0_ |= 0x00000001;
}
result.nullCount_ = nullCount_;
if (((from_bitField0_ & 0x00000004) == 0x00000004)) {
to_bitField0_ |= 0x00000002;
}
result.count_ = count_;
if (((from_bitField0_ & 0x00000008) == 0x00000008)) {
to_bitField0_ |= 0x00000004;
}
if (fmSketchBuilder_ == null) {
result.fmSketch_ = fmSketch_;
} else {
result.fmSketch_ = fmSketchBuilder_.build();
}
if (((from_bitField0_ & 0x00000010) == 0x00000010)) {
to_bitField0_ |= 0x00000008;
}
if (cmSketchBuilder_ == null) {
result.cmSketch_ = cmSketch_;
} else {
result.cmSketch_ = cmSketchBuilder_.build();
}
if (((from_bitField0_ & 0x00000020) == 0x00000020)) {
to_bitField0_ |= 0x00000010;
}
result.totalSize_ = totalSize_;
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.SampleCollector) {
return mergeFrom((com.pingcap.tidb.tipb.SampleCollector)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.pingcap.tidb.tipb.SampleCollector other) {
if (other == com.pingcap.tidb.tipb.SampleCollector.getDefaultInstance()) return this;
if (!other.samples_.isEmpty()) {
if (samples_.isEmpty()) {
samples_ = other.samples_;
bitField0_ = (bitField0_ & ~0x00000001);
} else {
ensureSamplesIsMutable();
samples_.addAll(other.samples_);
}
onChanged();
}
if (other.hasNullCount()) {
setNullCount(other.getNullCount());
}
if (other.hasCount()) {
setCount(other.getCount());
}
if (other.hasFmSketch()) {
mergeFmSketch(other.getFmSketch());
}
if (other.hasCmSketch()) {
mergeCmSketch(other.getCmSketch());
}
if (other.hasTotalSize()) {
setTotalSize(other.getTotalSize());
}
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.SampleCollector parsedMessage = null;
try {
parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
parsedMessage = (com.pingcap.tidb.tipb.SampleCollector) e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
if (parsedMessage != null) {
mergeFrom(parsedMessage);
}
}
return this;
}
private int bitField0_;
private java.util.List samples_ = java.util.Collections.emptyList();
private void ensureSamplesIsMutable() {
if (!((bitField0_ & 0x00000001) == 0x00000001)) {
samples_ = new java.util.ArrayList(samples_);
bitField0_ |= 0x00000001;
}
}
/**
* repeated bytes samples = 1;
*/
public java.util.List
getSamplesList() {
return java.util.Collections.unmodifiableList(samples_);
}
/**
* repeated bytes samples = 1;
*/
public int getSamplesCount() {
return samples_.size();
}
/**
* repeated bytes samples = 1;
*/
public com.google.protobuf.ByteString getSamples(int index) {
return samples_.get(index);
}
/**
* repeated bytes samples = 1;
*/
public Builder setSamples(
int index, com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureSamplesIsMutable();
samples_.set(index, value);
onChanged();
return this;
}
/**
* repeated bytes samples = 1;
*/
public Builder addSamples(com.google.protobuf.ByteString value) {
if (value == null) {
throw new NullPointerException();
}
ensureSamplesIsMutable();
samples_.add(value);
onChanged();
return this;
}
/**
* repeated bytes samples = 1;
*/
public Builder addAllSamples(
java.lang.Iterable extends com.google.protobuf.ByteString> values) {
ensureSamplesIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, samples_);
onChanged();
return this;
}
/**
* repeated bytes samples = 1;
*/
public Builder clearSamples() {
samples_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
private long nullCount_ ;
/**
* optional int64 null_count = 2 [(.gogoproto.nullable) = false];
*/
public boolean hasNullCount() {
return ((bitField0_ & 0x00000002) == 0x00000002);
}
/**
* optional int64 null_count = 2 [(.gogoproto.nullable) = false];
*/
public long getNullCount() {
return nullCount_;
}
/**
* optional int64 null_count = 2 [(.gogoproto.nullable) = false];
*/
public Builder setNullCount(long value) {
bitField0_ |= 0x00000002;
nullCount_ = value;
onChanged();
return this;
}
/**
* optional int64 null_count = 2 [(.gogoproto.nullable) = false];
*/
public Builder clearNullCount() {
bitField0_ = (bitField0_ & ~0x00000002);
nullCount_ = 0L;
onChanged();
return this;
}
private long count_ ;
/**
* optional int64 count = 3 [(.gogoproto.nullable) = false];
*/
public boolean hasCount() {
return ((bitField0_ & 0x00000004) == 0x00000004);
}
/**
* optional int64 count = 3 [(.gogoproto.nullable) = false];
*/
public long getCount() {
return count_;
}
/**
* optional int64 count = 3 [(.gogoproto.nullable) = false];
*/
public Builder setCount(long value) {
bitField0_ |= 0x00000004;
count_ = value;
onChanged();
return this;
}
/**
* optional int64 count = 3 [(.gogoproto.nullable) = false];
*/
public Builder clearCount() {
bitField0_ = (bitField0_ & ~0x00000004);
count_ = 0L;
onChanged();
return this;
}
private com.pingcap.tidb.tipb.FMSketch fmSketch_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.pingcap.tidb.tipb.FMSketch, com.pingcap.tidb.tipb.FMSketch.Builder, com.pingcap.tidb.tipb.FMSketchOrBuilder> fmSketchBuilder_;
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public boolean hasFmSketch() {
return ((bitField0_ & 0x00000008) == 0x00000008);
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public com.pingcap.tidb.tipb.FMSketch getFmSketch() {
if (fmSketchBuilder_ == null) {
return fmSketch_ == null ? com.pingcap.tidb.tipb.FMSketch.getDefaultInstance() : fmSketch_;
} else {
return fmSketchBuilder_.getMessage();
}
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public Builder setFmSketch(com.pingcap.tidb.tipb.FMSketch value) {
if (fmSketchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
fmSketch_ = value;
onChanged();
} else {
fmSketchBuilder_.setMessage(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public Builder setFmSketch(
com.pingcap.tidb.tipb.FMSketch.Builder builderForValue) {
if (fmSketchBuilder_ == null) {
fmSketch_ = builderForValue.build();
onChanged();
} else {
fmSketchBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public Builder mergeFmSketch(com.pingcap.tidb.tipb.FMSketch value) {
if (fmSketchBuilder_ == null) {
if (((bitField0_ & 0x00000008) == 0x00000008) &&
fmSketch_ != null &&
fmSketch_ != com.pingcap.tidb.tipb.FMSketch.getDefaultInstance()) {
fmSketch_ =
com.pingcap.tidb.tipb.FMSketch.newBuilder(fmSketch_).mergeFrom(value).buildPartial();
} else {
fmSketch_ = value;
}
onChanged();
} else {
fmSketchBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000008;
return this;
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public Builder clearFmSketch() {
if (fmSketchBuilder_ == null) {
fmSketch_ = null;
onChanged();
} else {
fmSketchBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000008);
return this;
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public com.pingcap.tidb.tipb.FMSketch.Builder getFmSketchBuilder() {
bitField0_ |= 0x00000008;
onChanged();
return getFmSketchFieldBuilder().getBuilder();
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
public com.pingcap.tidb.tipb.FMSketchOrBuilder getFmSketchOrBuilder() {
if (fmSketchBuilder_ != null) {
return fmSketchBuilder_.getMessageOrBuilder();
} else {
return fmSketch_ == null ?
com.pingcap.tidb.tipb.FMSketch.getDefaultInstance() : fmSketch_;
}
}
/**
* optional .tipb.FMSketch fm_sketch = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.pingcap.tidb.tipb.FMSketch, com.pingcap.tidb.tipb.FMSketch.Builder, com.pingcap.tidb.tipb.FMSketchOrBuilder>
getFmSketchFieldBuilder() {
if (fmSketchBuilder_ == null) {
fmSketchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.pingcap.tidb.tipb.FMSketch, com.pingcap.tidb.tipb.FMSketch.Builder, com.pingcap.tidb.tipb.FMSketchOrBuilder>(
getFmSketch(),
getParentForChildren(),
isClean());
fmSketch_ = null;
}
return fmSketchBuilder_;
}
private com.pingcap.tidb.tipb.CMSketch cmSketch_ = null;
private com.google.protobuf.SingleFieldBuilderV3<
com.pingcap.tidb.tipb.CMSketch, com.pingcap.tidb.tipb.CMSketch.Builder, com.pingcap.tidb.tipb.CMSketchOrBuilder> cmSketchBuilder_;
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public boolean hasCmSketch() {
return ((bitField0_ & 0x00000010) == 0x00000010);
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public com.pingcap.tidb.tipb.CMSketch getCmSketch() {
if (cmSketchBuilder_ == null) {
return cmSketch_ == null ? com.pingcap.tidb.tipb.CMSketch.getDefaultInstance() : cmSketch_;
} else {
return cmSketchBuilder_.getMessage();
}
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public Builder setCmSketch(com.pingcap.tidb.tipb.CMSketch value) {
if (cmSketchBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
cmSketch_ = value;
onChanged();
} else {
cmSketchBuilder_.setMessage(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public Builder setCmSketch(
com.pingcap.tidb.tipb.CMSketch.Builder builderForValue) {
if (cmSketchBuilder_ == null) {
cmSketch_ = builderForValue.build();
onChanged();
} else {
cmSketchBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public Builder mergeCmSketch(com.pingcap.tidb.tipb.CMSketch value) {
if (cmSketchBuilder_ == null) {
if (((bitField0_ & 0x00000010) == 0x00000010) &&
cmSketch_ != null &&
cmSketch_ != com.pingcap.tidb.tipb.CMSketch.getDefaultInstance()) {
cmSketch_ =
com.pingcap.tidb.tipb.CMSketch.newBuilder(cmSketch_).mergeFrom(value).buildPartial();
} else {
cmSketch_ = value;
}
onChanged();
} else {
cmSketchBuilder_.mergeFrom(value);
}
bitField0_ |= 0x00000010;
return this;
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public Builder clearCmSketch() {
if (cmSketchBuilder_ == null) {
cmSketch_ = null;
onChanged();
} else {
cmSketchBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000010);
return this;
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public com.pingcap.tidb.tipb.CMSketch.Builder getCmSketchBuilder() {
bitField0_ |= 0x00000010;
onChanged();
return getCmSketchFieldBuilder().getBuilder();
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
public com.pingcap.tidb.tipb.CMSketchOrBuilder getCmSketchOrBuilder() {
if (cmSketchBuilder_ != null) {
return cmSketchBuilder_.getMessageOrBuilder();
} else {
return cmSketch_ == null ?
com.pingcap.tidb.tipb.CMSketch.getDefaultInstance() : cmSketch_;
}
}
/**
* optional .tipb.CMSketch cm_sketch = 5;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.pingcap.tidb.tipb.CMSketch, com.pingcap.tidb.tipb.CMSketch.Builder, com.pingcap.tidb.tipb.CMSketchOrBuilder>
getCmSketchFieldBuilder() {
if (cmSketchBuilder_ == null) {
cmSketchBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.pingcap.tidb.tipb.CMSketch, com.pingcap.tidb.tipb.CMSketch.Builder, com.pingcap.tidb.tipb.CMSketchOrBuilder>(
getCmSketch(),
getParentForChildren(),
isClean());
cmSketch_ = null;
}
return cmSketchBuilder_;
}
private long totalSize_ ;
/**
* optional int64 total_size = 6;
*/
public boolean hasTotalSize() {
return ((bitField0_ & 0x00000020) == 0x00000020);
}
/**
* optional int64 total_size = 6;
*/
public long getTotalSize() {
return totalSize_;
}
/**
* optional int64 total_size = 6;
*/
public Builder setTotalSize(long value) {
bitField0_ |= 0x00000020;
totalSize_ = value;
onChanged();
return this;
}
/**
* optional int64 total_size = 6;
*/
public Builder clearTotalSize() {
bitField0_ = (bitField0_ & ~0x00000020);
totalSize_ = 0L;
onChanged();
return this;
}
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.SampleCollector)
}
// @@protoc_insertion_point(class_scope:tipb.SampleCollector)
private static final com.pingcap.tidb.tipb.SampleCollector DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.pingcap.tidb.tipb.SampleCollector();
}
public static com.pingcap.tidb.tipb.SampleCollector getDefaultInstance() {
return DEFAULT_INSTANCE;
}
@java.lang.Deprecated public static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
public SampleCollector parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return new SampleCollector(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.SampleCollector getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy