Skip to content

Commit

Permalink
upgrade thrift to 0.15.0 (apache#8427)
Browse files Browse the repository at this point in the history
  • Loading branch information
xiangfu0 authored Mar 29, 2022
1 parent 7655fcc commit a4794d4
Show file tree
Hide file tree
Showing 23 changed files with 536 additions and 437 deletions.
29 changes: 29 additions & 0 deletions pinot-common/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,35 @@
<groupId>org.xolstice.maven.plugins</groupId>
<artifactId>protobuf-maven-plugin</artifactId>
</plugin>
<plugin>
<groupId>com.diffplug.spotless</groupId>
<artifactId>spotless-maven-plugin</artifactId>
<version>2.9.0</version>
<executions>
<execution>
<phase>verify</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
<configuration>
<java>
<includes>
<include>src/main/java/**/*.java</include>
<include>src/test/java/**/*.java</include>
</includes>
<excludes>
<exclude>src/main/java/org/apache/pinot/common/request/*.java</exclude>
<exclude>src/main/java/org/apache/pinot/common/response/ProcessingException.java</exclude>
</excludes>
<importOrder>
<order>,\#</order>
</importOrder>
<removeUnusedImports/>
</java>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
* under the License.
*/
/**
* Autogenerated by Thrift Compiler (0.13.0)
* Autogenerated by Thrift Compiler (0.15.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
Expand All @@ -28,9 +28,9 @@
/**
* AUTO GENERATED: DO NOT EDIT
* Aggregation
*
*
*/
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.13.0)", date = "2022-03-28")
@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2022-03-28")
public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo, AggregationInfo._Fields>, java.io.Serializable, Cloneable, Comparable<AggregationInfo> {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AggregationInfo");

Expand Down Expand Up @@ -123,16 +123,16 @@ public java.lang.String getFieldName() {
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
tmpMap.put(_Fields.AGGREGATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("aggregationType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.AGGREGATION_TYPE, new org.apache.thrift.meta_data.FieldMetaData("aggregationType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
tmpMap.put(_Fields.AGGREGATION_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("aggregationParams", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
tmpMap.put(_Fields.AGGREGATION_PARAMS, new org.apache.thrift.meta_data.FieldMetaData("aggregationParams", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.MapMetaData(org.apache.thrift.protocol.TType.MAP,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING),
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
tmpMap.put(_Fields.IS_IN_SELECT_LIST, new org.apache.thrift.meta_data.FieldMetaData("isInSelectList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
tmpMap.put(_Fields.IS_IN_SELECT_LIST, new org.apache.thrift.meta_data.FieldMetaData("isInSelectList", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
tmpMap.put(_Fields.EXPRESSIONS, new org.apache.thrift.meta_data.FieldMetaData("expressions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
tmpMap.put(_Fields.EXPRESSIONS, new org.apache.thrift.meta_data.FieldMetaData("expressions", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING))));
metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AggregationInfo.class, metaDataMap);
Expand Down Expand Up @@ -327,6 +327,7 @@ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable
setExpressions((java.util.List<java.lang.String>)value);
}
break;

}
}

Expand All @@ -344,6 +345,7 @@ public java.lang.Object getFieldValue(_Fields field) {

case EXPRESSIONS:
return getExpressions();

}
throw new java.lang.IllegalStateException();
}
Expand All @@ -369,8 +371,6 @@ public boolean isSet(_Fields field) {

@Override
public boolean equals(java.lang.Object that) {
if (that == null)
return false;
if (that instanceof AggregationInfo)
return this.equals((AggregationInfo)that);
return false;
Expand Down Expand Up @@ -452,7 +452,7 @@ public int compareTo(AggregationInfo other) {

int lastComparison = 0;

lastComparison = java.lang.Boolean.valueOf(isSetAggregationType()).compareTo(other.isSetAggregationType());
lastComparison = java.lang.Boolean.compare(isSetAggregationType(), other.isSetAggregationType());
if (lastComparison != 0) {
return lastComparison;
}
Expand All @@ -462,7 +462,7 @@ public int compareTo(AggregationInfo other) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetAggregationParams()).compareTo(other.isSetAggregationParams());
lastComparison = java.lang.Boolean.compare(isSetAggregationParams(), other.isSetAggregationParams());
if (lastComparison != 0) {
return lastComparison;
}
Expand All @@ -472,7 +472,7 @@ public int compareTo(AggregationInfo other) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetIsInSelectList()).compareTo(other.isSetIsInSelectList());
lastComparison = java.lang.Boolean.compare(isSetIsInSelectList(), other.isSetIsInSelectList());
if (lastComparison != 0) {
return lastComparison;
}
Expand All @@ -482,7 +482,7 @@ public int compareTo(AggregationInfo other) {
return lastComparison;
}
}
lastComparison = java.lang.Boolean.valueOf(isSetExpressions()).compareTo(other.isSetExpressions());
lastComparison = java.lang.Boolean.compare(isSetExpressions(), other.isSetExpressions());
if (lastComparison != 0) {
return lastComparison;
}
Expand Down Expand Up @@ -589,15 +589,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, AggregationInfo str
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // AGGREGATION_TYPE
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.aggregationType = iprot.readString();
struct.setAggregationTypeIsSet(true);
} else {
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
Expand All @@ -617,15 +617,15 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, AggregationInfo str
iprot.readMapEnd();
}
struct.setAggregationParamsIsSet(true);
} else {
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // IS_IN_SELECT_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.isInSelectList = iprot.readBool();
struct.setIsInSelectListIsSet(true);
} else {
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
Expand All @@ -643,7 +643,7 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, AggregationInfo str
iprot.readListEnd();
}
struct.setExpressionsIsSet(true);
} else {
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
Expand Down Expand Up @@ -704,6 +704,7 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, AggregationInfo st
oprot.writeFieldStop();
oprot.writeStructEnd();
}

}

private static class AggregationInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
Expand Down Expand Up @@ -768,7 +769,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, AggregationInfo stru
}
if (incoming.get(1)) {
{
org.apache.thrift.protocol.TMap _map63 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
org.apache.thrift.protocol.TMap _map63 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
struct.aggregationParams = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map63.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key64;
@org.apache.thrift.annotation.Nullable java.lang.String _val65;
Expand All @@ -787,7 +788,7 @@ public void read(org.apache.thrift.protocol.TProtocol prot, AggregationInfo stru
}
if (incoming.get(3)) {
{
org.apache.thrift.protocol.TList _list67 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
org.apache.thrift.protocol.TList _list67 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRING);
struct.expressions = new java.util.ArrayList<java.lang.String>(_list67.size);
@org.apache.thrift.annotation.Nullable java.lang.String _elem68;
for (int _i69 = 0; _i69 < _list67.size; ++_i69)
Expand All @@ -805,3 +806,4 @@ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.
return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
}
}

Loading

0 comments on commit a4794d4

Please sign in to comment.