This is an automated email from the ASF dual-hosted git repository.
kfaraz pushed a commit to branch 25.0.0
in repository https://gitbox.apache.org/repos/asf/druid.git
The following commit(s) were added to refs/heads/25.0.0 by this push:
new cbccde5a13 allow string dimension indexer to handle byte[] as base64
strings (#13573) (#13582)
cbccde5a13 is described below
commit cbccde5a131558f79ead34fce313ee592a2b9923
Author: Kashif Faraz <[email protected]>
AuthorDate: Fri Dec 16 16:28:20 2022 +0530
allow string dimension indexer to handle byte[] as base64 strings (#13573)
(#13582)
This PR expands `StringDimensionIndexer` to handle conversion of `byte[]`
to base64 encoded strings, rather than the current behavior of calling java
`toString`.
This issue was uncovered by a regression of sorts introduced by #13519,
which updated the protobuf extension to directly convert stuff to java types,
resulting in `bytes` typed values being converted as `byte[]` instead of a
base64 string which the previous JSON based conversion created. While
outputting `byte[]` is more consistent with other input formats, and preferable
when the bytes can be consumed directly (such as complex types serde), when fed
to a `StringDimensionIndexer`, it [...]
I added some protobuf `bytes` tests, but they don't really hit the new
`StringDimensionIndexer` behavior because they operate on the `InputRow`
directly, and call `getDimension` to validate stuff. The parser based version
still uses the old conversion mechanisms, so when not using a flattener
incorrectly calls `toString` on the `ByteString`. I have encoded this behavior
in the test for now, if we either update the parser to use the new flattener or
just .. remove parsers we can remove [...]
Co-authored-by: Clint Wylie <[email protected]>
---
examples/bin/generate-example-metrics | 2 +-
.../data/input/protobuf/ProtoTestEventWrapper.java | 1156 ++++++++++----------
.../input/protobuf/ProtobufInputFormatTest.java | 16 +-
.../input/protobuf/ProtobufInputRowParserTest.java | 23 +-
.../data/input/protobuf/ProtobufReaderTest.java | 6 +-
.../src/test/resources/ProtoTest.proto | 7 +-
.../src/test/resources/prototest.desc | Bin 998 -> 1040 bytes
.../druid/segment/StringDimensionIndexer.java | 4 +
.../druid/segment/StringDimensionIndexerTest.java | 18 +
9 files changed, 654 insertions(+), 578 deletions(-)
diff --git a/examples/bin/generate-example-metrics
b/examples/bin/generate-example-metrics
index 3bec6afeb6..dd9f61befd 100755
--- a/examples/bin/generate-example-metrics
+++ b/examples/bin/generate-example-metrics
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python3
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements. See the NOTICE file
diff --git
a/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtoTestEventWrapper.java
b/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtoTestEventWrapper.java
index 80c69877d7..91d8fb6e56 100644
---
a/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtoTestEventWrapper.java
+++
b/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtoTestEventWrapper.java
@@ -18,11 +18,11 @@
*/
// Generated by the protocol buffer compiler. DO NOT EDIT!
-// source: Prototest.proto
+// source: ProtoTest.proto
package org.apache.druid.data.input.protobuf;
-@SuppressWarnings("ALL")
+@SuppressWarnings({"ALL", "MissingOverride"})
public final class ProtoTestEventWrapper {
private ProtoTestEventWrapper() {}
public static void registerAllExtensions(
@@ -150,56 +150,67 @@ public final class ProtoTestEventWrapper {
long getSomeLongColumn();
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>required bytes someBytesColumn = 10;</code>
+ * @return Whether the someBytesColumn field is set.
+ */
+ boolean hasSomeBytesColumn();
+ /**
+ * <code>required bytes someBytesColumn = 10;</code>
+ * @return The someBytesColumn.
+ */
+ com.google.protobuf.ByteString getSomeBytesColumn();
+
+ /**
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
* @return Whether the foo field is set.
*/
boolean hasFoo();
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
* @return The foo.
*/
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
getFoo();
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
*/
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder
getFooOrBuilder();
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
java.util.List<org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo>
getBarList();
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
getBar(int index);
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
int getBarCount();
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
java.util.List<? extends
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
getBarOrBuilderList();
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder
getBarOrBuilder(
int index);
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
* @return Whether the otherTimestamp field is set.
*/
boolean hasOtherTimestamp();
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
* @return The otherTimestamp.
*/
com.google.protobuf.Timestamp getOtherTimestamp();
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
*/
com.google.protobuf.TimestampOrBuilder getOtherTimestampOrBuilder();
}
@@ -219,6 +230,7 @@ public final class ProtoTestEventWrapper {
eventType_ = 0;
timestamp_ = "";
description_ = "";
+ someBytesColumn_ = com.google.protobuf.ByteString.EMPTY;
bar_ = java.util.Collections.emptyList();
}
@@ -234,136 +246,6 @@ public final class ProtoTestEventWrapper {
getUnknownFields() {
return this.unknownFields;
}
- private ProtoTestEvent(
- 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;
- case 8: {
- int rawValue = input.readEnum();
- @SuppressWarnings("deprecation")
-
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory
value =
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(1, rawValue);
- } else {
- bitField0_ |= 0x00000001;
- eventType_ = rawValue;
- }
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- id_ = input.readUInt64();
- break;
- }
- case 26: {
- com.google.protobuf.ByteString bs = input.readBytes();
- bitField0_ |= 0x00000004;
- timestamp_ = bs;
- break;
- }
- case 32: {
- bitField0_ |= 0x00000008;
- someOtherId_ = input.readUInt32();
- break;
- }
- case 40: {
- bitField0_ |= 0x00000010;
- isValid_ = input.readBool();
- break;
- }
- case 50: {
- com.google.protobuf.ByteString bs = input.readBytes();
- bitField0_ |= 0x00000020;
- description_ = bs;
- break;
- }
- case 61: {
- bitField0_ |= 0x00000040;
- someFloatColumn_ = input.readFloat();
- break;
- }
- case 64: {
- bitField0_ |= 0x00000080;
- someIntColumn_ = input.readUInt32();
- break;
- }
- case 72: {
- bitField0_ |= 0x00000100;
- someLongColumn_ = input.readUInt64();
- break;
- }
- case 82: {
-
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder
subBuilder = null;
- if (((bitField0_ & 0x00000200) != 0)) {
- subBuilder = foo_.toBuilder();
- }
- foo_ =
input.readMessage(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.PARSER,
extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(foo_);
- foo_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000200;
- break;
- }
- case 90: {
- if (!((mutable_bitField0_ & 0x00000400) != 0)) {
- bar_ = new
java.util.ArrayList<org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo>();
- mutable_bitField0_ |= 0x00000400;
- }
- bar_.add(
-
input.readMessage(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.PARSER,
extensionRegistry));
- break;
- }
- case 98: {
- com.google.protobuf.Timestamp.Builder subBuilder = null;
- if (((bitField0_ & 0x00000400) != 0)) {
- subBuilder = otherTimestamp_.toBuilder();
- }
- otherTimestamp_ =
input.readMessage(com.google.protobuf.Timestamp.parser(), extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(otherTimestamp_);
- otherTimestamp_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000400;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- 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_ & 0x00000400) != 0)) {
- bar_ = java.util.Collections.unmodifiableList(bar_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor;
@@ -410,7 +292,6 @@ public final class ProtoTestEventWrapper {
public static final int CATEGORY_TWO_VALUE = 2;
- @Override
public final int getNumber() {
return value;
}
@@ -445,18 +326,15 @@ public final class ProtoTestEventWrapper {
private static final com.google.protobuf.Internal.EnumLiteMap<
EventCategory> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap<EventCategory>() {
- @Override
public EventCategory findValueByNumber(int number) {
return EventCategory.forNumber(number);
}
};
- @Override
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
return getDescriptor().getValues().get(ordinal());
}
- @Override
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
@@ -479,7 +357,7 @@ public final class ProtoTestEventWrapper {
private final int value;
- EventCategory(int value) {
+ private EventCategory(int value) {
this.value = value;
}
@@ -523,62 +401,18 @@ public final class ProtoTestEventWrapper {
bar_ = "";
}
- @Override
+ @java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new Foo();
}
- @Override
+ @java.lang.Override
public final com.google.protobuf.UnknownFieldSet
getUnknownFields() {
return this.unknownFields;
}
- private Foo(
- 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;
- case 10: {
- com.google.protobuf.ByteString bs = input.readBytes();
- bitField0_ |= 0x00000001;
- bar_ = bs;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- 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 {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_Foo_descriptor;
@@ -594,12 +428,13 @@ public final class ProtoTestEventWrapper {
private int bitField0_;
public static final int BAR_FIELD_NUMBER = 1;
- private volatile java.lang.Object bar_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object bar_ = "";
/**
* <code>required string bar = 1;</code>
* @return Whether the bar field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasBar() {
return ((bitField0_ & 0x00000001) != 0);
}
@@ -607,7 +442,7 @@ public final class ProtoTestEventWrapper {
* <code>required string bar = 1;</code>
* @return The bar.
*/
- @Override
+ @java.lang.Override
public java.lang.String getBar() {
java.lang.Object ref = bar_;
if (ref instanceof java.lang.String) {
@@ -626,7 +461,7 @@ public final class ProtoTestEventWrapper {
* <code>required string bar = 1;</code>
* @return The bytes for bar.
*/
- @Override
+ @java.lang.Override
public com.google.protobuf.ByteString
getBarBytes() {
java.lang.Object ref = bar_;
@@ -656,16 +491,16 @@ public final class ProtoTestEventWrapper {
return true;
}
- @Override
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, bar_);
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
- @Override
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -674,12 +509,12 @@ public final class ProtoTestEventWrapper {
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1,
bar_);
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
- @Override
+ @java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
@@ -694,11 +529,11 @@ public final class ProtoTestEventWrapper {
if (!getBar()
.equals(other.getBar())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
- @Override
+ @java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
@@ -709,7 +544,7 @@ public final class ProtoTestEventWrapper {
hash = (37 * hash) + BAR_FIELD_NUMBER;
hash = (53 * hash) + getBar().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -826,39 +661,34 @@ public final class ProtoTestEventWrapper {
// Construct using
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.newBuilder()
private Builder() {
- maybeForceBuilderInitialization();
+
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
+
}
- @Override
+ @java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
bar_ = "";
- bitField0_ = (bitField0_ & ~0x00000001);
return this;
}
- @Override
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_Foo_descriptor;
}
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
getDefaultInstanceForType() {
return
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance();
}
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
build() {
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
result = buildPartial();
if (!result.isInitialized()) {
@@ -867,53 +697,57 @@ public final class ProtoTestEventWrapper {
return result;
}
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
buildPartial() {
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
result = new
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo(this);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void
buildPartial0(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.bar_ = bar_;
to_bitField0_ |= 0x00000001;
}
- result.bar_ = bar_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
+ result.bitField0_ |= to_bitField0_;
}
- @Override
+ @java.lang.Override
public Builder clone() {
return super.clone();
}
- @Override
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
- @Override
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
- @Override
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
- @Override
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
- @Override
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
- @Override
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo) {
return
mergeFrom((org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo)other);
@@ -926,16 +760,16 @@ public final class ProtoTestEventWrapper {
public Builder
mergeFrom(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
other) {
if (other ==
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance())
return this;
if (other.hasBar()) {
- bitField0_ |= 0x00000001;
bar_ = other.bar_;
+ bitField0_ |= 0x00000001;
onChanged();
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
- @Override
+ @java.lang.Override
public final boolean isInitialized() {
if (!hasBar()) {
return false;
@@ -943,22 +777,40 @@ public final class ProtoTestEventWrapper {
return true;
}
- @Override
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
-
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 10: {
+ bar_ = input.readBytes();
+ bitField0_ |= 0x00000001;
+ break;
+ } // case 10
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag))
{
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -968,7 +820,6 @@ public final class ProtoTestEventWrapper {
* <code>required string bar = 1;</code>
* @return Whether the bar field is set.
*/
- @Override
public boolean hasBar() {
return ((bitField0_ & 0x00000001) != 0);
}
@@ -976,7 +827,6 @@ public final class ProtoTestEventWrapper {
* <code>required string bar = 1;</code>
* @return The bar.
*/
- @Override
public java.lang.String getBar() {
java.lang.Object ref = bar_;
if (!(ref instanceof java.lang.String)) {
@@ -995,7 +845,6 @@ public final class ProtoTestEventWrapper {
* <code>required string bar = 1;</code>
* @return The bytes for bar.
*/
- @Override
public com.google.protobuf.ByteString
getBarBytes() {
java.lang.Object ref = bar_;
@@ -1016,11 +865,9 @@ public final class ProtoTestEventWrapper {
*/
public Builder setBar(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
+ if (value == null) { throw new NullPointerException(); }
bar_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
@@ -1029,8 +876,8 @@ public final class ProtoTestEventWrapper {
* @return This builder for chaining.
*/
public Builder clearBar() {
- bitField0_ = (bitField0_ & ~0x00000001);
bar_ = getDefaultInstance().getBar();
+ bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
@@ -1041,21 +888,19 @@ public final class ProtoTestEventWrapper {
*/
public Builder setBarBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000001;
+ if (value == null) { throw new NullPointerException(); }
bar_ = value;
+ bitField0_ |= 0x00000001;
onChanged();
return this;
}
- @Override
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
- @Override
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -1077,12 +922,23 @@ public final class ProtoTestEventWrapper {
@java.lang.Deprecated public static final com.google.protobuf.Parser<Foo>
PARSER = new com.google.protobuf.AbstractParser<Foo>() {
- @Override
+ @java.lang.Override
public Foo parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new Foo(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw
e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
@@ -1090,12 +946,12 @@ public final class ProtoTestEventWrapper {
return PARSER;
}
- @Override
+ @java.lang.Override
public com.google.protobuf.Parser<Foo> getParserForType() {
return PARSER;
}
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -1104,31 +960,30 @@ public final class ProtoTestEventWrapper {
private int bitField0_;
public static final int EVENTTYPE_FIELD_NUMBER = 1;
- private int eventType_;
+ private int eventType_ = 0;
/**
* <code>required .prototest.ProtoTestEvent.EventCategory eventType =
1;</code>
* @return Whether the eventType field is set.
*/
- @Override public boolean hasEventType() {
+ @java.lang.Override public boolean hasEventType() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* <code>required .prototest.ProtoTestEvent.EventCategory eventType =
1;</code>
* @return The eventType.
*/
- @Override public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory
getEventType() {
- @SuppressWarnings("deprecation")
-
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory
result =
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.valueOf(eventType_);
+ @java.lang.Override public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory
getEventType() {
+
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory
result =
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.forNumber(eventType_);
return result == null ?
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO
: result;
}
public static final int ID_FIELD_NUMBER = 2;
- private long id_;
+ private long id_ = 0L;
/**
* <code>required uint64 id = 2;</code>
* @return Whether the id field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000002) != 0);
}
@@ -1136,18 +991,19 @@ public final class ProtoTestEventWrapper {
* <code>required uint64 id = 2;</code>
* @return The id.
*/
- @Override
+ @java.lang.Override
public long getId() {
return id_;
}
public static final int TIMESTAMP_FIELD_NUMBER = 3;
- private volatile java.lang.Object timestamp_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object timestamp_ = "";
/**
* <code>required string timestamp = 3;</code>
* @return Whether the timestamp field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) != 0);
}
@@ -1155,7 +1011,7 @@ public final class ProtoTestEventWrapper {
* <code>required string timestamp = 3;</code>
* @return The timestamp.
*/
- @Override
+ @java.lang.Override
public java.lang.String getTimestamp() {
java.lang.Object ref = timestamp_;
if (ref instanceof java.lang.String) {
@@ -1174,7 +1030,7 @@ public final class ProtoTestEventWrapper {
* <code>required string timestamp = 3;</code>
* @return The bytes for timestamp.
*/
- @Override
+ @java.lang.Override
public com.google.protobuf.ByteString
getTimestampBytes() {
java.lang.Object ref = timestamp_;
@@ -1190,12 +1046,12 @@ public final class ProtoTestEventWrapper {
}
public static final int SOMEOTHERID_FIELD_NUMBER = 4;
- private int someOtherId_;
+ private int someOtherId_ = 0;
/**
* <code>optional uint32 someOtherId = 4;</code>
* @return Whether the someOtherId field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasSomeOtherId() {
return ((bitField0_ & 0x00000008) != 0);
}
@@ -1203,18 +1059,18 @@ public final class ProtoTestEventWrapper {
* <code>optional uint32 someOtherId = 4;</code>
* @return The someOtherId.
*/
- @Override
+ @java.lang.Override
public int getSomeOtherId() {
return someOtherId_;
}
public static final int ISVALID_FIELD_NUMBER = 5;
- private boolean isValid_;
+ private boolean isValid_ = false;
/**
* <code>optional bool isValid = 5;</code>
* @return Whether the isValid field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasIsValid() {
return ((bitField0_ & 0x00000010) != 0);
}
@@ -1222,18 +1078,19 @@ public final class ProtoTestEventWrapper {
* <code>optional bool isValid = 5;</code>
* @return The isValid.
*/
- @Override
+ @java.lang.Override
public boolean getIsValid() {
return isValid_;
}
public static final int DESCRIPTION_FIELD_NUMBER = 6;
- private volatile java.lang.Object description_;
+ @SuppressWarnings("serial")
+ private volatile java.lang.Object description_ = "";
/**
* <code>optional string description = 6;</code>
* @return Whether the description field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000020) != 0);
}
@@ -1241,7 +1098,7 @@ public final class ProtoTestEventWrapper {
* <code>optional string description = 6;</code>
* @return The description.
*/
- @Override
+ @java.lang.Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (ref instanceof java.lang.String) {
@@ -1260,7 +1117,7 @@ public final class ProtoTestEventWrapper {
* <code>optional string description = 6;</code>
* @return The bytes for description.
*/
- @Override
+ @java.lang.Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
@@ -1276,12 +1133,12 @@ public final class ProtoTestEventWrapper {
}
public static final int SOMEFLOATCOLUMN_FIELD_NUMBER = 7;
- private float someFloatColumn_;
+ private float someFloatColumn_ = 0F;
/**
* <code>optional float someFloatColumn = 7;</code>
* @return Whether the someFloatColumn field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasSomeFloatColumn() {
return ((bitField0_ & 0x00000040) != 0);
}
@@ -1289,18 +1146,18 @@ public final class ProtoTestEventWrapper {
* <code>optional float someFloatColumn = 7;</code>
* @return The someFloatColumn.
*/
- @Override
+ @java.lang.Override
public float getSomeFloatColumn() {
return someFloatColumn_;
}
public static final int SOMEINTCOLUMN_FIELD_NUMBER = 8;
- private int someIntColumn_;
+ private int someIntColumn_ = 0;
/**
* <code>optional uint32 someIntColumn = 8;</code>
* @return Whether the someIntColumn field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasSomeIntColumn() {
return ((bitField0_ & 0x00000080) != 0);
}
@@ -1308,18 +1165,18 @@ public final class ProtoTestEventWrapper {
* <code>optional uint32 someIntColumn = 8;</code>
* @return The someIntColumn.
*/
- @Override
+ @java.lang.Override
public int getSomeIntColumn() {
return someIntColumn_;
}
public static final int SOMELONGCOLUMN_FIELD_NUMBER = 9;
- private long someLongColumn_;
+ private long someLongColumn_ = 0L;
/**
* <code>optional uint64 someLongColumn = 9;</code>
* @return Whether the someLongColumn field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasSomeLongColumn() {
return ((bitField0_ & 0x00000100) != 0);
}
@@ -1327,105 +1184,125 @@ public final class ProtoTestEventWrapper {
* <code>optional uint64 someLongColumn = 9;</code>
* @return The someLongColumn.
*/
- @Override
+ @java.lang.Override
public long getSomeLongColumn() {
return someLongColumn_;
}
- public static final int FOO_FIELD_NUMBER = 10;
+ public static final int SOMEBYTESCOLUMN_FIELD_NUMBER = 10;
+ private com.google.protobuf.ByteString someBytesColumn_ =
com.google.protobuf.ByteString.EMPTY;
+ /**
+ * <code>required bytes someBytesColumn = 10;</code>
+ * @return Whether the someBytesColumn field is set.
+ */
+ @java.lang.Override
+ public boolean hasSomeBytesColumn() {
+ return ((bitField0_ & 0x00000200) != 0);
+ }
+ /**
+ * <code>required bytes someBytesColumn = 10;</code>
+ * @return The someBytesColumn.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getSomeBytesColumn() {
+ return someBytesColumn_;
+ }
+
+ public static final int FOO_FIELD_NUMBER = 11;
private
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
foo_;
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
* @return Whether the foo field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasFoo() {
- return ((bitField0_ & 0x00000200) != 0);
+ return ((bitField0_ & 0x00000400) != 0);
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
* @return The foo.
*/
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
getFoo() {
return foo_ == null ?
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance()
: foo_;
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
*/
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder
getFooOrBuilder() {
return foo_ == null ?
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance()
: foo_;
}
- public static final int BAR_FIELD_NUMBER = 11;
+ public static final int BAR_FIELD_NUMBER = 12;
+ @SuppressWarnings("serial")
private
java.util.List<org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo>
bar_;
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
+ @java.lang.Override
public
java.util.List<org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo>
getBarList() {
return bar_;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
+ @java.lang.Override
public java.util.List<? extends
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
getBarOrBuilderList() {
return bar_;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
+ @java.lang.Override
public int getBarCount() {
return bar_.size();
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
getBar(int index) {
return bar_.get(index);
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder
getBarOrBuilder(
int index) {
return bar_.get(index);
}
- public static final int OTHERTIMESTAMP_FIELD_NUMBER = 12;
+ public static final int OTHERTIMESTAMP_FIELD_NUMBER = 13;
private com.google.protobuf.Timestamp otherTimestamp_;
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
* @return Whether the otherTimestamp field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasOtherTimestamp() {
- return ((bitField0_ & 0x00000400) != 0);
+ return ((bitField0_ & 0x00000800) != 0);
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
* @return The otherTimestamp.
*/
- @Override
+ @java.lang.Override
public com.google.protobuf.Timestamp getOtherTimestamp() {
return otherTimestamp_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : otherTimestamp_;
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
*/
- @Override
+ @java.lang.Override
public com.google.protobuf.TimestampOrBuilder getOtherTimestampOrBuilder()
{
return otherTimestamp_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : otherTimestamp_;
}
private byte memoizedIsInitialized = -1;
- @Override
+ @java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
@@ -1443,6 +1320,10 @@ public final class ProtoTestEventWrapper {
memoizedIsInitialized = 0;
return false;
}
+ if (!hasSomeBytesColumn()) {
+ memoizedIsInitialized = 0;
+ return false;
+ }
if (hasFoo()) {
if (!getFoo().isInitialized()) {
memoizedIsInitialized = 0;
@@ -1459,7 +1340,7 @@ public final class ProtoTestEventWrapper {
return true;
}
- @Override
+ @java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (((bitField0_ & 0x00000001) != 0)) {
@@ -1490,18 +1371,21 @@ public final class ProtoTestEventWrapper {
output.writeUInt64(9, someLongColumn_);
}
if (((bitField0_ & 0x00000200) != 0)) {
- output.writeMessage(10, getFoo());
+ output.writeBytes(10, someBytesColumn_);
+ }
+ if (((bitField0_ & 0x00000400) != 0)) {
+ output.writeMessage(11, getFoo());
}
for (int i = 0; i < bar_.size(); i++) {
- output.writeMessage(11, bar_.get(i));
+ output.writeMessage(12, bar_.get(i));
}
- if (((bitField0_ & 0x00000400) != 0)) {
- output.writeMessage(12, getOtherTimestamp());
+ if (((bitField0_ & 0x00000800) != 0)) {
+ output.writeMessage(13, getOtherTimestamp());
}
- unknownFields.writeTo(output);
+ getUnknownFields().writeTo(output);
}
- @Override
+ @java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
@@ -1543,22 +1427,26 @@ public final class ProtoTestEventWrapper {
}
if (((bitField0_ & 0x00000200) != 0)) {
size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(10, getFoo());
+ .computeBytesSize(10, someBytesColumn_);
+ }
+ if (((bitField0_ & 0x00000400) != 0)) {
+ size += com.google.protobuf.CodedOutputStream
+ .computeMessageSize(11, getFoo());
}
for (int i = 0; i < bar_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(11, bar_.get(i));
+ .computeMessageSize(12, bar_.get(i));
}
- if (((bitField0_ & 0x00000400) != 0)) {
+ if (((bitField0_ & 0x00000800) != 0)) {
size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(12, getOtherTimestamp());
+ .computeMessageSize(13, getOtherTimestamp());
}
- size += unknownFields.getSerializedSize();
+ size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
- @Override
+ @java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
@@ -1613,6 +1501,11 @@ public final class ProtoTestEventWrapper {
if (getSomeLongColumn()
!= other.getSomeLongColumn()) return false;
}
+ if (hasSomeBytesColumn() != other.hasSomeBytesColumn()) return false;
+ if (hasSomeBytesColumn()) {
+ if (!getSomeBytesColumn()
+ .equals(other.getSomeBytesColumn())) return false;
+ }
if (hasFoo() != other.hasFoo()) return false;
if (hasFoo()) {
if (!getFoo()
@@ -1625,11 +1518,11 @@ public final class ProtoTestEventWrapper {
if (!getOtherTimestamp()
.equals(other.getOtherTimestamp())) return false;
}
- if (!unknownFields.equals(other.unknownFields)) return false;
+ if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
- @Override
+ @java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
@@ -1676,6 +1569,10 @@ public final class ProtoTestEventWrapper {
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getSomeLongColumn());
}
+ if (hasSomeBytesColumn()) {
+ hash = (37 * hash) + SOMEBYTESCOLUMN_FIELD_NUMBER;
+ hash = (53 * hash) + getSomeBytesColumn().hashCode();
+ }
if (hasFoo()) {
hash = (37 * hash) + FOO_FIELD_NUMBER;
hash = (53 * hash) + getFoo().hashCode();
@@ -1688,7 +1585,7 @@ public final class ProtoTestEventWrapper {
hash = (37 * hash) + OTHERTIMESTAMP_FIELD_NUMBER;
hash = (53 * hash) + getOtherTimestamp().hashCode();
}
- hash = (29 * hash) + unknownFields.hashCode();
+ hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
@@ -1763,7 +1660,7 @@ public final class ProtoTestEventWrapper {
.parseWithIOException(PARSER, input, extensionRegistry);
}
- @Override
+ @java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
@@ -1771,13 +1668,13 @@ public final class ProtoTestEventWrapper {
public static Builder
newBuilder(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
- @Override
+ @java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
- @Override
+ @java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
@@ -1795,7 +1692,7 @@ public final class ProtoTestEventWrapper {
return
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor;
}
- @Override
+ @java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_fieldAccessorTable
@@ -1821,60 +1718,52 @@ public final class ProtoTestEventWrapper {
getOtherTimestampFieldBuilder();
}
}
- @Override
+ @java.lang.Override
public Builder clear() {
super.clear();
+ bitField0_ = 0;
eventType_ = 0;
- bitField0_ = (bitField0_ & ~0x00000001);
id_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000002);
timestamp_ = "";
- bitField0_ = (bitField0_ & ~0x00000004);
someOtherId_ = 0;
- bitField0_ = (bitField0_ & ~0x00000008);
isValid_ = false;
- bitField0_ = (bitField0_ & ~0x00000010);
description_ = "";
- bitField0_ = (bitField0_ & ~0x00000020);
someFloatColumn_ = 0F;
- bitField0_ = (bitField0_ & ~0x00000040);
someIntColumn_ = 0;
- bitField0_ = (bitField0_ & ~0x00000080);
someLongColumn_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000100);
- if (fooBuilder_ == null) {
- foo_ = null;
- } else {
- fooBuilder_.clear();
+ someBytesColumn_ = com.google.protobuf.ByteString.EMPTY;
+ foo_ = null;
+ if (fooBuilder_ != null) {
+ fooBuilder_.dispose();
+ fooBuilder_ = null;
}
- bitField0_ = (bitField0_ & ~0x00000200);
if (barBuilder_ == null) {
bar_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000400);
} else {
+ bar_ = null;
barBuilder_.clear();
}
- if (otherTimestampBuilder_ == null) {
- otherTimestamp_ = null;
- } else {
- otherTimestampBuilder_.clear();
- }
bitField0_ = (bitField0_ & ~0x00000800);
+ otherTimestamp_ = null;
+ if (otherTimestampBuilder_ != null) {
+ otherTimestampBuilder_.dispose();
+ otherTimestampBuilder_ = null;
+ }
return this;
}
- @Override
+ @java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.internal_static_prototest_ProtoTestEvent_descriptor;
}
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
getDefaultInstanceForType() {
return
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.getDefaultInstance();
}
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
build() {
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
result = buildPartial();
if (!result.isInitialized()) {
@@ -1883,23 +1772,42 @@ public final class ProtoTestEventWrapper {
return result;
}
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
buildPartial() {
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
result = new
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent(this);
+ buildPartialRepeatedFields(result);
+ if (bitField0_ != 0) { buildPartial0(result); }
+ onBuilt();
+ return result;
+ }
+
+ private void
buildPartialRepeatedFields(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
result) {
+ if (barBuilder_ == null) {
+ if (((bitField0_ & 0x00000800) != 0)) {
+ bar_ = java.util.Collections.unmodifiableList(bar_);
+ bitField0_ = (bitField0_ & ~0x00000800);
+ }
+ result.bar_ = bar_;
+ } else {
+ result.bar_ = barBuilder_.build();
+ }
+ }
+
+ private void
buildPartial0(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
+ result.eventType_ = eventType_;
to_bitField0_ |= 0x00000001;
}
- result.eventType_ = eventType_;
if (((from_bitField0_ & 0x00000002) != 0)) {
result.id_ = id_;
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
+ result.timestamp_ = timestamp_;
to_bitField0_ |= 0x00000004;
}
- result.timestamp_ = timestamp_;
if (((from_bitField0_ & 0x00000008) != 0)) {
result.someOtherId_ = someOtherId_;
to_bitField0_ |= 0x00000008;
@@ -1909,9 +1817,9 @@ public final class ProtoTestEventWrapper {
to_bitField0_ |= 0x00000010;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
+ result.description_ = description_;
to_bitField0_ |= 0x00000020;
}
- result.description_ = description_;
if (((from_bitField0_ & 0x00000040) != 0)) {
result.someFloatColumn_ = someFloatColumn_;
to_bitField0_ |= 0x00000040;
@@ -1925,68 +1833,57 @@ public final class ProtoTestEventWrapper {
to_bitField0_ |= 0x00000100;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
- if (fooBuilder_ == null) {
- result.foo_ = foo_;
- } else {
- result.foo_ = fooBuilder_.build();
- }
+ result.someBytesColumn_ = someBytesColumn_;
to_bitField0_ |= 0x00000200;
}
- if (barBuilder_ == null) {
- if (((bitField0_ & 0x00000400) != 0)) {
- bar_ = java.util.Collections.unmodifiableList(bar_);
- bitField0_ = (bitField0_ & ~0x00000400);
- }
- result.bar_ = bar_;
- } else {
- result.bar_ = barBuilder_.build();
- }
- if (((from_bitField0_ & 0x00000800) != 0)) {
- if (otherTimestampBuilder_ == null) {
- result.otherTimestamp_ = otherTimestamp_;
- } else {
- result.otherTimestamp_ = otherTimestampBuilder_.build();
- }
+ if (((from_bitField0_ & 0x00000400) != 0)) {
+ result.foo_ = fooBuilder_ == null
+ ? foo_
+ : fooBuilder_.build();
to_bitField0_ |= 0x00000400;
}
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
+ if (((from_bitField0_ & 0x00001000) != 0)) {
+ result.otherTimestamp_ = otherTimestampBuilder_ == null
+ ? otherTimestamp_
+ : otherTimestampBuilder_.build();
+ to_bitField0_ |= 0x00000800;
+ }
+ result.bitField0_ |= to_bitField0_;
}
- @Override
+ @java.lang.Override
public Builder clone() {
return super.clone();
}
- @Override
+ @java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
- @Override
+ @java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
- @Override
+ @java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
- @Override
+ @java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
- @Override
+ @java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
- @Override
+ @java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent) {
return
mergeFrom((org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent)other);
@@ -2005,8 +1902,8 @@ public final class ProtoTestEventWrapper {
setId(other.getId());
}
if (other.hasTimestamp()) {
- bitField0_ |= 0x00000004;
timestamp_ = other.timestamp_;
+ bitField0_ |= 0x00000004;
onChanged();
}
if (other.hasSomeOtherId()) {
@@ -2016,8 +1913,8 @@ public final class ProtoTestEventWrapper {
setIsValid(other.getIsValid());
}
if (other.hasDescription()) {
- bitField0_ |= 0x00000020;
description_ = other.description_;
+ bitField0_ |= 0x00000020;
onChanged();
}
if (other.hasSomeFloatColumn()) {
@@ -2029,6 +1926,9 @@ public final class ProtoTestEventWrapper {
if (other.hasSomeLongColumn()) {
setSomeLongColumn(other.getSomeLongColumn());
}
+ if (other.hasSomeBytesColumn()) {
+ setSomeBytesColumn(other.getSomeBytesColumn());
+ }
if (other.hasFoo()) {
mergeFoo(other.getFoo());
}
@@ -2036,7 +1936,7 @@ public final class ProtoTestEventWrapper {
if (!other.bar_.isEmpty()) {
if (bar_.isEmpty()) {
bar_ = other.bar_;
- bitField0_ = (bitField0_ & ~0x00000400);
+ bitField0_ = (bitField0_ & ~0x00000800);
} else {
ensureBarIsMutable();
bar_.addAll(other.bar_);
@@ -2049,7 +1949,7 @@ public final class ProtoTestEventWrapper {
barBuilder_.dispose();
barBuilder_ = null;
bar_ = other.bar_;
- bitField0_ = (bitField0_ & ~0x00000400);
+ bitField0_ = (bitField0_ & ~0x00000800);
barBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getBarFieldBuilder() : null;
@@ -2061,12 +1961,12 @@ public final class ProtoTestEventWrapper {
if (other.hasOtherTimestamp()) {
mergeOtherTimestamp(other.getOtherTimestamp());
}
- this.mergeUnknownFields(other.unknownFields);
+ this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
- @Override
+ @java.lang.Override
public final boolean isInitialized() {
if (!hasEventType()) {
return false;
@@ -2077,6 +1977,9 @@ public final class ProtoTestEventWrapper {
if (!hasTimestamp()) {
return false;
}
+ if (!hasSomeBytesColumn()) {
+ return false;
+ }
if (hasFoo()) {
if (!getFoo().isInitialized()) {
return false;
@@ -2090,22 +1993,119 @@ public final class ProtoTestEventWrapper {
return true;
}
- @Override
+ @java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
-
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
parsedMessage = null;
+ if (extensionRegistry == null) {
+ throw new java.lang.NullPointerException();
+ }
try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
+ boolean done = false;
+ while (!done) {
+ int tag = input.readTag();
+ switch (tag) {
+ case 0:
+ done = true;
+ break;
+ case 8: {
+ int tmpRaw = input.readEnum();
+
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory
tmpValue =
+
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.forNumber(tmpRaw);
+ if (tmpValue == null) {
+ mergeUnknownVarintField(1, tmpRaw);
+ } else {
+ eventType_ = tmpRaw;
+ bitField0_ |= 0x00000001;
+ }
+ break;
+ } // case 8
+ case 16: {
+ id_ = input.readUInt64();
+ bitField0_ |= 0x00000002;
+ break;
+ } // case 16
+ case 26: {
+ timestamp_ = input.readBytes();
+ bitField0_ |= 0x00000004;
+ break;
+ } // case 26
+ case 32: {
+ someOtherId_ = input.readUInt32();
+ bitField0_ |= 0x00000008;
+ break;
+ } // case 32
+ case 40: {
+ isValid_ = input.readBool();
+ bitField0_ |= 0x00000010;
+ break;
+ } // case 40
+ case 50: {
+ description_ = input.readBytes();
+ bitField0_ |= 0x00000020;
+ break;
+ } // case 50
+ case 61: {
+ someFloatColumn_ = input.readFloat();
+ bitField0_ |= 0x00000040;
+ break;
+ } // case 61
+ case 64: {
+ someIntColumn_ = input.readUInt32();
+ bitField0_ |= 0x00000080;
+ break;
+ } // case 64
+ case 72: {
+ someLongColumn_ = input.readUInt64();
+ bitField0_ |= 0x00000100;
+ break;
+ } // case 72
+ case 82: {
+ someBytesColumn_ = input.readBytes();
+ bitField0_ |= 0x00000200;
+ break;
+ } // case 82
+ case 90: {
+ input.readMessage(
+ getFooFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00000400;
+ break;
+ } // case 90
+ case 98: {
+
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo m
=
+ input.readMessage(
+
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.PARSER,
+ extensionRegistry);
+ if (barBuilder_ == null) {
+ ensureBarIsMutable();
+ bar_.add(m);
+ } else {
+ barBuilder_.addMessage(m);
+ }
+ break;
+ } // case 98
+ case 106: {
+ input.readMessage(
+ getOtherTimestampFieldBuilder().getBuilder(),
+ extensionRegistry);
+ bitField0_ |= 0x00001000;
+ break;
+ } // case 106
+ default: {
+ if (!super.parseUnknownField(input, extensionRegistry, tag)) {
+ done = true; // was an endgroup tag
+ }
+ break;
+ } // default:
+ } // switch (tag)
+ } // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage =
(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent)
e.getUnfinishedMessage();
throw e.unwrapIOException();
} finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
+ onChanged();
+ } // finally
return this;
}
private int bitField0_;
@@ -2115,17 +2115,16 @@ public final class ProtoTestEventWrapper {
* <code>required .prototest.ProtoTestEvent.EventCategory eventType =
1;</code>
* @return Whether the eventType field is set.
*/
- @Override public boolean hasEventType() {
+ @java.lang.Override public boolean hasEventType() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
* <code>required .prototest.ProtoTestEvent.EventCategory eventType =
1;</code>
* @return The eventType.
*/
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory
getEventType() {
- @SuppressWarnings("deprecation")
-
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory
result =
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.valueOf(eventType_);
+
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory
result =
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.forNumber(eventType_);
return result == null ?
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ZERO
: result;
}
/**
@@ -2158,7 +2157,7 @@ public final class ProtoTestEventWrapper {
* <code>required uint64 id = 2;</code>
* @return Whether the id field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasId() {
return ((bitField0_ & 0x00000002) != 0);
}
@@ -2166,7 +2165,7 @@ public final class ProtoTestEventWrapper {
* <code>required uint64 id = 2;</code>
* @return The id.
*/
- @Override
+ @java.lang.Override
public long getId() {
return id_;
}
@@ -2176,8 +2175,9 @@ public final class ProtoTestEventWrapper {
* @return This builder for chaining.
*/
public Builder setId(long value) {
- bitField0_ |= 0x00000002;
+
id_ = value;
+ bitField0_ |= 0x00000002;
onChanged();
return this;
}
@@ -2197,7 +2197,6 @@ public final class ProtoTestEventWrapper {
* <code>required string timestamp = 3;</code>
* @return Whether the timestamp field is set.
*/
- @Override
public boolean hasTimestamp() {
return ((bitField0_ & 0x00000004) != 0);
}
@@ -2205,7 +2204,6 @@ public final class ProtoTestEventWrapper {
* <code>required string timestamp = 3;</code>
* @return The timestamp.
*/
- @Override
public java.lang.String getTimestamp() {
java.lang.Object ref = timestamp_;
if (!(ref instanceof java.lang.String)) {
@@ -2224,7 +2222,6 @@ public final class ProtoTestEventWrapper {
* <code>required string timestamp = 3;</code>
* @return The bytes for timestamp.
*/
- @Override
public com.google.protobuf.ByteString
getTimestampBytes() {
java.lang.Object ref = timestamp_;
@@ -2245,11 +2242,9 @@ public final class ProtoTestEventWrapper {
*/
public Builder setTimestamp(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
+ if (value == null) { throw new NullPointerException(); }
timestamp_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -2258,8 +2253,8 @@ public final class ProtoTestEventWrapper {
* @return This builder for chaining.
*/
public Builder clearTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000004);
timestamp_ = getDefaultInstance().getTimestamp();
+ bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
@@ -2270,11 +2265,9 @@ public final class ProtoTestEventWrapper {
*/
public Builder setTimestampBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000004;
+ if (value == null) { throw new NullPointerException(); }
timestamp_ = value;
+ bitField0_ |= 0x00000004;
onChanged();
return this;
}
@@ -2284,7 +2277,7 @@ public final class ProtoTestEventWrapper {
* <code>optional uint32 someOtherId = 4;</code>
* @return Whether the someOtherId field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasSomeOtherId() {
return ((bitField0_ & 0x00000008) != 0);
}
@@ -2292,7 +2285,7 @@ public final class ProtoTestEventWrapper {
* <code>optional uint32 someOtherId = 4;</code>
* @return The someOtherId.
*/
- @Override
+ @java.lang.Override
public int getSomeOtherId() {
return someOtherId_;
}
@@ -2302,8 +2295,9 @@ public final class ProtoTestEventWrapper {
* @return This builder for chaining.
*/
public Builder setSomeOtherId(int value) {
- bitField0_ |= 0x00000008;
+
someOtherId_ = value;
+ bitField0_ |= 0x00000008;
onChanged();
return this;
}
@@ -2323,7 +2317,7 @@ public final class ProtoTestEventWrapper {
* <code>optional bool isValid = 5;</code>
* @return Whether the isValid field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasIsValid() {
return ((bitField0_ & 0x00000010) != 0);
}
@@ -2331,7 +2325,7 @@ public final class ProtoTestEventWrapper {
* <code>optional bool isValid = 5;</code>
* @return The isValid.
*/
- @Override
+ @java.lang.Override
public boolean getIsValid() {
return isValid_;
}
@@ -2341,8 +2335,9 @@ public final class ProtoTestEventWrapper {
* @return This builder for chaining.
*/
public Builder setIsValid(boolean value) {
- bitField0_ |= 0x00000010;
+
isValid_ = value;
+ bitField0_ |= 0x00000010;
onChanged();
return this;
}
@@ -2362,7 +2357,6 @@ public final class ProtoTestEventWrapper {
* <code>optional string description = 6;</code>
* @return Whether the description field is set.
*/
- @Override
public boolean hasDescription() {
return ((bitField0_ & 0x00000020) != 0);
}
@@ -2370,7 +2364,6 @@ public final class ProtoTestEventWrapper {
* <code>optional string description = 6;</code>
* @return The description.
*/
- @Override
public java.lang.String getDescription() {
java.lang.Object ref = description_;
if (!(ref instanceof java.lang.String)) {
@@ -2389,7 +2382,6 @@ public final class ProtoTestEventWrapper {
* <code>optional string description = 6;</code>
* @return The bytes for description.
*/
- @Override
public com.google.protobuf.ByteString
getDescriptionBytes() {
java.lang.Object ref = description_;
@@ -2410,11 +2402,9 @@ public final class ProtoTestEventWrapper {
*/
public Builder setDescription(
java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000020;
+ if (value == null) { throw new NullPointerException(); }
description_ = value;
+ bitField0_ |= 0x00000020;
onChanged();
return this;
}
@@ -2423,8 +2413,8 @@ public final class ProtoTestEventWrapper {
* @return This builder for chaining.
*/
public Builder clearDescription() {
- bitField0_ = (bitField0_ & ~0x00000020);
description_ = getDefaultInstance().getDescription();
+ bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
@@ -2435,11 +2425,9 @@ public final class ProtoTestEventWrapper {
*/
public Builder setDescriptionBytes(
com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000020;
+ if (value == null) { throw new NullPointerException(); }
description_ = value;
+ bitField0_ |= 0x00000020;
onChanged();
return this;
}
@@ -2449,7 +2437,7 @@ public final class ProtoTestEventWrapper {
* <code>optional float someFloatColumn = 7;</code>
* @return Whether the someFloatColumn field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasSomeFloatColumn() {
return ((bitField0_ & 0x00000040) != 0);
}
@@ -2457,7 +2445,7 @@ public final class ProtoTestEventWrapper {
* <code>optional float someFloatColumn = 7;</code>
* @return The someFloatColumn.
*/
- @Override
+ @java.lang.Override
public float getSomeFloatColumn() {
return someFloatColumn_;
}
@@ -2467,8 +2455,9 @@ public final class ProtoTestEventWrapper {
* @return This builder for chaining.
*/
public Builder setSomeFloatColumn(float value) {
- bitField0_ |= 0x00000040;
+
someFloatColumn_ = value;
+ bitField0_ |= 0x00000040;
onChanged();
return this;
}
@@ -2488,7 +2477,7 @@ public final class ProtoTestEventWrapper {
* <code>optional uint32 someIntColumn = 8;</code>
* @return Whether the someIntColumn field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasSomeIntColumn() {
return ((bitField0_ & 0x00000080) != 0);
}
@@ -2496,7 +2485,7 @@ public final class ProtoTestEventWrapper {
* <code>optional uint32 someIntColumn = 8;</code>
* @return The someIntColumn.
*/
- @Override
+ @java.lang.Override
public int getSomeIntColumn() {
return someIntColumn_;
}
@@ -2506,8 +2495,9 @@ public final class ProtoTestEventWrapper {
* @return This builder for chaining.
*/
public Builder setSomeIntColumn(int value) {
- bitField0_ |= 0x00000080;
+
someIntColumn_ = value;
+ bitField0_ |= 0x00000080;
onChanged();
return this;
}
@@ -2527,7 +2517,7 @@ public final class ProtoTestEventWrapper {
* <code>optional uint64 someLongColumn = 9;</code>
* @return Whether the someLongColumn field is set.
*/
- @Override
+ @java.lang.Override
public boolean hasSomeLongColumn() {
return ((bitField0_ & 0x00000100) != 0);
}
@@ -2535,7 +2525,7 @@ public final class ProtoTestEventWrapper {
* <code>optional uint64 someLongColumn = 9;</code>
* @return The someLongColumn.
*/
- @Override
+ @java.lang.Override
public long getSomeLongColumn() {
return someLongColumn_;
}
@@ -2545,8 +2535,9 @@ public final class ProtoTestEventWrapper {
* @return This builder for chaining.
*/
public Builder setSomeLongColumn(long value) {
- bitField0_ |= 0x00000100;
+
someLongColumn_ = value;
+ bitField0_ |= 0x00000100;
onChanged();
return this;
}
@@ -2561,22 +2552,60 @@ public final class ProtoTestEventWrapper {
return this;
}
+ private com.google.protobuf.ByteString someBytesColumn_ =
com.google.protobuf.ByteString.EMPTY;
+ /**
+ * <code>required bytes someBytesColumn = 10;</code>
+ * @return Whether the someBytesColumn field is set.
+ */
+ @java.lang.Override
+ public boolean hasSomeBytesColumn() {
+ return ((bitField0_ & 0x00000200) != 0);
+ }
+ /**
+ * <code>required bytes someBytesColumn = 10;</code>
+ * @return The someBytesColumn.
+ */
+ @java.lang.Override
+ public com.google.protobuf.ByteString getSomeBytesColumn() {
+ return someBytesColumn_;
+ }
+ /**
+ * <code>required bytes someBytesColumn = 10;</code>
+ * @param value The someBytesColumn to set.
+ * @return This builder for chaining.
+ */
+ public Builder setSomeBytesColumn(com.google.protobuf.ByteString value) {
+ if (value == null) { throw new NullPointerException(); }
+ someBytesColumn_ = value;
+ bitField0_ |= 0x00000200;
+ onChanged();
+ return this;
+ }
+ /**
+ * <code>required bytes someBytesColumn = 10;</code>
+ * @return This builder for chaining.
+ */
+ public Builder clearSomeBytesColumn() {
+ bitField0_ = (bitField0_ & ~0x00000200);
+ someBytesColumn_ = getDefaultInstance().getSomeBytesColumn();
+ onChanged();
+ return this;
+ }
+
private
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
foo_;
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
fooBuilder_;
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
* @return Whether the foo field is set.
*/
- @Override
public boolean hasFoo() {
- return ((bitField0_ & 0x00000200) != 0);
+ return ((bitField0_ & 0x00000400) != 0);
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
* @return The foo.
*/
- @Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
getFoo() {
if (fooBuilder_ == null) {
return foo_ == null ?
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance()
: foo_;
@@ -2585,7 +2614,7 @@ public final class ProtoTestEventWrapper {
}
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
*/
public Builder
setFoo(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
value) {
if (fooBuilder_ == null) {
@@ -2593,72 +2622,70 @@ public final class ProtoTestEventWrapper {
throw new NullPointerException();
}
foo_ = value;
- onChanged();
} else {
fooBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
+ onChanged();
return this;
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
*/
public Builder setFoo(
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder
builderForValue) {
if (fooBuilder_ == null) {
foo_ = builderForValue.build();
- onChanged();
} else {
fooBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
+ onChanged();
return this;
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
*/
public Builder
mergeFoo(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
value) {
if (fooBuilder_ == null) {
- if (((bitField0_ & 0x00000200) != 0) &&
- foo_ != null &&
- foo_ !=
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance())
{
- foo_ =
-
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.newBuilder(foo_).mergeFrom(value).buildPartial();
+ if (((bitField0_ & 0x00000400) != 0) &&
+ foo_ != null &&
+ foo_ !=
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance())
{
+ getFooBuilder().mergeFrom(value);
} else {
foo_ = value;
}
- onChanged();
} else {
fooBuilder_.mergeFrom(value);
}
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
+ onChanged();
return this;
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
*/
public Builder clearFoo() {
- if (fooBuilder_ == null) {
- foo_ = null;
- onChanged();
- } else {
- fooBuilder_.clear();
+ bitField0_ = (bitField0_ & ~0x00000400);
+ foo_ = null;
+ if (fooBuilder_ != null) {
+ fooBuilder_.dispose();
+ fooBuilder_ = null;
}
- bitField0_ = (bitField0_ & ~0x00000200);
+ onChanged();
return this;
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
*/
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder
getFooBuilder() {
- bitField0_ |= 0x00000200;
+ bitField0_ |= 0x00000400;
onChanged();
return getFooFieldBuilder().getBuilder();
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
*/
- @Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder
getFooOrBuilder() {
if (fooBuilder_ != null) {
return fooBuilder_.getMessageOrBuilder();
@@ -2668,7 +2695,7 @@ public final class ProtoTestEventWrapper {
}
}
/**
- * <code>optional .prototest.ProtoTestEvent.Foo foo = 10;</code>
+ * <code>optional .prototest.ProtoTestEvent.Foo foo = 11;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
@@ -2687,9 +2714,9 @@ public final class ProtoTestEventWrapper {
private
java.util.List<org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo>
bar_ =
java.util.Collections.emptyList();
private void ensureBarIsMutable() {
- if (!((bitField0_ & 0x00000400) != 0)) {
+ if (!((bitField0_ & 0x00000800) != 0)) {
bar_ = new
java.util.ArrayList<org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo>(bar_);
- bitField0_ |= 0x00000400;
+ bitField0_ |= 0x00000800;
}
}
@@ -2697,9 +2724,8 @@ public final class ProtoTestEventWrapper {
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
barBuilder_;
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
public
java.util.List<org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo>
getBarList() {
if (barBuilder_ == null) {
return java.util.Collections.unmodifiableList(bar_);
@@ -2708,9 +2734,8 @@ public final class ProtoTestEventWrapper {
}
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
public int getBarCount() {
if (barBuilder_ == null) {
return bar_.size();
@@ -2719,9 +2744,8 @@ public final class ProtoTestEventWrapper {
}
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
getBar(int index) {
if (barBuilder_ == null) {
return bar_.get(index);
@@ -2730,7 +2754,7 @@ public final class ProtoTestEventWrapper {
}
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public Builder setBar(
int index,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
value) {
@@ -2747,7 +2771,7 @@ public final class ProtoTestEventWrapper {
return this;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public Builder setBar(
int index,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder
builderForValue) {
@@ -2761,7 +2785,7 @@ public final class ProtoTestEventWrapper {
return this;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public Builder
addBar(org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
value) {
if (barBuilder_ == null) {
@@ -2777,7 +2801,7 @@ public final class ProtoTestEventWrapper {
return this;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public Builder addBar(
int index,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo
value) {
@@ -2794,7 +2818,7 @@ public final class ProtoTestEventWrapper {
return this;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public Builder addBar(
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder
builderForValue) {
@@ -2808,7 +2832,7 @@ public final class ProtoTestEventWrapper {
return this;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public Builder addBar(
int index,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder
builderForValue) {
@@ -2822,7 +2846,7 @@ public final class ProtoTestEventWrapper {
return this;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public Builder addAllBar(
java.lang.Iterable<? extends
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo>
values) {
@@ -2837,12 +2861,12 @@ public final class ProtoTestEventWrapper {
return this;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public Builder clearBar() {
if (barBuilder_ == null) {
bar_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000400);
+ bitField0_ = (bitField0_ & ~0x00000800);
onChanged();
} else {
barBuilder_.clear();
@@ -2850,7 +2874,7 @@ public final class ProtoTestEventWrapper {
return this;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public Builder removeBar(int index) {
if (barBuilder_ == null) {
@@ -2863,16 +2887,15 @@ public final class ProtoTestEventWrapper {
return this;
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder
getBarBuilder(
int index) {
return getBarFieldBuilder().getBuilder(index);
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder
getBarOrBuilder(
int index) {
if (barBuilder_ == null) {
@@ -2881,10 +2904,9 @@ public final class ProtoTestEventWrapper {
}
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
- @Override
- public java.util.List<? extends
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
+ public java.util.List<? extends
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>
getBarOrBuilderList() {
if (barBuilder_ != null) {
return barBuilder_.getMessageOrBuilderList();
@@ -2893,14 +2915,14 @@ public final class ProtoTestEventWrapper {
}
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder
addBarBuilder() {
return getBarFieldBuilder().addBuilder(
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance());
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder
addBarBuilder(
int index) {
@@ -2908,7 +2930,7 @@ public final class ProtoTestEventWrapper {
index,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.getDefaultInstance());
}
/**
- * <code>repeated .prototest.ProtoTestEvent.Foo bar = 11;</code>
+ * <code>repeated .prototest.ProtoTestEvent.Foo bar = 12;</code>
*/
public
java.util.List<org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder>
getBarBuilderList() {
@@ -2921,7 +2943,7 @@ public final class ProtoTestEventWrapper {
barBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.Foo.Builder,
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent.FooOrBuilder>(
bar_,
- ((bitField0_ & 0x00000400) != 0),
+ ((bitField0_ & 0x00000800) != 0),
getParentForChildren(),
isClean());
bar_ = null;
@@ -2933,18 +2955,16 @@ public final class ProtoTestEventWrapper {
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
otherTimestampBuilder_;
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
* @return Whether the otherTimestamp field is set.
*/
- @Override
public boolean hasOtherTimestamp() {
- return ((bitField0_ & 0x00000800) != 0);
+ return ((bitField0_ & 0x00001000) != 0);
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
* @return The otherTimestamp.
*/
- @Override
public com.google.protobuf.Timestamp getOtherTimestamp() {
if (otherTimestampBuilder_ == null) {
return otherTimestamp_ == null ?
com.google.protobuf.Timestamp.getDefaultInstance() : otherTimestamp_;
@@ -2953,7 +2973,7 @@ public final class ProtoTestEventWrapper {
}
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
*/
public Builder setOtherTimestamp(com.google.protobuf.Timestamp value) {
if (otherTimestampBuilder_ == null) {
@@ -2961,72 +2981,70 @@ public final class ProtoTestEventWrapper {
throw new NullPointerException();
}
otherTimestamp_ = value;
- onChanged();
} else {
otherTimestampBuilder_.setMessage(value);
}
- bitField0_ |= 0x00000800;
+ bitField0_ |= 0x00001000;
+ onChanged();
return this;
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
*/
public Builder setOtherTimestamp(
com.google.protobuf.Timestamp.Builder builderForValue) {
if (otherTimestampBuilder_ == null) {
otherTimestamp_ = builderForValue.build();
- onChanged();
} else {
otherTimestampBuilder_.setMessage(builderForValue.build());
}
- bitField0_ |= 0x00000800;
+ bitField0_ |= 0x00001000;
+ onChanged();
return this;
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
*/
public Builder mergeOtherTimestamp(com.google.protobuf.Timestamp value) {
if (otherTimestampBuilder_ == null) {
- if (((bitField0_ & 0x00000800) != 0) &&
- otherTimestamp_ != null &&
- otherTimestamp_ !=
com.google.protobuf.Timestamp.getDefaultInstance()) {
- otherTimestamp_ =
-
com.google.protobuf.Timestamp.newBuilder(otherTimestamp_).mergeFrom(value).buildPartial();
+ if (((bitField0_ & 0x00001000) != 0) &&
+ otherTimestamp_ != null &&
+ otherTimestamp_ !=
com.google.protobuf.Timestamp.getDefaultInstance()) {
+ getOtherTimestampBuilder().mergeFrom(value);
} else {
otherTimestamp_ = value;
}
- onChanged();
} else {
otherTimestampBuilder_.mergeFrom(value);
}
- bitField0_ |= 0x00000800;
+ bitField0_ |= 0x00001000;
+ onChanged();
return this;
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
*/
public Builder clearOtherTimestamp() {
- if (otherTimestampBuilder_ == null) {
- otherTimestamp_ = null;
- onChanged();
- } else {
- otherTimestampBuilder_.clear();
+ bitField0_ = (bitField0_ & ~0x00001000);
+ otherTimestamp_ = null;
+ if (otherTimestampBuilder_ != null) {
+ otherTimestampBuilder_.dispose();
+ otherTimestampBuilder_ = null;
}
- bitField0_ = (bitField0_ & ~0x00000800);
+ onChanged();
return this;
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
*/
public com.google.protobuf.Timestamp.Builder getOtherTimestampBuilder() {
- bitField0_ |= 0x00000800;
+ bitField0_ |= 0x00001000;
onChanged();
return getOtherTimestampFieldBuilder().getBuilder();
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
*/
- @Override
public com.google.protobuf.TimestampOrBuilder
getOtherTimestampOrBuilder() {
if (otherTimestampBuilder_ != null) {
return otherTimestampBuilder_.getMessageOrBuilder();
@@ -3036,7 +3054,7 @@ public final class ProtoTestEventWrapper {
}
}
/**
- * <code>optional .google.protobuf.Timestamp otherTimestamp = 12;</code>
+ * <code>optional .google.protobuf.Timestamp otherTimestamp = 13;</code>
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.protobuf.Timestamp,
com.google.protobuf.Timestamp.Builder, com.google.protobuf.TimestampOrBuilder>
@@ -3051,13 +3069,13 @@ public final class ProtoTestEventWrapper {
}
return otherTimestampBuilder_;
}
- @Override
+ @java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
- @Override
+ @java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
@@ -3079,12 +3097,23 @@ public final class ProtoTestEventWrapper {
@java.lang.Deprecated public static final
com.google.protobuf.Parser<ProtoTestEvent>
PARSER = new com.google.protobuf.AbstractParser<ProtoTestEvent>() {
- @Override
+ @java.lang.Override
public ProtoTestEvent parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
- return new ProtoTestEvent(input, extensionRegistry);
+ Builder builder = newBuilder();
+ try {
+ builder.mergeFrom(input, extensionRegistry);
+ } catch (com.google.protobuf.InvalidProtocolBufferException e) {
+ throw e.setUnfinishedMessage(builder.buildPartial());
+ } catch (com.google.protobuf.UninitializedMessageException e) {
+ throw
e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
+ } catch (java.io.IOException e) {
+ throw new com.google.protobuf.InvalidProtocolBufferException(e)
+ .setUnfinishedMessage(builder.buildPartial());
+ }
+ return builder.buildPartial();
}
};
@@ -3092,12 +3121,12 @@ public final class ProtoTestEventWrapper {
return PARSER;
}
- @Override
+ @java.lang.Override
public com.google.protobuf.Parser<ProtoTestEvent> getParserForType() {
return PARSER;
}
- @Override
+ @java.lang.Override
public
org.apache.druid.data.input.protobuf.ProtoTestEventWrapper.ProtoTestEvent
getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
@@ -3123,21 +3152,22 @@ public final class ProtoTestEventWrapper {
descriptor;
static {
java.lang.String[] descriptorData = {
- "\n\017Prototest.proto\022\tprototest\032\037google/pro" +
- "tobuf/timestamp.proto\"\326\003\n\016ProtoTestEvent" +
+ "\n\017ProtoTest.proto\022\tprototest\032\037google/pro" +
+ "tobuf/timestamp.proto\"\357\003\n\016ProtoTestEvent" +
"\022:\n\teventType\030\001 \002(\0162\'.prototest.ProtoTes" +
"tEvent.EventCategory\022\n\n\002id\030\002 \002(\004\022\021\n\ttime" +
"stamp\030\003 \002(\t\022\023\n\013someOtherId\030\004
\001(\r\022\017\n\007isVa" +
"lid\030\005 \001(\010\022\023\n\013description\030\006
\001(\t\022\027\n\017someFl" +
"oatColumn\030\007 \001(\002\022\025\n\rsomeIntColumn\030\010
\001(\r\022\026" +
- "\n\016someLongColumn\030\t \001(\004\022*\n\003foo\030\n
\001(\0132\035.pr" +
- "ototest.ProtoTestEvent.Foo\022*\n\003bar\030\013 \003(\0132" +
- "\035.prototest.ProtoTestEvent.Foo\0222\n\016otherT" +
- "imestamp\030\014 \001(\0132\032.google.protobuf.Timesta" +
- "mp\032\022\n\003Foo\022\013\n\003bar\030\001
\002(\t\"F\n\rEventCategory\022" +
-
"\021\n\rCATEGORY_ZERO\020\000\022\020\n\014CATEGORY_ONE\020\001\022\020\n\014"
+
- "CATEGORY_TWO\020\002B=\n$org.apache.druid.data." +
- "input.protobufB\025ProtoTestEventWrapper"
+ "\n\016someLongColumn\030\t \001(\004\022\027\n\017someBytesColum" +
+ "n\030\n \002(\014\022*\n\003foo\030\013
\001(\0132\035.prototest.ProtoTe" +
+ "stEvent.Foo\022*\n\003bar\030\014 \003(\0132\035.prototest.Pro" +
+ "toTestEvent.Foo\0222\n\016otherTimestamp\030\r \001(\0132" +
+ "\032.google.protobuf.Timestamp\032\022\n\003Foo\022\013\n\003ba" +
+ "r\030\001 \002(\t\"F\n\rEventCategory\022\021\n\rCATEGORY_ZER" +
+
"O\020\000\022\020\n\014CATEGORY_ONE\020\001\022\020\n\014CATEGORY_TWO\020\002B"
+
+ "=\n$org.apache.druid.data.input.protobufB" +
+ "\025ProtoTestEventWrapper"
};
descriptor = com.google.protobuf.Descriptors.FileDescriptor
.internalBuildGeneratedFileFrom(descriptorData,
@@ -3149,7 +3179,7 @@ public final class ProtoTestEventWrapper {
internal_static_prototest_ProtoTestEvent_fieldAccessorTable = new
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable(
internal_static_prototest_ProtoTestEvent_descriptor,
- new java.lang.String[] { "EventType", "Id", "Timestamp",
"SomeOtherId", "IsValid", "Description", "SomeFloatColumn", "SomeIntColumn",
"SomeLongColumn", "Foo", "Bar", "OtherTimestamp", });
+ new java.lang.String[] { "EventType", "Id", "Timestamp",
"SomeOtherId", "IsValid", "Description", "SomeFloatColumn", "SomeIntColumn",
"SomeLongColumn", "SomeBytesColumn", "Foo", "Bar", "OtherTimestamp", });
internal_static_prototest_ProtoTestEvent_Foo_descriptor =
internal_static_prototest_ProtoTestEvent_descriptor.getNestedTypes().get(0);
internal_static_prototest_ProtoTestEvent_Foo_fieldAccessorTable = new
diff --git
a/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufInputFormatTest.java
b/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufInputFormatTest.java
index 1d0cfe9166..0b5d096449 100644
---
a/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufInputFormatTest.java
+++
b/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufInputFormatTest.java
@@ -81,7 +81,8 @@ public class ProtobufInputFormatTest
new StringDimensionSchema("event"),
new StringDimensionSchema("id"),
new StringDimensionSchema("someOtherId"),
- new StringDimensionSchema("isValid")
+ new StringDimensionSchema("isValid"),
+ new StringDimensionSchema("someBytesColumn")
));
flattenSpec = new JSONPathSpec(
true,
@@ -161,6 +162,7 @@ public class ProtobufInputFormatTest
.add("id")
.add("someOtherId")
.add("isValid")
+ .add("someBytesColumn")
.build(),
row.getDimensions()
);
@@ -202,6 +204,7 @@ public class ProtobufInputFormatTest
.add("id")
.add("someOtherId")
.add("isValid")
+ .add("someBytesColumn")
.build(),
row.getDimensions()
);
@@ -239,6 +242,7 @@ public class ProtobufInputFormatTest
.add("someLongColumn")
.add("someFloatColumn")
.add("id")
+ .add("someBytesColumn")
.add("timestamp")
.build(),
row.getDimensions()
@@ -272,7 +276,8 @@ public class ProtobufInputFormatTest
new StringDimensionSchema("isValid"),
new StringDimensionSchema("eventType"),
new NestedDataDimensionSchema("foo"),
- new NestedDataDimensionSchema("bar")
+ new NestedDataDimensionSchema("bar"),
+ new StringDimensionSchema("someBytesColumn")
)
),
null
@@ -305,6 +310,7 @@ public class ProtobufInputFormatTest
.add("eventType")
.add("foo")
.add("bar")
+ .add("someBytesColumn")
.build(),
row.getDimensions()
);
@@ -314,6 +320,10 @@ public class ProtobufInputFormatTest
ImmutableList.of(ImmutableMap.of("bar", "bar0"),
ImmutableMap.of("bar", "bar1")),
row.getRaw("bar")
);
+ Assert.assertArrayEquals(
+ new byte[]{0x01, 0x02, 0x03, 0x04},
+ (byte[]) row.getRaw("someBytesColumn")
+ );
ProtobufInputRowParserTest.verifyNestedData(row, dateTime);
}
@@ -386,7 +396,7 @@ public class ProtobufInputFormatTest
null
).read().next();
- ProtobufInputRowParserTest.verifyFlatData(row, dateTime);
+ ProtobufInputRowParserTest.verifyFlatData(row, dateTime, false);
}
@Test
diff --git
a/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufInputRowParserTest.java
b/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufInputRowParserTest.java
index dbcf4d3b31..9ac9fec365 100644
---
a/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufInputRowParserTest.java
+++
b/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufInputRowParserTest.java
@@ -21,6 +21,7 @@ package org.apache.druid.data.input.protobuf;
import com.google.common.collect.ImmutableList;
import com.google.common.collect.Lists;
+import com.google.protobuf.ByteString;
import com.google.protobuf.Timestamp;
import org.apache.druid.data.input.InputRow;
import org.apache.druid.data.input.impl.DimensionsSpec;
@@ -29,6 +30,7 @@ import org.apache.druid.data.input.impl.JavaScriptParseSpec;
import org.apache.druid.data.input.impl.ParseSpec;
import org.apache.druid.data.input.impl.StringDimensionSchema;
import org.apache.druid.data.input.impl.TimestampSpec;
+import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.java.util.common.parsers.JSONPathFieldSpec;
import org.apache.druid.java.util.common.parsers.JSONPathFieldType;
import org.apache.druid.java.util.common.parsers.JSONPathSpec;
@@ -136,7 +138,7 @@ public class ProtobufInputRowParserTest
ProtoTestEventWrapper.ProtoTestEvent event = buildFlatData(dateTime);
InputRow row = parser.parseBatch(toByteBuffer(event)).get(0);
- verifyFlatData(row, dateTime);
+ verifyFlatData(row, dateTime, true);
}
@Test
@@ -150,7 +152,7 @@ public class ProtobufInputRowParserTest
InputRow row = parser.parseBatch(toByteBuffer(event)).get(0);
- verifyFlatDataWithComplexTimestamp(row, dateTime);
+ verifyFlatDataWithComplexTimestamp(row, dateTime, true);
}
@Test
@@ -212,10 +214,11 @@ public class ProtobufInputRowParserTest
.setSomeFloatColumn(47.11F)
.setSomeIntColumn(815)
.setSomeLongColumn(816L)
+ .setSomeBytesColumn(ByteString.copyFrom(new byte[]{0x01, 0x02, 0x03,
0x04}))
.build();
}
- static void verifyFlatData(InputRow row, DateTime dateTime)
+ static void verifyFlatData(InputRow row, DateTime dateTime, boolean
badBytesConversion)
{
Assert.assertEquals(dateTime.getMillis(), row.getTimestampFromEpoch());
@@ -223,6 +226,13 @@ public class ProtobufInputRowParserTest
assertDimensionEquals(row, "isValid", "true");
assertDimensionEquals(row, "someOtherId", "4712");
assertDimensionEquals(row, "description", "description");
+ if (badBytesConversion) {
+ // legacy flattener used by parser doesn't convert bytes, instead calls
tostring
+ // this can be removed if we update the parser to use the protobuf
flattener used by the input format/reader
+ assertDimensionEquals(row, "someBytesColumn",
row.getRaw("someBytesColumn").toString());
+ } else {
+ assertDimensionEquals(row, "someBytesColumn",
StringUtils.encodeBase64String(new byte[]{0x01, 0x02, 0x03, 0x04}));
+ }
Assert.assertEquals(47.11F, row.getMetric("someFloatColumn").floatValue(),
0.0);
@@ -242,6 +252,7 @@ public class ProtobufInputRowParserTest
.setSomeFloatColumn(47.11F)
.setSomeIntColumn(815)
.setSomeLongColumn(816L)
+ .setSomeBytesColumn(ByteString.copyFrom(new byte[]{0x01, 0x02, 0x03,
0x04}))
.setFoo(ProtoTestEventWrapper.ProtoTestEvent.Foo
.newBuilder()
.setBar("baz"))
@@ -266,6 +277,7 @@ public class ProtobufInputRowParserTest
assertDimensionEquals(row, "eventType",
ProtoTestEventWrapper.ProtoTestEvent.EventCategory.CATEGORY_ONE.name());
assertDimensionEquals(row, "foobar", "baz");
assertDimensionEquals(row, "bar0", "bar0");
+ assertDimensionEquals(row, "someBytesColumn",
StringUtils.encodeBase64String(new byte[]{0x01, 0x02, 0x03, 0x04}));
Assert.assertEquals(47.11F, row.getMetric("someFloatColumn").floatValue(),
0.0);
@@ -287,12 +299,13 @@ public class ProtobufInputRowParserTest
.setSomeFloatColumn(47.11F)
.setSomeIntColumn(815)
.setSomeLongColumn(816L)
+ .setSomeBytesColumn(ByteString.copyFrom(new byte[]{0x01, 0x02, 0x03,
0x04}))
.build();
}
- static void verifyFlatDataWithComplexTimestamp(InputRow row, DateTime
dateTime)
+ static void verifyFlatDataWithComplexTimestamp(InputRow row, DateTime
dateTime, boolean badBytesConversion)
{
- verifyFlatData(row, dateTime);
+ verifyFlatData(row, dateTime, badBytesConversion);
}
static ByteBuffer toByteBuffer(ProtoTestEventWrapper.ProtoTestEvent event)
throws IOException
diff --git
a/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufReaderTest.java
b/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufReaderTest.java
index 24807e6424..36654c6cc9 100644
---
a/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufReaderTest.java
+++
b/extensions-core/protobuf-extensions/src/test/java/org/apache/druid/data/input/protobuf/ProtobufReaderTest.java
@@ -101,7 +101,7 @@ public class ProtobufReaderTest
InputRow row = reader.parseInputRows(decoder.parse(buffer)).get(0);
- ProtobufInputRowParserTest.verifyFlatData(row, dateTime);
+ ProtobufInputRowParserTest.verifyFlatData(row, dateTime, false);
}
@Test
@@ -117,7 +117,7 @@ public class ProtobufReaderTest
InputRow row = reader.parseInputRows(decoder.parse(buffer)).get(0);
- ProtobufInputRowParserTest.verifyFlatDataWithComplexTimestamp(row,
dateTime);
+ ProtobufInputRowParserTest.verifyFlatDataWithComplexTimestamp(row,
dateTime, false);
}
@Test
@@ -138,6 +138,6 @@ public class ProtobufReaderTest
InputRow row = reader.parseInputRows(decoder.parse(buffer)).get(0);
- ProtobufInputRowParserTest.verifyFlatDataWithComplexTimestamp(row,
dateTime);
+ ProtobufInputRowParserTest.verifyFlatDataWithComplexTimestamp(row,
dateTime, false);
}
}
diff --git
a/extensions-core/protobuf-extensions/src/test/resources/ProtoTest.proto
b/extensions-core/protobuf-extensions/src/test/resources/ProtoTest.proto
index 96b00d437d..19085970f1 100644
--- a/extensions-core/protobuf-extensions/src/test/resources/ProtoTest.proto
+++ b/extensions-core/protobuf-extensions/src/test/resources/ProtoTest.proto
@@ -44,7 +44,8 @@ message ProtoTestEvent {
optional float someFloatColumn = 7;
optional uint32 someIntColumn = 8;
optional uint64 someLongColumn = 9;
- optional Foo foo = 10;
- repeated Foo bar = 11;
- optional google.protobuf.Timestamp otherTimestamp = 12;
+ required bytes someBytesColumn = 10;
+ optional Foo foo = 11;
+ repeated Foo bar = 12;
+ optional google.protobuf.Timestamp otherTimestamp = 13;
}
diff --git
a/extensions-core/protobuf-extensions/src/test/resources/prototest.desc
b/extensions-core/protobuf-extensions/src/test/resources/prototest.desc
index 7509c6b82a..350cb03ea6 100644
Binary files
a/extensions-core/protobuf-extensions/src/test/resources/prototest.desc and
b/extensions-core/protobuf-extensions/src/test/resources/prototest.desc differ
diff --git
a/processing/src/main/java/org/apache/druid/segment/StringDimensionIndexer.java
b/processing/src/main/java/org/apache/druid/segment/StringDimensionIndexer.java
index 589ad84fee..62713966b0 100644
---
a/processing/src/main/java/org/apache/druid/segment/StringDimensionIndexer.java
+++
b/processing/src/main/java/org/apache/druid/segment/StringDimensionIndexer.java
@@ -28,6 +28,7 @@ import org.apache.druid.collections.bitmap.MutableBitmap;
import org.apache.druid.common.config.NullHandling;
import org.apache.druid.data.input.impl.DimensionSchema.MultiValueHandling;
import org.apache.druid.java.util.common.ISE;
+import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.java.util.common.guava.Comparators;
import org.apache.druid.query.dimension.DimensionSpec;
import org.apache.druid.query.extraction.ExtractionFn;
@@ -122,6 +123,9 @@ public class StringDimensionIndexer extends
DictionaryEncodedColumnIndexer<int[]
encodedDimensionValues = pos == retVal.length ? retVal :
Arrays.copyOf(retVal, pos);
}
+ } else if (dimValues instanceof byte[]) {
+ encodedDimensionValues =
+ new
int[]{dimLookup.add(emptyToNullIfNeeded(StringUtils.encodeBase64String((byte[])
dimValues)))};
} else {
encodedDimensionValues = new
int[]{dimLookup.add(emptyToNullIfNeeded(dimValues))};
}
diff --git
a/processing/src/test/java/org/apache/druid/segment/StringDimensionIndexerTest.java
b/processing/src/test/java/org/apache/druid/segment/StringDimensionIndexerTest.java
index 60540e2fe2..b43f3c1005 100644
---
a/processing/src/test/java/org/apache/druid/segment/StringDimensionIndexerTest.java
+++
b/processing/src/test/java/org/apache/druid/segment/StringDimensionIndexerTest.java
@@ -20,6 +20,7 @@
package org.apache.druid.segment;
import org.apache.druid.data.input.impl.DimensionSchema;
+import org.apache.druid.java.util.common.StringUtils;
import org.apache.druid.testing.InitializedNullHandlingTest;
import org.junit.Assert;
import org.junit.Test;
@@ -204,6 +205,23 @@ public class StringDimensionIndexerTest extends
InitializedNullHandlingTest
Assert.assertEquals(2940L, totalSizeWithAvgEstimates);
}
+ @Test
+ public void testBinaryInputs()
+ {
+ final StringDimensionIndexer indexer = new StringDimensionIndexer(
+ DimensionSchema.MultiValueHandling.SORTED_ARRAY,
+ true,
+ false,
+ false
+ );
+ final byte[] byteVal = new byte[]{0x01, 0x02, 0x03, 0x04};
+ EncodedKeyComponent<int[]> keyComponent =
indexer.processRowValsToUnsortedEncodedKeyComponent(byteVal, false);
+ Assert.assertEquals(
+ StringUtils.encodeBase64String(byteVal),
+
indexer.convertUnsortedEncodedKeyComponentToActualList(keyComponent.getComponent())
+ );
+ }
+
private long verifyEncodedValues(
StringDimensionIndexer indexer,
Object dimensionValues,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]