You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ma...@apache.org on 2019/07/22 21:24:32 UTC
[incubator-pinot] branch master updated: Issue #4450: Support
parsing of `Order By` clause in PQL compiler. (#4453)
This is an automated email from the ASF dual-hosted git repository.
mayanks pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
The following commit(s) were added to refs/heads/master by this push:
new 6dc820a Issue #4450: Support parsing of `Order By` clause in PQL compiler. (#4453)
6dc820a is described below
commit 6dc820a6e77e412e843b60d32c4b5b9470f630e8
Author: Mayank Shrivastava <ms...@linkedin.com>
AuthorDate: Mon Jul 22 14:24:26 2019 -0700
Issue #4450: Support parsing of `Order By` clause in PQL compiler. (#4453)
This is the first of several PR's to come for implementing group-by +
order-by support in PQL. The changes in this PR are limited to parsing
the order-by clause.
1. Added a top level orderBy field in BrokerRequest. The existing
selectionSort field is tied to selection only queries, and removing it
will break backward compatibility. Once the code is moved to use
PinotQuery instead of BrokerRequest, this will get cleaned up
automatically.
2. Moved to latest Thrift version 0.12.0. This required removing the
org.apache.commons.lang3 exclusion from pom.xml.
3. Added unit test for order-by compilation.
---
.../pinot/common/request/AggregationInfo.java | 384 +++--
.../apache/pinot/common/request/BrokerRequest.java | 1533 ++++++++++----------
.../apache/pinot/common/request/DataSource.java | 216 ++-
.../apache/pinot/common/request/Expression.java | 421 +++---
.../pinot/common/request/ExpressionType.java | 11 +-
.../pinot/common/request/FilterOperator.java | 18 +-
.../apache/pinot/common/request/FilterQuery.java | 561 ++++---
.../pinot/common/request/FilterQueryMap.java | 260 ++--
.../org/apache/pinot/common/request/Function.java | 339 ++---
.../org/apache/pinot/common/request/GroupBy.java | 420 +++---
.../pinot/common/request/HavingFilterQuery.java | 562 ++++---
.../pinot/common/request/HavingFilterQueryMap.java | 259 ++--
.../apache/pinot/common/request/Identifier.java | 220 ++-
.../pinot/common/request/InstanceRequest.java | 542 ++++---
.../org/apache/pinot/common/request/Literal.java | 364 ++---
.../apache/pinot/common/request/PinotQuery.java | 1048 ++++++-------
.../apache/pinot/common/request/QuerySource.java | 218 ++-
.../org/apache/pinot/common/request/QueryType.java | 485 +++----
.../org/apache/pinot/common/request/Selection.java | 486 +++----
.../apache/pinot/common/request/SelectionSort.java | 285 ++--
.../pinot/pql/parsers/pql2/ast/OrderByAstNode.java | 11 +-
.../apache/pinot/pql/parsers/Pql2CompilerTest.java | 54 +-
pinot-common/src/thrift/request.thrift | 1 +
pom.xml | 6 +-
24 files changed, 4076 insertions(+), 4628 deletions(-)
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/AggregationInfo.java b/pinot-common/src/main/java/org/apache/pinot/common/request/AggregationInfo.java
index 99fcc72..f3dc1d5 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/AggregationInfo.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/AggregationInfo.java
@@ -17,70 +17,44 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* AUTO GENERATED: DO NOT EDIT
* Aggregation
- *
+ *
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
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");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("AggregationInfo");
- private static final org.apache.thrift.protocol.TField AGGREGATION_TYPE_FIELD_DESC =
- new org.apache.thrift.protocol.TField("aggregationType", org.apache.thrift.protocol.TType.STRING, (short) 1);
- private static final org.apache.thrift.protocol.TField AGGREGATION_PARAMS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("aggregationParams", org.apache.thrift.protocol.TType.MAP, (short) 2);
- private static final org.apache.thrift.protocol.TField IS_IN_SELECT_LIST_FIELD_DESC =
- new org.apache.thrift.protocol.TField("isInSelectList", org.apache.thrift.protocol.TType.BOOL, (short) 3);
+ private static final org.apache.thrift.protocol.TField AGGREGATION_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregationType", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField AGGREGATION_PARAMS_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregationParams", org.apache.thrift.protocol.TType.MAP, (short)2);
+ private static final org.apache.thrift.protocol.TField IS_IN_SELECT_LIST_FIELD_DESC = new org.apache.thrift.protocol.TField("isInSelectList", org.apache.thrift.protocol.TType.BOOL, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new AggregationInfoStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new AggregationInfoTupleSchemeFactory();
- static {
- schemes.put(StandardScheme.class, new AggregationInfoStandardSchemeFactory());
- schemes.put(TupleScheme.class, new AggregationInfoTupleSchemeFactory());
- }
-
- private String aggregationType; // optional
- private Map<String, String> aggregationParams; // optional
- private boolean isInSelectList; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String aggregationType; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> aggregationParams; // optional
+ public boolean isInSelectList; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- AGGREGATION_TYPE((short) 1, "aggregationType"),
- AGGREGATION_PARAMS((short) 2, "aggregationParams"),
- IS_IN_SELECT_LIST((short) 3, "isInSelectList");
+ AGGREGATION_TYPE((short)1, "aggregationType"),
+ AGGREGATION_PARAMS((short)2, "aggregationParams"),
+ IS_IN_SELECT_LIST((short)3, "isInSelectList");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -88,8 +62,9 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // AGGREGATION_TYPE
return AGGREGATION_TYPE;
case 2: // AGGREGATION_PARAMS
@@ -107,23 +82,22 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -132,7 +106,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -140,25 +114,19 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
// isset id assignments
private static final int __ISINSELECTLIST_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] =
- {_Fields.AGGREGATION_TYPE, _Fields.AGGREGATION_PARAMS, _Fields.IS_IN_SELECT_LIST};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ private static final _Fields optionals[] = {_Fields.AGGREGATION_TYPE,_Fields.AGGREGATION_PARAMS,_Fields.IS_IN_SELECT_LIST};
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new 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,
+ 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,
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)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AggregationInfo.class, metaDataMap);
}
@@ -174,7 +142,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
this.aggregationType = other.aggregationType;
}
if (other.isSetAggregationParams()) {
- Map<String, String> __this__aggregationParams = new HashMap<String, String>(other.aggregationParams);
+ java.util.Map<java.lang.String,java.lang.String> __this__aggregationParams = new java.util.HashMap<java.lang.String,java.lang.String>(other.aggregationParams);
this.aggregationParams = __this__aggregationParams;
}
this.isInSelectList = other.isInSelectList;
@@ -192,12 +160,14 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
this.isInSelectList = false;
}
- public String getAggregationType() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getAggregationType() {
return this.aggregationType;
}
- public void setAggregationType(String aggregationType) {
+ public AggregationInfo setAggregationType(@org.apache.thrift.annotation.Nullable java.lang.String aggregationType) {
this.aggregationType = aggregationType;
+ return this;
}
public void unsetAggregationType() {
@@ -219,19 +189,21 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
return (this.aggregationParams == null) ? 0 : this.aggregationParams.size();
}
- public void putToAggregationParams(String key, String val) {
+ public void putToAggregationParams(java.lang.String key, java.lang.String val) {
if (this.aggregationParams == null) {
- this.aggregationParams = new HashMap<String, String>();
+ this.aggregationParams = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.aggregationParams.put(key, val);
}
- public Map<String, String> getAggregationParams() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.String,java.lang.String> getAggregationParams() {
return this.aggregationParams;
}
- public void setAggregationParams(Map<String, String> aggregationParams) {
+ public AggregationInfo setAggregationParams(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> aggregationParams) {
this.aggregationParams = aggregationParams;
+ return this;
}
public void unsetAggregationParams() {
@@ -253,130 +225,127 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
return this.isInSelectList;
}
- public void setIsInSelectList(boolean isInSelectList) {
+ public AggregationInfo setIsInSelectList(boolean isInSelectList) {
this.isInSelectList = isInSelectList;
setIsInSelectListIsSet(true);
+ return this;
}
public void unsetIsInSelectList() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ISINSELECTLIST_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ISINSELECTLIST_ISSET_ID);
}
/** Returns true if field isInSelectList is set (has been assigned a value) and false otherwise */
public boolean isSetIsInSelectList() {
- return EncodingUtils.testBit(__isset_bitfield, __ISINSELECTLIST_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ISINSELECTLIST_ISSET_ID);
}
public void setIsInSelectListIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ISINSELECTLIST_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ISINSELECTLIST_ISSET_ID, value);
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case AGGREGATION_TYPE:
- if (value == null) {
- unsetAggregationType();
- } else {
- setAggregationType((String) value);
- }
- break;
+ case AGGREGATION_TYPE:
+ if (value == null) {
+ unsetAggregationType();
+ } else {
+ setAggregationType((java.lang.String)value);
+ }
+ break;
- case AGGREGATION_PARAMS:
- if (value == null) {
- unsetAggregationParams();
- } else {
- setAggregationParams((Map<String, String>) value);
- }
- break;
+ case AGGREGATION_PARAMS:
+ if (value == null) {
+ unsetAggregationParams();
+ } else {
+ setAggregationParams((java.util.Map<java.lang.String,java.lang.String>)value);
+ }
+ break;
+
+ case IS_IN_SELECT_LIST:
+ if (value == null) {
+ unsetIsInSelectList();
+ } else {
+ setIsInSelectList((java.lang.Boolean)value);
+ }
+ break;
- case IS_IN_SELECT_LIST:
- if (value == null) {
- unsetIsInSelectList();
- } else {
- setIsInSelectList((Boolean) value);
- }
- break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case AGGREGATION_TYPE:
- return getAggregationType();
+ case AGGREGATION_TYPE:
+ return getAggregationType();
+
+ case AGGREGATION_PARAMS:
+ return getAggregationParams();
- case AGGREGATION_PARAMS:
- return getAggregationParams();
+ case IS_IN_SELECT_LIST:
+ return isIsInSelectList();
- case IS_IN_SELECT_LIST:
- return isIsInSelectList();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case AGGREGATION_TYPE:
- return isSetAggregationType();
- case AGGREGATION_PARAMS:
- return isSetAggregationParams();
- case IS_IN_SELECT_LIST:
- return isSetIsInSelectList();
+ case AGGREGATION_TYPE:
+ return isSetAggregationType();
+ case AGGREGATION_PARAMS:
+ return isSetAggregationParams();
+ case IS_IN_SELECT_LIST:
+ return isSetIsInSelectList();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof AggregationInfo) {
- return this.equals((AggregationInfo) that);
- }
+ if (that instanceof AggregationInfo)
+ return this.equals((AggregationInfo)that);
return false;
}
public boolean equals(AggregationInfo that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_aggregationType = true && this.isSetAggregationType();
boolean that_present_aggregationType = true && that.isSetAggregationType();
if (this_present_aggregationType || that_present_aggregationType) {
- if (!(this_present_aggregationType && that_present_aggregationType)) {
+ if (!(this_present_aggregationType && that_present_aggregationType))
return false;
- }
- if (!this.aggregationType.equals(that.aggregationType)) {
+ if (!this.aggregationType.equals(that.aggregationType))
return false;
- }
}
boolean this_present_aggregationParams = true && this.isSetAggregationParams();
boolean that_present_aggregationParams = true && that.isSetAggregationParams();
if (this_present_aggregationParams || that_present_aggregationParams) {
- if (!(this_present_aggregationParams && that_present_aggregationParams)) {
+ if (!(this_present_aggregationParams && that_present_aggregationParams))
return false;
- }
- if (!this.aggregationParams.equals(that.aggregationParams)) {
+ if (!this.aggregationParams.equals(that.aggregationParams))
return false;
- }
}
boolean this_present_isInSelectList = true && this.isSetIsInSelectList();
boolean that_present_isInSelectList = true && that.isSetIsInSelectList();
if (this_present_isInSelectList || that_present_isInSelectList) {
- if (!(this_present_isInSelectList && that_present_isInSelectList)) {
+ if (!(this_present_isInSelectList && that_present_isInSelectList))
return false;
- }
- if (this.isInSelectList != that.isInSelectList) {
+ if (this.isInSelectList != that.isInSelectList)
return false;
- }
}
return true;
@@ -384,27 +353,21 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_aggregationType = true && (isSetAggregationType());
- list.add(present_aggregationType);
- if (present_aggregationType) {
- list.add(aggregationType);
- }
+ hashCode = hashCode * 8191 + ((isSetAggregationType()) ? 131071 : 524287);
+ if (isSetAggregationType())
+ hashCode = hashCode * 8191 + aggregationType.hashCode();
- boolean present_aggregationParams = true && (isSetAggregationParams());
- list.add(present_aggregationParams);
- if (present_aggregationParams) {
- list.add(aggregationParams);
- }
+ hashCode = hashCode * 8191 + ((isSetAggregationParams()) ? 131071 : 524287);
+ if (isSetAggregationParams())
+ hashCode = hashCode * 8191 + aggregationParams.hashCode();
- boolean present_isInSelectList = true && (isSetIsInSelectList());
- list.add(present_isInSelectList);
- if (present_isInSelectList) {
- list.add(isInSelectList);
- }
+ hashCode = hashCode * 8191 + ((isSetIsInSelectList()) ? 131071 : 524287);
+ if (isSetIsInSelectList())
+ hashCode = hashCode * 8191 + ((isInSelectList) ? 131071 : 524287);
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -415,7 +378,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetAggregationType()).compareTo(other.isSetAggregationType());
+ lastComparison = java.lang.Boolean.valueOf(isSetAggregationType()).compareTo(other.isSetAggregationType());
if (lastComparison != 0) {
return lastComparison;
}
@@ -425,7 +388,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAggregationParams()).compareTo(other.isSetAggregationParams());
+ lastComparison = java.lang.Boolean.valueOf(isSetAggregationParams()).compareTo(other.isSetAggregationParams());
if (lastComparison != 0) {
return lastComparison;
}
@@ -435,7 +398,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIsInSelectList()).compareTo(other.isSetIsInSelectList());
+ lastComparison = java.lang.Boolean.valueOf(isSetIsInSelectList()).compareTo(other.isSetIsInSelectList());
if (lastComparison != 0) {
return lastComparison;
}
@@ -448,23 +411,22 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("AggregationInfo(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("AggregationInfo(");
boolean first = true;
if (isSetAggregationType()) {
@@ -477,9 +439,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
first = false;
}
if (isSetAggregationParams()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("aggregationParams:");
if (this.aggregationParams == null) {
sb.append("null");
@@ -489,9 +449,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
first = false;
}
if (isSetIsInSelectList()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("isInSelectList:");
sb.append(this.isInSelectList);
first = false;
@@ -500,14 +458,12 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -515,8 +471,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -526,21 +481,21 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
}
}
- private static class AggregationInfoStandardSchemeFactory implements SchemeFactory {
+ private static class AggregationInfoStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AggregationInfoStandardScheme getScheme() {
return new AggregationInfoStandardScheme();
}
}
- private static class AggregationInfoStandardScheme extends StandardScheme<AggregationInfo> {
+ private static class AggregationInfoStandardScheme extends org.apache.thrift.scheme.StandardScheme<AggregationInfo> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, AggregationInfo struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, AggregationInfo struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -548,7 +503,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
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;
@@ -556,10 +511,11 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map52 = iprot.readMapBegin();
- struct.aggregationParams = new HashMap<String, String>(2 * _map52.size);
- String _key53;
- String _val54;
- for (int _i55 = 0; _i55 < _map52.size; ++_i55) {
+ struct.aggregationParams = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map52.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key53;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val54;
+ for (int _i55 = 0; _i55 < _map52.size; ++_i55)
+ {
_key53 = iprot.readString();
_val54 = iprot.readString();
struct.aggregationParams.put(_key53, _val54);
@@ -567,7 +523,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
iprot.readMapEnd();
}
struct.setAggregationParamsIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -575,7 +531,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
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;
@@ -585,11 +541,12 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, AggregationInfo struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, AggregationInfo struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -604,9 +561,9 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
if (struct.isSetAggregationParams()) {
oprot.writeFieldBegin(AGGREGATION_PARAMS_FIELD_DESC);
{
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
- org.apache.thrift.protocol.TType.STRING, struct.aggregationParams.size()));
- for (Map.Entry<String, String> _iter56 : struct.aggregationParams.entrySet()) {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.aggregationParams.size()));
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter56 : struct.aggregationParams.entrySet())
+ {
oprot.writeString(_iter56.getKey());
oprot.writeString(_iter56.getValue());
}
@@ -623,21 +580,21 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class AggregationInfoTupleSchemeFactory implements SchemeFactory {
+ private static class AggregationInfoTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public AggregationInfoTupleScheme getScheme() {
return new AggregationInfoTupleScheme();
}
}
- private static class AggregationInfoTupleScheme extends TupleScheme<AggregationInfo> {
+ private static class AggregationInfoTupleScheme extends org.apache.thrift.scheme.TupleScheme<AggregationInfo> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, AggregationInfo struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ public void write(org.apache.thrift.protocol.TProtocol prot, AggregationInfo struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetAggregationType()) {
optionals.set(0);
}
@@ -654,7 +611,8 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
if (struct.isSetAggregationParams()) {
{
oprot.writeI32(struct.aggregationParams.size());
- for (Map.Entry<String, String> _iter57 : struct.aggregationParams.entrySet()) {
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter57 : struct.aggregationParams.entrySet())
+ {
oprot.writeString(_iter57.getKey());
oprot.writeString(_iter57.getValue());
}
@@ -666,23 +624,21 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, AggregationInfo struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ public void read(org.apache.thrift.protocol.TProtocol prot, AggregationInfo struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.aggregationType = iprot.readString();
struct.setAggregationTypeIsSet(true);
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TMap _map58 =
- new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
- org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.aggregationParams = new HashMap<String, String>(2 * _map58.size);
- String _key59;
- String _val60;
- for (int _i61 = 0; _i61 < _map58.size; ++_i61) {
+ org.apache.thrift.protocol.TMap _map58 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.aggregationParams = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map58.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key59;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val60;
+ for (int _i61 = 0; _i61 < _map58.size; ++_i61)
+ {
_key59 = iprot.readString();
_val60 = iprot.readString();
struct.aggregationParams.put(_key59, _val60);
@@ -696,5 +652,9 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
}
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/BrokerRequest.java b/pinot-common/src/main/java/org/apache/pinot/common/request/BrokerRequest.java
index 9a25d6e..3035303 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/BrokerRequest.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/BrokerRequest.java
@@ -17,127 +17,89 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* AUTO GENERATED: DO NOT EDIT
* Broker Query
- *
+ *
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, BrokerRequest._Fields>, java.io.Serializable, Cloneable, Comparable<BrokerRequest> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("BrokerRequest");
-
- private static final org.apache.thrift.protocol.TField QUERY_TYPE_FIELD_DESC =
- new org.apache.thrift.protocol.TField("queryType", org.apache.thrift.protocol.TType.STRUCT, (short) 1);
- private static final org.apache.thrift.protocol.TField QUERY_SOURCE_FIELD_DESC =
- new org.apache.thrift.protocol.TField("querySource", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
- private static final org.apache.thrift.protocol.TField TIME_INTERVAL_FIELD_DESC =
- new org.apache.thrift.protocol.TField("timeInterval", org.apache.thrift.protocol.TType.STRING, (short) 3);
- private static final org.apache.thrift.protocol.TField DURATION_FIELD_DESC =
- new org.apache.thrift.protocol.TField("duration", org.apache.thrift.protocol.TType.STRING, (short) 4);
- private static final org.apache.thrift.protocol.TField FILTER_QUERY_FIELD_DESC =
- new org.apache.thrift.protocol.TField("filterQuery", org.apache.thrift.protocol.TType.STRUCT, (short) 5);
- private static final org.apache.thrift.protocol.TField AGGREGATIONS_INFO_FIELD_DESC =
- new org.apache.thrift.protocol.TField("aggregationsInfo", org.apache.thrift.protocol.TType.LIST, (short) 6);
- private static final org.apache.thrift.protocol.TField GROUP_BY_FIELD_DESC =
- new org.apache.thrift.protocol.TField("groupBy", org.apache.thrift.protocol.TType.STRUCT, (short) 7);
- private static final org.apache.thrift.protocol.TField SELECTIONS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("selections", org.apache.thrift.protocol.TType.STRUCT, (short) 8);
- private static final org.apache.thrift.protocol.TField FILTER_SUB_QUERY_MAP_FIELD_DESC =
- new org.apache.thrift.protocol.TField("filterSubQueryMap", org.apache.thrift.protocol.TType.STRUCT, (short) 9);
- private static final org.apache.thrift.protocol.TField BUCKET_HASH_KEY_FIELD_DESC =
- new org.apache.thrift.protocol.TField("bucketHashKey", org.apache.thrift.protocol.TType.STRING, (short) 10);
- private static final org.apache.thrift.protocol.TField ENABLE_TRACE_FIELD_DESC =
- new org.apache.thrift.protocol.TField("enableTrace", org.apache.thrift.protocol.TType.BOOL, (short) 11);
- private static final org.apache.thrift.protocol.TField RESPONSE_FORMAT_FIELD_DESC =
- new org.apache.thrift.protocol.TField("responseFormat", org.apache.thrift.protocol.TType.STRING, (short) 12);
- private static final org.apache.thrift.protocol.TField DEBUG_OPTIONS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("debugOptions", org.apache.thrift.protocol.TType.MAP, (short) 13);
- private static final org.apache.thrift.protocol.TField QUERY_OPTIONS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("queryOptions", org.apache.thrift.protocol.TType.MAP, (short) 14);
- private static final org.apache.thrift.protocol.TField HAVING_FILTER_QUERY_FIELD_DESC =
- new org.apache.thrift.protocol.TField("havingFilterQuery", org.apache.thrift.protocol.TType.STRUCT, (short) 15);
- private static final org.apache.thrift.protocol.TField HAVING_FILTER_SUB_QUERY_MAP_FIELD_DESC =
- new org.apache.thrift.protocol.TField("havingFilterSubQueryMap", org.apache.thrift.protocol.TType.STRUCT,
- (short) 16);
- private static final org.apache.thrift.protocol.TField PINOT_QUERY_FIELD_DESC =
- new org.apache.thrift.protocol.TField("pinotQuery", org.apache.thrift.protocol.TType.STRUCT, (short) 17);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
-
- static {
- schemes.put(StandardScheme.class, new BrokerRequestStandardSchemeFactory());
- schemes.put(TupleScheme.class, new BrokerRequestTupleSchemeFactory());
- }
-
- private QueryType queryType; // optional
- private QuerySource querySource; // optional
- private String timeInterval; // optional
- private String duration; // optional
- private FilterQuery filterQuery; // optional
- private List<AggregationInfo> aggregationsInfo; // optional
- private GroupBy groupBy; // optional
- private Selection selections; // optional
- private FilterQueryMap filterSubQueryMap; // optional
- private String bucketHashKey; // optional
- private boolean enableTrace; // optional
- private String responseFormat; // optional
- private Map<String, String> debugOptions; // optional
- private Map<String, String> queryOptions; // optional
- private HavingFilterQuery havingFilterQuery; // optional
- private HavingFilterQueryMap havingFilterSubQueryMap; // optional
- private org.apache.pinot.common.request.PinotQuery pinotQuery; // optional
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BrokerRequest");
+
+ private static final org.apache.thrift.protocol.TField QUERY_TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("queryType", org.apache.thrift.protocol.TType.STRUCT, (short)1);
+ private static final org.apache.thrift.protocol.TField QUERY_SOURCE_FIELD_DESC = new org.apache.thrift.protocol.TField("querySource", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField TIME_INTERVAL_FIELD_DESC = new org.apache.thrift.protocol.TField("timeInterval", org.apache.thrift.protocol.TType.STRING, (short)3);
+ private static final org.apache.thrift.protocol.TField DURATION_FIELD_DESC = new org.apache.thrift.protocol.TField("duration", org.apache.thrift.protocol.TType.STRING, (short)4);
+ private static final org.apache.thrift.protocol.TField FILTER_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("filterQuery", org.apache.thrift.protocol.TType.STRUCT, (short)5);
+ private static final org.apache.thrift.protocol.TField AGGREGATIONS_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregationsInfo", org.apache.thrift.protocol.TType.LIST, (short)6);
+ private static final org.apache.thrift.protocol.TField GROUP_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("groupBy", org.apache.thrift.protocol.TType.STRUCT, (short)7);
+ private static final org.apache.thrift.protocol.TField SELECTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("selections", org.apache.thrift.protocol.TType.STRUCT, (short)8);
+ private static final org.apache.thrift.protocol.TField FILTER_SUB_QUERY_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("filterSubQueryMap", org.apache.thrift.protocol.TType.STRUCT, (short)9);
+ private static final org.apache.thrift.protocol.TField BUCKET_HASH_KEY_FIELD_DESC = new org.apache.thrift.protocol.TField("bucketHashKey", org.apache.thrift.protocol.TType.STRING, (short)10);
+ private static final org.apache.thrift.protocol.TField ENABLE_TRACE_FIELD_DESC = new org.apache.thrift.protocol.TField("enableTrace", org.apache.thrift.protocol.TType.BOOL, (short)11);
+ private static final org.apache.thrift.protocol.TField RESPONSE_FORMAT_FIELD_DESC = new org.apache.thrift.protocol.TField("responseFormat", org.apache.thrift.protocol.TType.STRING, (short)12);
+ private static final org.apache.thrift.protocol.TField DEBUG_OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("debugOptions", org.apache.thrift.protocol.TType.MAP, (short)13);
+ private static final org.apache.thrift.protocol.TField QUERY_OPTIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("queryOptions", org.apache.thrift.protocol.TType.MAP, (short)14);
+ private static final org.apache.thrift.protocol.TField HAVING_FILTER_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("havingFilterQuery", org.apache.thrift.protocol.TType.STRUCT, (short)15);
+ private static final org.apache.thrift.protocol.TField HAVING_FILTER_SUB_QUERY_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("havingFilterSubQueryMap", org.apache.thrift.protocol.TType.STRUCT, (short)16);
+ private static final org.apache.thrift.protocol.TField PINOT_QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("pinotQuery", org.apache.thrift.protocol.TType.STRUCT, (short)17);
+ private static final org.apache.thrift.protocol.TField ORDER_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("orderBy", org.apache.thrift.protocol.TType.LIST, (short)18);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new BrokerRequestStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new BrokerRequestTupleSchemeFactory();
+
+ public @org.apache.thrift.annotation.Nullable QueryType queryType; // optional
+ public @org.apache.thrift.annotation.Nullable QuerySource querySource; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String timeInterval; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String duration; // optional
+ public @org.apache.thrift.annotation.Nullable FilterQuery filterQuery; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<AggregationInfo> aggregationsInfo; // optional
+ public @org.apache.thrift.annotation.Nullable GroupBy groupBy; // optional
+ public @org.apache.thrift.annotation.Nullable Selection selections; // optional
+ public @org.apache.thrift.annotation.Nullable FilterQueryMap filterSubQueryMap; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String bucketHashKey; // optional
+ public boolean enableTrace; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String responseFormat; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> debugOptions; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> queryOptions; // optional
+ public @org.apache.thrift.annotation.Nullable HavingFilterQuery havingFilterQuery; // optional
+ public @org.apache.thrift.annotation.Nullable HavingFilterQueryMap havingFilterSubQueryMap; // optional
+ public @org.apache.thrift.annotation.Nullable org.apache.pinot.common.request.PinotQuery pinotQuery; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<SelectionSort> orderBy; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- QUERY_TYPE((short) 1, "queryType"),
- QUERY_SOURCE((short) 2, "querySource"),
- TIME_INTERVAL((short) 3, "timeInterval"),
- DURATION((short) 4, "duration"),
- FILTER_QUERY((short) 5, "filterQuery"),
- AGGREGATIONS_INFO((short) 6, "aggregationsInfo"),
- GROUP_BY((short) 7, "groupBy"),
- SELECTIONS((short) 8, "selections"),
- FILTER_SUB_QUERY_MAP((short) 9, "filterSubQueryMap"),
- BUCKET_HASH_KEY((short) 10, "bucketHashKey"),
- ENABLE_TRACE((short) 11, "enableTrace"),
- RESPONSE_FORMAT((short) 12, "responseFormat"),
- DEBUG_OPTIONS((short) 13, "debugOptions"),
- QUERY_OPTIONS((short) 14, "queryOptions"),
- HAVING_FILTER_QUERY((short) 15, "havingFilterQuery"),
- HAVING_FILTER_SUB_QUERY_MAP((short) 16, "havingFilterSubQueryMap"),
- PINOT_QUERY((short) 17, "pinotQuery");
-
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ QUERY_TYPE((short)1, "queryType"),
+ QUERY_SOURCE((short)2, "querySource"),
+ TIME_INTERVAL((short)3, "timeInterval"),
+ DURATION((short)4, "duration"),
+ FILTER_QUERY((short)5, "filterQuery"),
+ AGGREGATIONS_INFO((short)6, "aggregationsInfo"),
+ GROUP_BY((short)7, "groupBy"),
+ SELECTIONS((short)8, "selections"),
+ FILTER_SUB_QUERY_MAP((short)9, "filterSubQueryMap"),
+ BUCKET_HASH_KEY((short)10, "bucketHashKey"),
+ ENABLE_TRACE((short)11, "enableTrace"),
+ RESPONSE_FORMAT((short)12, "responseFormat"),
+ DEBUG_OPTIONS((short)13, "debugOptions"),
+ QUERY_OPTIONS((short)14, "queryOptions"),
+ HAVING_FILTER_QUERY((short)15, "havingFilterQuery"),
+ HAVING_FILTER_SUB_QUERY_MAP((short)16, "havingFilterSubQueryMap"),
+ PINOT_QUERY((short)17, "pinotQuery"),
+ ORDER_BY((short)18, "orderBy");
+
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -145,8 +107,9 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // QUERY_TYPE
return QUERY_TYPE;
case 2: // QUERY_SOURCE
@@ -181,6 +144,8 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return HAVING_FILTER_SUB_QUERY_MAP;
case 17: // PINOT_QUERY
return PINOT_QUERY;
+ case 18: // ORDER_BY
+ return ORDER_BY;
default:
return null;
}
@@ -192,23 +157,22 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -217,7 +181,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -225,77 +189,53 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
// isset id assignments
private static final int __ENABLETRACE_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] =
- {_Fields.QUERY_TYPE, _Fields.QUERY_SOURCE, _Fields.TIME_INTERVAL, _Fields.DURATION, _Fields.FILTER_QUERY, _Fields.AGGREGATIONS_INFO, _Fields.GROUP_BY, _Fields.SELECTIONS, _Fields.FILTER_SUB_QUERY_MAP, _Fields.BUCKET_HASH_KEY, _Fields.ENABLE_TRACE, _Fields.RESPONSE_FORMAT, _Fields.DEBUG_OPTIONS, _Fields.QUERY_OPTIONS, _Fields.HAVING_FILTER_QUERY, _Fields.HAVING_FILTER_SUB_QUERY_MAP, _Fields.PINOT_QUERY};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ private static final _Fields optionals[] = {_Fields.QUERY_TYPE,_Fields.QUERY_SOURCE,_Fields.TIME_INTERVAL,_Fields.DURATION,_Fields.FILTER_QUERY,_Fields.AGGREGATIONS_INFO,_Fields.GROUP_BY,_Fields.SELECTIONS,_Fields.FILTER_SUB_QUERY_MAP,_Fields.BUCKET_HASH_KEY,_Fields.ENABLE_TRACE,_Fields.RESPONSE_FORMAT,_Fields.DEBUG_OPTIONS,_Fields.QUERY_OPTIONS,_Fields.HAVING_FILTER_QUERY,_Fields.HAVING_FILTER_SUB_QUERY_MAP,_Fields.PINOT_QUERY,_Fields.ORDER_BY};
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.QUERY_TYPE,
- new org.apache.thrift.meta_data.FieldMetaData("queryType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QueryType.class)));
- tmpMap.put(_Fields.QUERY_SOURCE,
- new org.apache.thrift.meta_data.FieldMetaData("querySource", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
- QuerySource.class)));
- tmpMap.put(_Fields.TIME_INTERVAL,
- new org.apache.thrift.meta_data.FieldMetaData("timeInterval", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DURATION,
- new org.apache.thrift.meta_data.FieldMetaData("duration", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.FILTER_QUERY,
- new org.apache.thrift.meta_data.FieldMetaData("filterQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
- FilterQuery.class)));
- tmpMap.put(_Fields.AGGREGATIONS_INFO, new org.apache.thrift.meta_data.FieldMetaData("aggregationsInfo",
- org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
- AggregationInfo.class))));
- tmpMap.put(_Fields.GROUP_BY,
- new org.apache.thrift.meta_data.FieldMetaData("groupBy", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GroupBy.class)));
- tmpMap.put(_Fields.SELECTIONS,
- new org.apache.thrift.meta_data.FieldMetaData("selections", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Selection.class)));
- tmpMap.put(_Fields.FILTER_SUB_QUERY_MAP, new org.apache.thrift.meta_data.FieldMetaData("filterSubQueryMap",
- org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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.QUERY_TYPE, new org.apache.thrift.meta_data.FieldMetaData("queryType", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QueryType.class)));
+ tmpMap.put(_Fields.QUERY_SOURCE, new org.apache.thrift.meta_data.FieldMetaData("querySource", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, QuerySource.class)));
+ tmpMap.put(_Fields.TIME_INTERVAL, new org.apache.thrift.meta_data.FieldMetaData("timeInterval", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DURATION, new org.apache.thrift.meta_data.FieldMetaData("duration", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.FILTER_QUERY, new org.apache.thrift.meta_data.FieldMetaData("filterQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FilterQuery.class)));
+ tmpMap.put(_Fields.AGGREGATIONS_INFO, new org.apache.thrift.meta_data.FieldMetaData("aggregationsInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, AggregationInfo.class))));
+ tmpMap.put(_Fields.GROUP_BY, new org.apache.thrift.meta_data.FieldMetaData("groupBy", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, GroupBy.class)));
+ tmpMap.put(_Fields.SELECTIONS, new org.apache.thrift.meta_data.FieldMetaData("selections", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Selection.class)));
+ tmpMap.put(_Fields.FILTER_SUB_QUERY_MAP, new org.apache.thrift.meta_data.FieldMetaData("filterSubQueryMap", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FilterQueryMap.class)));
- tmpMap.put(_Fields.BUCKET_HASH_KEY,
- new org.apache.thrift.meta_data.FieldMetaData("bucketHashKey", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.ENABLE_TRACE,
- new org.apache.thrift.meta_data.FieldMetaData("enableTrace", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.RESPONSE_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("responseFormat",
- org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.BUCKET_HASH_KEY, new org.apache.thrift.meta_data.FieldMetaData("bucketHashKey", org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.DEBUG_OPTIONS,
- new org.apache.thrift.meta_data.FieldMetaData("debugOptions", 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.QUERY_OPTIONS,
- new org.apache.thrift.meta_data.FieldMetaData("queryOptions", 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.HAVING_FILTER_QUERY, new org.apache.thrift.meta_data.FieldMetaData("havingFilterQuery",
- org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
- HavingFilterQuery.class)));
- tmpMap.put(_Fields.HAVING_FILTER_SUB_QUERY_MAP,
- new org.apache.thrift.meta_data.FieldMetaData("havingFilterSubQueryMap",
- org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
- HavingFilterQueryMap.class)));
- tmpMap.put(_Fields.PINOT_QUERY,
- new org.apache.thrift.meta_data.FieldMetaData("pinotQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
- org.apache.pinot.common.request.PinotQuery.class)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ tmpMap.put(_Fields.ENABLE_TRACE, new org.apache.thrift.meta_data.FieldMetaData("enableTrace", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.RESPONSE_FORMAT, new org.apache.thrift.meta_data.FieldMetaData("responseFormat", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.DEBUG_OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("debugOptions", 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.QUERY_OPTIONS, new org.apache.thrift.meta_data.FieldMetaData("queryOptions", 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.HAVING_FILTER_QUERY, new org.apache.thrift.meta_data.FieldMetaData("havingFilterQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HavingFilterQuery.class)));
+ tmpMap.put(_Fields.HAVING_FILTER_SUB_QUERY_MAP, new org.apache.thrift.meta_data.FieldMetaData("havingFilterSubQueryMap", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HavingFilterQueryMap.class)));
+ tmpMap.put(_Fields.PINOT_QUERY, new org.apache.thrift.meta_data.FieldMetaData("pinotQuery", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, org.apache.pinot.common.request.PinotQuery.class)));
+ tmpMap.put(_Fields.ORDER_BY, new org.apache.thrift.meta_data.FieldMetaData("orderBy", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, SelectionSort.class))));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BrokerRequest.class, metaDataMap);
}
@@ -323,7 +263,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
this.filterQuery = new FilterQuery(other.filterQuery);
}
if (other.isSetAggregationsInfo()) {
- List<AggregationInfo> __this__aggregationsInfo = new ArrayList<AggregationInfo>(other.aggregationsInfo.size());
+ java.util.List<AggregationInfo> __this__aggregationsInfo = new java.util.ArrayList<AggregationInfo>(other.aggregationsInfo.size());
for (AggregationInfo other_element : other.aggregationsInfo) {
__this__aggregationsInfo.add(new AggregationInfo(other_element));
}
@@ -346,11 +286,11 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
this.responseFormat = other.responseFormat;
}
if (other.isSetDebugOptions()) {
- Map<String, String> __this__debugOptions = new HashMap<String, String>(other.debugOptions);
+ java.util.Map<java.lang.String,java.lang.String> __this__debugOptions = new java.util.HashMap<java.lang.String,java.lang.String>(other.debugOptions);
this.debugOptions = __this__debugOptions;
}
if (other.isSetQueryOptions()) {
- Map<String, String> __this__queryOptions = new HashMap<String, String>(other.queryOptions);
+ java.util.Map<java.lang.String,java.lang.String> __this__queryOptions = new java.util.HashMap<java.lang.String,java.lang.String>(other.queryOptions);
this.queryOptions = __this__queryOptions;
}
if (other.isSetHavingFilterQuery()) {
@@ -362,6 +302,13 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (other.isSetPinotQuery()) {
this.pinotQuery = new org.apache.pinot.common.request.PinotQuery(other.pinotQuery);
}
+ if (other.isSetOrderBy()) {
+ java.util.List<SelectionSort> __this__orderBy = new java.util.ArrayList<SelectionSort>(other.orderBy.size());
+ for (SelectionSort other_element : other.orderBy) {
+ __this__orderBy.add(new SelectionSort(other_element));
+ }
+ this.orderBy = __this__orderBy;
+ }
}
public BrokerRequest deepCopy() {
@@ -388,14 +335,17 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
this.havingFilterQuery = null;
this.havingFilterSubQueryMap = null;
this.pinotQuery = null;
+ this.orderBy = null;
}
+ @org.apache.thrift.annotation.Nullable
public QueryType getQueryType() {
return this.queryType;
}
- public void setQueryType(QueryType queryType) {
+ public BrokerRequest setQueryType(@org.apache.thrift.annotation.Nullable QueryType queryType) {
this.queryType = queryType;
+ return this;
}
public void unsetQueryType() {
@@ -413,12 +363,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
+ @org.apache.thrift.annotation.Nullable
public QuerySource getQuerySource() {
return this.querySource;
}
- public void setQuerySource(QuerySource querySource) {
+ public BrokerRequest setQuerySource(@org.apache.thrift.annotation.Nullable QuerySource querySource) {
this.querySource = querySource;
+ return this;
}
public void unsetQuerySource() {
@@ -436,12 +388,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
- public String getTimeInterval() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getTimeInterval() {
return this.timeInterval;
}
- public void setTimeInterval(String timeInterval) {
+ public BrokerRequest setTimeInterval(@org.apache.thrift.annotation.Nullable java.lang.String timeInterval) {
this.timeInterval = timeInterval;
+ return this;
}
public void unsetTimeInterval() {
@@ -459,12 +413,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
- public String getDuration() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getDuration() {
return this.duration;
}
- public void setDuration(String duration) {
+ public BrokerRequest setDuration(@org.apache.thrift.annotation.Nullable java.lang.String duration) {
this.duration = duration;
+ return this;
}
public void unsetDuration() {
@@ -482,12 +438,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
+ @org.apache.thrift.annotation.Nullable
public FilterQuery getFilterQuery() {
return this.filterQuery;
}
- public void setFilterQuery(FilterQuery filterQuery) {
+ public BrokerRequest setFilterQuery(@org.apache.thrift.annotation.Nullable FilterQuery filterQuery) {
this.filterQuery = filterQuery;
+ return this;
}
public void unsetFilterQuery() {
@@ -509,23 +467,26 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return (this.aggregationsInfo == null) ? 0 : this.aggregationsInfo.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<AggregationInfo> getAggregationsInfoIterator() {
return (this.aggregationsInfo == null) ? null : this.aggregationsInfo.iterator();
}
public void addToAggregationsInfo(AggregationInfo elem) {
if (this.aggregationsInfo == null) {
- this.aggregationsInfo = new ArrayList<AggregationInfo>();
+ this.aggregationsInfo = new java.util.ArrayList<AggregationInfo>();
}
this.aggregationsInfo.add(elem);
}
- public List<AggregationInfo> getAggregationsInfo() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<AggregationInfo> getAggregationsInfo() {
return this.aggregationsInfo;
}
- public void setAggregationsInfo(List<AggregationInfo> aggregationsInfo) {
+ public BrokerRequest setAggregationsInfo(@org.apache.thrift.annotation.Nullable java.util.List<AggregationInfo> aggregationsInfo) {
this.aggregationsInfo = aggregationsInfo;
+ return this;
}
public void unsetAggregationsInfo() {
@@ -543,12 +504,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
+ @org.apache.thrift.annotation.Nullable
public GroupBy getGroupBy() {
return this.groupBy;
}
- public void setGroupBy(GroupBy groupBy) {
+ public BrokerRequest setGroupBy(@org.apache.thrift.annotation.Nullable GroupBy groupBy) {
this.groupBy = groupBy;
+ return this;
}
public void unsetGroupBy() {
@@ -566,12 +529,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
+ @org.apache.thrift.annotation.Nullable
public Selection getSelections() {
return this.selections;
}
- public void setSelections(Selection selections) {
+ public BrokerRequest setSelections(@org.apache.thrift.annotation.Nullable Selection selections) {
this.selections = selections;
+ return this;
}
public void unsetSelections() {
@@ -589,12 +554,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
+ @org.apache.thrift.annotation.Nullable
public FilterQueryMap getFilterSubQueryMap() {
return this.filterSubQueryMap;
}
- public void setFilterSubQueryMap(FilterQueryMap filterSubQueryMap) {
+ public BrokerRequest setFilterSubQueryMap(@org.apache.thrift.annotation.Nullable FilterQueryMap filterSubQueryMap) {
this.filterSubQueryMap = filterSubQueryMap;
+ return this;
}
public void unsetFilterSubQueryMap() {
@@ -612,12 +579,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
- public String getBucketHashKey() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getBucketHashKey() {
return this.bucketHashKey;
}
- public void setBucketHashKey(String bucketHashKey) {
+ public BrokerRequest setBucketHashKey(@org.apache.thrift.annotation.Nullable java.lang.String bucketHashKey) {
this.bucketHashKey = bucketHashKey;
+ return this;
}
public void unsetBucketHashKey() {
@@ -639,30 +608,33 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return this.enableTrace;
}
- public void setEnableTrace(boolean enableTrace) {
+ public BrokerRequest setEnableTrace(boolean enableTrace) {
this.enableTrace = enableTrace;
setEnableTraceIsSet(true);
+ return this;
}
public void unsetEnableTrace() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ENABLETRACE_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ENABLETRACE_ISSET_ID);
}
/** Returns true if field enableTrace is set (has been assigned a value) and false otherwise */
public boolean isSetEnableTrace() {
- return EncodingUtils.testBit(__isset_bitfield, __ENABLETRACE_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ENABLETRACE_ISSET_ID);
}
public void setEnableTraceIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ENABLETRACE_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ENABLETRACE_ISSET_ID, value);
}
- public String getResponseFormat() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getResponseFormat() {
return this.responseFormat;
}
- public void setResponseFormat(String responseFormat) {
+ public BrokerRequest setResponseFormat(@org.apache.thrift.annotation.Nullable java.lang.String responseFormat) {
this.responseFormat = responseFormat;
+ return this;
}
public void unsetResponseFormat() {
@@ -684,19 +656,21 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return (this.debugOptions == null) ? 0 : this.debugOptions.size();
}
- public void putToDebugOptions(String key, String val) {
+ public void putToDebugOptions(java.lang.String key, java.lang.String val) {
if (this.debugOptions == null) {
- this.debugOptions = new HashMap<String, String>();
+ this.debugOptions = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.debugOptions.put(key, val);
}
- public Map<String, String> getDebugOptions() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.String,java.lang.String> getDebugOptions() {
return this.debugOptions;
}
- public void setDebugOptions(Map<String, String> debugOptions) {
+ public BrokerRequest setDebugOptions(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> debugOptions) {
this.debugOptions = debugOptions;
+ return this;
}
public void unsetDebugOptions() {
@@ -718,19 +692,21 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return (this.queryOptions == null) ? 0 : this.queryOptions.size();
}
- public void putToQueryOptions(String key, String val) {
+ public void putToQueryOptions(java.lang.String key, java.lang.String val) {
if (this.queryOptions == null) {
- this.queryOptions = new HashMap<String, String>();
+ this.queryOptions = new java.util.HashMap<java.lang.String,java.lang.String>();
}
this.queryOptions.put(key, val);
}
- public Map<String, String> getQueryOptions() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.String,java.lang.String> getQueryOptions() {
return this.queryOptions;
}
- public void setQueryOptions(Map<String, String> queryOptions) {
+ public BrokerRequest setQueryOptions(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.String,java.lang.String> queryOptions) {
this.queryOptions = queryOptions;
+ return this;
}
public void unsetQueryOptions() {
@@ -748,12 +724,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
+ @org.apache.thrift.annotation.Nullable
public HavingFilterQuery getHavingFilterQuery() {
return this.havingFilterQuery;
}
- public void setHavingFilterQuery(HavingFilterQuery havingFilterQuery) {
+ public BrokerRequest setHavingFilterQuery(@org.apache.thrift.annotation.Nullable HavingFilterQuery havingFilterQuery) {
this.havingFilterQuery = havingFilterQuery;
+ return this;
}
public void unsetHavingFilterQuery() {
@@ -771,12 +749,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
+ @org.apache.thrift.annotation.Nullable
public HavingFilterQueryMap getHavingFilterSubQueryMap() {
return this.havingFilterSubQueryMap;
}
- public void setHavingFilterSubQueryMap(HavingFilterQueryMap havingFilterSubQueryMap) {
+ public BrokerRequest setHavingFilterSubQueryMap(@org.apache.thrift.annotation.Nullable HavingFilterQueryMap havingFilterSubQueryMap) {
this.havingFilterSubQueryMap = havingFilterSubQueryMap;
+ return this;
}
public void unsetHavingFilterSubQueryMap() {
@@ -794,12 +774,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
+ @org.apache.thrift.annotation.Nullable
public org.apache.pinot.common.request.PinotQuery getPinotQuery() {
return this.pinotQuery;
}
- public void setPinotQuery(org.apache.pinot.common.request.PinotQuery pinotQuery) {
+ public BrokerRequest setPinotQuery(@org.apache.thrift.annotation.Nullable org.apache.pinot.common.request.PinotQuery pinotQuery) {
this.pinotQuery = pinotQuery;
+ return this;
}
public void unsetPinotQuery() {
@@ -817,448 +799,479 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public int getOrderBySize() {
+ return (this.orderBy == null) ? 0 : this.orderBy.size();
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<SelectionSort> getOrderByIterator() {
+ return (this.orderBy == null) ? null : this.orderBy.iterator();
+ }
+
+ public void addToOrderBy(SelectionSort elem) {
+ if (this.orderBy == null) {
+ this.orderBy = new java.util.ArrayList<SelectionSort>();
+ }
+ this.orderBy.add(elem);
+ }
+
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<SelectionSort> getOrderBy() {
+ return this.orderBy;
+ }
+
+ public BrokerRequest setOrderBy(@org.apache.thrift.annotation.Nullable java.util.List<SelectionSort> orderBy) {
+ this.orderBy = orderBy;
+ return this;
+ }
+
+ public void unsetOrderBy() {
+ this.orderBy = null;
+ }
+
+ /** Returns true if field orderBy is set (has been assigned a value) and false otherwise */
+ public boolean isSetOrderBy() {
+ return this.orderBy != null;
+ }
+
+ public void setOrderByIsSet(boolean value) {
+ if (!value) {
+ this.orderBy = null;
+ }
+ }
+
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case QUERY_TYPE:
- if (value == null) {
- unsetQueryType();
- } else {
- setQueryType((QueryType) value);
- }
- break;
+ case QUERY_TYPE:
+ if (value == null) {
+ unsetQueryType();
+ } else {
+ setQueryType((QueryType)value);
+ }
+ break;
- case QUERY_SOURCE:
- if (value == null) {
- unsetQuerySource();
- } else {
- setQuerySource((QuerySource) value);
- }
- break;
+ case QUERY_SOURCE:
+ if (value == null) {
+ unsetQuerySource();
+ } else {
+ setQuerySource((QuerySource)value);
+ }
+ break;
- case TIME_INTERVAL:
- if (value == null) {
- unsetTimeInterval();
- } else {
- setTimeInterval((String) value);
- }
- break;
+ case TIME_INTERVAL:
+ if (value == null) {
+ unsetTimeInterval();
+ } else {
+ setTimeInterval((java.lang.String)value);
+ }
+ break;
- case DURATION:
- if (value == null) {
- unsetDuration();
- } else {
- setDuration((String) value);
- }
- break;
+ case DURATION:
+ if (value == null) {
+ unsetDuration();
+ } else {
+ setDuration((java.lang.String)value);
+ }
+ break;
- case FILTER_QUERY:
- if (value == null) {
- unsetFilterQuery();
- } else {
- setFilterQuery((FilterQuery) value);
- }
- break;
+ case FILTER_QUERY:
+ if (value == null) {
+ unsetFilterQuery();
+ } else {
+ setFilterQuery((FilterQuery)value);
+ }
+ break;
- case AGGREGATIONS_INFO:
- if (value == null) {
- unsetAggregationsInfo();
- } else {
- setAggregationsInfo((List<AggregationInfo>) value);
- }
- break;
+ case AGGREGATIONS_INFO:
+ if (value == null) {
+ unsetAggregationsInfo();
+ } else {
+ setAggregationsInfo((java.util.List<AggregationInfo>)value);
+ }
+ break;
- case GROUP_BY:
- if (value == null) {
- unsetGroupBy();
- } else {
- setGroupBy((GroupBy) value);
- }
- break;
+ case GROUP_BY:
+ if (value == null) {
+ unsetGroupBy();
+ } else {
+ setGroupBy((GroupBy)value);
+ }
+ break;
- case SELECTIONS:
- if (value == null) {
- unsetSelections();
- } else {
- setSelections((Selection) value);
- }
- break;
+ case SELECTIONS:
+ if (value == null) {
+ unsetSelections();
+ } else {
+ setSelections((Selection)value);
+ }
+ break;
- case FILTER_SUB_QUERY_MAP:
- if (value == null) {
- unsetFilterSubQueryMap();
- } else {
- setFilterSubQueryMap((FilterQueryMap) value);
- }
- break;
+ case FILTER_SUB_QUERY_MAP:
+ if (value == null) {
+ unsetFilterSubQueryMap();
+ } else {
+ setFilterSubQueryMap((FilterQueryMap)value);
+ }
+ break;
- case BUCKET_HASH_KEY:
- if (value == null) {
- unsetBucketHashKey();
- } else {
- setBucketHashKey((String) value);
- }
- break;
+ case BUCKET_HASH_KEY:
+ if (value == null) {
+ unsetBucketHashKey();
+ } else {
+ setBucketHashKey((java.lang.String)value);
+ }
+ break;
- case ENABLE_TRACE:
- if (value == null) {
- unsetEnableTrace();
- } else {
- setEnableTrace((Boolean) value);
- }
- break;
+ case ENABLE_TRACE:
+ if (value == null) {
+ unsetEnableTrace();
+ } else {
+ setEnableTrace((java.lang.Boolean)value);
+ }
+ break;
- case RESPONSE_FORMAT:
- if (value == null) {
- unsetResponseFormat();
- } else {
- setResponseFormat((String) value);
- }
- break;
+ case RESPONSE_FORMAT:
+ if (value == null) {
+ unsetResponseFormat();
+ } else {
+ setResponseFormat((java.lang.String)value);
+ }
+ break;
- case DEBUG_OPTIONS:
- if (value == null) {
- unsetDebugOptions();
- } else {
- setDebugOptions((Map<String, String>) value);
- }
- break;
+ case DEBUG_OPTIONS:
+ if (value == null) {
+ unsetDebugOptions();
+ } else {
+ setDebugOptions((java.util.Map<java.lang.String,java.lang.String>)value);
+ }
+ break;
- case QUERY_OPTIONS:
- if (value == null) {
- unsetQueryOptions();
- } else {
- setQueryOptions((Map<String, String>) value);
- }
- break;
+ case QUERY_OPTIONS:
+ if (value == null) {
+ unsetQueryOptions();
+ } else {
+ setQueryOptions((java.util.Map<java.lang.String,java.lang.String>)value);
+ }
+ break;
- case HAVING_FILTER_QUERY:
- if (value == null) {
- unsetHavingFilterQuery();
- } else {
- setHavingFilterQuery((HavingFilterQuery) value);
- }
- break;
+ case HAVING_FILTER_QUERY:
+ if (value == null) {
+ unsetHavingFilterQuery();
+ } else {
+ setHavingFilterQuery((HavingFilterQuery)value);
+ }
+ break;
- case HAVING_FILTER_SUB_QUERY_MAP:
- if (value == null) {
- unsetHavingFilterSubQueryMap();
- } else {
- setHavingFilterSubQueryMap((HavingFilterQueryMap) value);
- }
- break;
+ case HAVING_FILTER_SUB_QUERY_MAP:
+ if (value == null) {
+ unsetHavingFilterSubQueryMap();
+ } else {
+ setHavingFilterSubQueryMap((HavingFilterQueryMap)value);
+ }
+ break;
+
+ case PINOT_QUERY:
+ if (value == null) {
+ unsetPinotQuery();
+ } else {
+ setPinotQuery((org.apache.pinot.common.request.PinotQuery)value);
+ }
+ break;
+
+ case ORDER_BY:
+ if (value == null) {
+ unsetOrderBy();
+ } else {
+ setOrderBy((java.util.List<SelectionSort>)value);
+ }
+ break;
- case PINOT_QUERY:
- if (value == null) {
- unsetPinotQuery();
- } else {
- setPinotQuery((org.apache.pinot.common.request.PinotQuery) value);
- }
- break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case QUERY_TYPE:
- return getQueryType();
+ case QUERY_TYPE:
+ return getQueryType();
+
+ case QUERY_SOURCE:
+ return getQuerySource();
+
+ case TIME_INTERVAL:
+ return getTimeInterval();
- case QUERY_SOURCE:
- return getQuerySource();
+ case DURATION:
+ return getDuration();
- case TIME_INTERVAL:
- return getTimeInterval();
+ case FILTER_QUERY:
+ return getFilterQuery();
- case DURATION:
- return getDuration();
+ case AGGREGATIONS_INFO:
+ return getAggregationsInfo();
- case FILTER_QUERY:
- return getFilterQuery();
+ case GROUP_BY:
+ return getGroupBy();
- case AGGREGATIONS_INFO:
- return getAggregationsInfo();
+ case SELECTIONS:
+ return getSelections();
- case GROUP_BY:
- return getGroupBy();
+ case FILTER_SUB_QUERY_MAP:
+ return getFilterSubQueryMap();
- case SELECTIONS:
- return getSelections();
+ case BUCKET_HASH_KEY:
+ return getBucketHashKey();
- case FILTER_SUB_QUERY_MAP:
- return getFilterSubQueryMap();
+ case ENABLE_TRACE:
+ return isEnableTrace();
- case BUCKET_HASH_KEY:
- return getBucketHashKey();
+ case RESPONSE_FORMAT:
+ return getResponseFormat();
- case ENABLE_TRACE:
- return isEnableTrace();
+ case DEBUG_OPTIONS:
+ return getDebugOptions();
- case RESPONSE_FORMAT:
- return getResponseFormat();
+ case QUERY_OPTIONS:
+ return getQueryOptions();
- case DEBUG_OPTIONS:
- return getDebugOptions();
+ case HAVING_FILTER_QUERY:
+ return getHavingFilterQuery();
- case QUERY_OPTIONS:
- return getQueryOptions();
+ case HAVING_FILTER_SUB_QUERY_MAP:
+ return getHavingFilterSubQueryMap();
- case HAVING_FILTER_QUERY:
- return getHavingFilterQuery();
+ case PINOT_QUERY:
+ return getPinotQuery();
- case HAVING_FILTER_SUB_QUERY_MAP:
- return getHavingFilterSubQueryMap();
+ case ORDER_BY:
+ return getOrderBy();
- case PINOT_QUERY:
- return getPinotQuery();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case QUERY_TYPE:
- return isSetQueryType();
- case QUERY_SOURCE:
- return isSetQuerySource();
- case TIME_INTERVAL:
- return isSetTimeInterval();
- case DURATION:
- return isSetDuration();
- case FILTER_QUERY:
- return isSetFilterQuery();
- case AGGREGATIONS_INFO:
- return isSetAggregationsInfo();
- case GROUP_BY:
- return isSetGroupBy();
- case SELECTIONS:
- return isSetSelections();
- case FILTER_SUB_QUERY_MAP:
- return isSetFilterSubQueryMap();
- case BUCKET_HASH_KEY:
- return isSetBucketHashKey();
- case ENABLE_TRACE:
- return isSetEnableTrace();
- case RESPONSE_FORMAT:
- return isSetResponseFormat();
- case DEBUG_OPTIONS:
- return isSetDebugOptions();
- case QUERY_OPTIONS:
- return isSetQueryOptions();
- case HAVING_FILTER_QUERY:
- return isSetHavingFilterQuery();
- case HAVING_FILTER_SUB_QUERY_MAP:
- return isSetHavingFilterSubQueryMap();
- case PINOT_QUERY:
- return isSetPinotQuery();
- }
- throw new IllegalStateException();
+ case QUERY_TYPE:
+ return isSetQueryType();
+ case QUERY_SOURCE:
+ return isSetQuerySource();
+ case TIME_INTERVAL:
+ return isSetTimeInterval();
+ case DURATION:
+ return isSetDuration();
+ case FILTER_QUERY:
+ return isSetFilterQuery();
+ case AGGREGATIONS_INFO:
+ return isSetAggregationsInfo();
+ case GROUP_BY:
+ return isSetGroupBy();
+ case SELECTIONS:
+ return isSetSelections();
+ case FILTER_SUB_QUERY_MAP:
+ return isSetFilterSubQueryMap();
+ case BUCKET_HASH_KEY:
+ return isSetBucketHashKey();
+ case ENABLE_TRACE:
+ return isSetEnableTrace();
+ case RESPONSE_FORMAT:
+ return isSetResponseFormat();
+ case DEBUG_OPTIONS:
+ return isSetDebugOptions();
+ case QUERY_OPTIONS:
+ return isSetQueryOptions();
+ case HAVING_FILTER_QUERY:
+ return isSetHavingFilterQuery();
+ case HAVING_FILTER_SUB_QUERY_MAP:
+ return isSetHavingFilterSubQueryMap();
+ case PINOT_QUERY:
+ return isSetPinotQuery();
+ case ORDER_BY:
+ return isSetOrderBy();
+ }
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof BrokerRequest) {
- return this.equals((BrokerRequest) that);
- }
+ if (that instanceof BrokerRequest)
+ return this.equals((BrokerRequest)that);
return false;
}
public boolean equals(BrokerRequest that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_queryType = true && this.isSetQueryType();
boolean that_present_queryType = true && that.isSetQueryType();
if (this_present_queryType || that_present_queryType) {
- if (!(this_present_queryType && that_present_queryType)) {
+ if (!(this_present_queryType && that_present_queryType))
return false;
- }
- if (!this.queryType.equals(that.queryType)) {
+ if (!this.queryType.equals(that.queryType))
return false;
- }
}
boolean this_present_querySource = true && this.isSetQuerySource();
boolean that_present_querySource = true && that.isSetQuerySource();
if (this_present_querySource || that_present_querySource) {
- if (!(this_present_querySource && that_present_querySource)) {
+ if (!(this_present_querySource && that_present_querySource))
return false;
- }
- if (!this.querySource.equals(that.querySource)) {
+ if (!this.querySource.equals(that.querySource))
return false;
- }
}
boolean this_present_timeInterval = true && this.isSetTimeInterval();
boolean that_present_timeInterval = true && that.isSetTimeInterval();
if (this_present_timeInterval || that_present_timeInterval) {
- if (!(this_present_timeInterval && that_present_timeInterval)) {
+ if (!(this_present_timeInterval && that_present_timeInterval))
return false;
- }
- if (!this.timeInterval.equals(that.timeInterval)) {
+ if (!this.timeInterval.equals(that.timeInterval))
return false;
- }
}
boolean this_present_duration = true && this.isSetDuration();
boolean that_present_duration = true && that.isSetDuration();
if (this_present_duration || that_present_duration) {
- if (!(this_present_duration && that_present_duration)) {
+ if (!(this_present_duration && that_present_duration))
return false;
- }
- if (!this.duration.equals(that.duration)) {
+ if (!this.duration.equals(that.duration))
return false;
- }
}
boolean this_present_filterQuery = true && this.isSetFilterQuery();
boolean that_present_filterQuery = true && that.isSetFilterQuery();
if (this_present_filterQuery || that_present_filterQuery) {
- if (!(this_present_filterQuery && that_present_filterQuery)) {
+ if (!(this_present_filterQuery && that_present_filterQuery))
return false;
- }
- if (!this.filterQuery.equals(that.filterQuery)) {
+ if (!this.filterQuery.equals(that.filterQuery))
return false;
- }
}
boolean this_present_aggregationsInfo = true && this.isSetAggregationsInfo();
boolean that_present_aggregationsInfo = true && that.isSetAggregationsInfo();
if (this_present_aggregationsInfo || that_present_aggregationsInfo) {
- if (!(this_present_aggregationsInfo && that_present_aggregationsInfo)) {
+ if (!(this_present_aggregationsInfo && that_present_aggregationsInfo))
return false;
- }
- if (!this.aggregationsInfo.equals(that.aggregationsInfo)) {
+ if (!this.aggregationsInfo.equals(that.aggregationsInfo))
return false;
- }
}
boolean this_present_groupBy = true && this.isSetGroupBy();
boolean that_present_groupBy = true && that.isSetGroupBy();
if (this_present_groupBy || that_present_groupBy) {
- if (!(this_present_groupBy && that_present_groupBy)) {
+ if (!(this_present_groupBy && that_present_groupBy))
return false;
- }
- if (!this.groupBy.equals(that.groupBy)) {
+ if (!this.groupBy.equals(that.groupBy))
return false;
- }
}
boolean this_present_selections = true && this.isSetSelections();
boolean that_present_selections = true && that.isSetSelections();
if (this_present_selections || that_present_selections) {
- if (!(this_present_selections && that_present_selections)) {
+ if (!(this_present_selections && that_present_selections))
return false;
- }
- if (!this.selections.equals(that.selections)) {
+ if (!this.selections.equals(that.selections))
return false;
- }
}
boolean this_present_filterSubQueryMap = true && this.isSetFilterSubQueryMap();
boolean that_present_filterSubQueryMap = true && that.isSetFilterSubQueryMap();
if (this_present_filterSubQueryMap || that_present_filterSubQueryMap) {
- if (!(this_present_filterSubQueryMap && that_present_filterSubQueryMap)) {
+ if (!(this_present_filterSubQueryMap && that_present_filterSubQueryMap))
return false;
- }
- if (!this.filterSubQueryMap.equals(that.filterSubQueryMap)) {
+ if (!this.filterSubQueryMap.equals(that.filterSubQueryMap))
return false;
- }
}
boolean this_present_bucketHashKey = true && this.isSetBucketHashKey();
boolean that_present_bucketHashKey = true && that.isSetBucketHashKey();
if (this_present_bucketHashKey || that_present_bucketHashKey) {
- if (!(this_present_bucketHashKey && that_present_bucketHashKey)) {
+ if (!(this_present_bucketHashKey && that_present_bucketHashKey))
return false;
- }
- if (!this.bucketHashKey.equals(that.bucketHashKey)) {
+ if (!this.bucketHashKey.equals(that.bucketHashKey))
return false;
- }
}
boolean this_present_enableTrace = true && this.isSetEnableTrace();
boolean that_present_enableTrace = true && that.isSetEnableTrace();
if (this_present_enableTrace || that_present_enableTrace) {
- if (!(this_present_enableTrace && that_present_enableTrace)) {
+ if (!(this_present_enableTrace && that_present_enableTrace))
return false;
- }
- if (this.enableTrace != that.enableTrace) {
+ if (this.enableTrace != that.enableTrace)
return false;
- }
}
boolean this_present_responseFormat = true && this.isSetResponseFormat();
boolean that_present_responseFormat = true && that.isSetResponseFormat();
if (this_present_responseFormat || that_present_responseFormat) {
- if (!(this_present_responseFormat && that_present_responseFormat)) {
+ if (!(this_present_responseFormat && that_present_responseFormat))
return false;
- }
- if (!this.responseFormat.equals(that.responseFormat)) {
+ if (!this.responseFormat.equals(that.responseFormat))
return false;
- }
}
boolean this_present_debugOptions = true && this.isSetDebugOptions();
boolean that_present_debugOptions = true && that.isSetDebugOptions();
if (this_present_debugOptions || that_present_debugOptions) {
- if (!(this_present_debugOptions && that_present_debugOptions)) {
+ if (!(this_present_debugOptions && that_present_debugOptions))
return false;
- }
- if (!this.debugOptions.equals(that.debugOptions)) {
+ if (!this.debugOptions.equals(that.debugOptions))
return false;
- }
}
boolean this_present_queryOptions = true && this.isSetQueryOptions();
boolean that_present_queryOptions = true && that.isSetQueryOptions();
if (this_present_queryOptions || that_present_queryOptions) {
- if (!(this_present_queryOptions && that_present_queryOptions)) {
+ if (!(this_present_queryOptions && that_present_queryOptions))
return false;
- }
- if (!this.queryOptions.equals(that.queryOptions)) {
+ if (!this.queryOptions.equals(that.queryOptions))
return false;
- }
}
boolean this_present_havingFilterQuery = true && this.isSetHavingFilterQuery();
boolean that_present_havingFilterQuery = true && that.isSetHavingFilterQuery();
if (this_present_havingFilterQuery || that_present_havingFilterQuery) {
- if (!(this_present_havingFilterQuery && that_present_havingFilterQuery)) {
+ if (!(this_present_havingFilterQuery && that_present_havingFilterQuery))
return false;
- }
- if (!this.havingFilterQuery.equals(that.havingFilterQuery)) {
+ if (!this.havingFilterQuery.equals(that.havingFilterQuery))
return false;
- }
}
boolean this_present_havingFilterSubQueryMap = true && this.isSetHavingFilterSubQueryMap();
boolean that_present_havingFilterSubQueryMap = true && that.isSetHavingFilterSubQueryMap();
if (this_present_havingFilterSubQueryMap || that_present_havingFilterSubQueryMap) {
- if (!(this_present_havingFilterSubQueryMap && that_present_havingFilterSubQueryMap)) {
+ if (!(this_present_havingFilterSubQueryMap && that_present_havingFilterSubQueryMap))
return false;
- }
- if (!this.havingFilterSubQueryMap.equals(that.havingFilterSubQueryMap)) {
+ if (!this.havingFilterSubQueryMap.equals(that.havingFilterSubQueryMap))
return false;
- }
}
boolean this_present_pinotQuery = true && this.isSetPinotQuery();
boolean that_present_pinotQuery = true && that.isSetPinotQuery();
if (this_present_pinotQuery || that_present_pinotQuery) {
- if (!(this_present_pinotQuery && that_present_pinotQuery)) {
+ if (!(this_present_pinotQuery && that_present_pinotQuery))
return false;
- }
- if (!this.pinotQuery.equals(that.pinotQuery)) {
+ if (!this.pinotQuery.equals(that.pinotQuery))
+ return false;
+ }
+
+ boolean this_present_orderBy = true && this.isSetOrderBy();
+ boolean that_present_orderBy = true && that.isSetOrderBy();
+ if (this_present_orderBy || that_present_orderBy) {
+ if (!(this_present_orderBy && that_present_orderBy))
+ return false;
+ if (!this.orderBy.equals(that.orderBy))
return false;
- }
}
return true;
@@ -1266,111 +1279,81 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_queryType = true && (isSetQueryType());
- list.add(present_queryType);
- if (present_queryType) {
- list.add(queryType);
- }
+ hashCode = hashCode * 8191 + ((isSetQueryType()) ? 131071 : 524287);
+ if (isSetQueryType())
+ hashCode = hashCode * 8191 + queryType.hashCode();
- boolean present_querySource = true && (isSetQuerySource());
- list.add(present_querySource);
- if (present_querySource) {
- list.add(querySource);
- }
+ hashCode = hashCode * 8191 + ((isSetQuerySource()) ? 131071 : 524287);
+ if (isSetQuerySource())
+ hashCode = hashCode * 8191 + querySource.hashCode();
- boolean present_timeInterval = true && (isSetTimeInterval());
- list.add(present_timeInterval);
- if (present_timeInterval) {
- list.add(timeInterval);
- }
+ hashCode = hashCode * 8191 + ((isSetTimeInterval()) ? 131071 : 524287);
+ if (isSetTimeInterval())
+ hashCode = hashCode * 8191 + timeInterval.hashCode();
- boolean present_duration = true && (isSetDuration());
- list.add(present_duration);
- if (present_duration) {
- list.add(duration);
- }
+ hashCode = hashCode * 8191 + ((isSetDuration()) ? 131071 : 524287);
+ if (isSetDuration())
+ hashCode = hashCode * 8191 + duration.hashCode();
- boolean present_filterQuery = true && (isSetFilterQuery());
- list.add(present_filterQuery);
- if (present_filterQuery) {
- list.add(filterQuery);
- }
+ hashCode = hashCode * 8191 + ((isSetFilterQuery()) ? 131071 : 524287);
+ if (isSetFilterQuery())
+ hashCode = hashCode * 8191 + filterQuery.hashCode();
- boolean present_aggregationsInfo = true && (isSetAggregationsInfo());
- list.add(present_aggregationsInfo);
- if (present_aggregationsInfo) {
- list.add(aggregationsInfo);
- }
+ hashCode = hashCode * 8191 + ((isSetAggregationsInfo()) ? 131071 : 524287);
+ if (isSetAggregationsInfo())
+ hashCode = hashCode * 8191 + aggregationsInfo.hashCode();
- boolean present_groupBy = true && (isSetGroupBy());
- list.add(present_groupBy);
- if (present_groupBy) {
- list.add(groupBy);
- }
+ hashCode = hashCode * 8191 + ((isSetGroupBy()) ? 131071 : 524287);
+ if (isSetGroupBy())
+ hashCode = hashCode * 8191 + groupBy.hashCode();
- boolean present_selections = true && (isSetSelections());
- list.add(present_selections);
- if (present_selections) {
- list.add(selections);
- }
+ hashCode = hashCode * 8191 + ((isSetSelections()) ? 131071 : 524287);
+ if (isSetSelections())
+ hashCode = hashCode * 8191 + selections.hashCode();
- boolean present_filterSubQueryMap = true && (isSetFilterSubQueryMap());
- list.add(present_filterSubQueryMap);
- if (present_filterSubQueryMap) {
- list.add(filterSubQueryMap);
- }
+ hashCode = hashCode * 8191 + ((isSetFilterSubQueryMap()) ? 131071 : 524287);
+ if (isSetFilterSubQueryMap())
+ hashCode = hashCode * 8191 + filterSubQueryMap.hashCode();
- boolean present_bucketHashKey = true && (isSetBucketHashKey());
- list.add(present_bucketHashKey);
- if (present_bucketHashKey) {
- list.add(bucketHashKey);
- }
+ hashCode = hashCode * 8191 + ((isSetBucketHashKey()) ? 131071 : 524287);
+ if (isSetBucketHashKey())
+ hashCode = hashCode * 8191 + bucketHashKey.hashCode();
- boolean present_enableTrace = true && (isSetEnableTrace());
- list.add(present_enableTrace);
- if (present_enableTrace) {
- list.add(enableTrace);
- }
+ hashCode = hashCode * 8191 + ((isSetEnableTrace()) ? 131071 : 524287);
+ if (isSetEnableTrace())
+ hashCode = hashCode * 8191 + ((enableTrace) ? 131071 : 524287);
- boolean present_responseFormat = true && (isSetResponseFormat());
- list.add(present_responseFormat);
- if (present_responseFormat) {
- list.add(responseFormat);
- }
+ hashCode = hashCode * 8191 + ((isSetResponseFormat()) ? 131071 : 524287);
+ if (isSetResponseFormat())
+ hashCode = hashCode * 8191 + responseFormat.hashCode();
- boolean present_debugOptions = true && (isSetDebugOptions());
- list.add(present_debugOptions);
- if (present_debugOptions) {
- list.add(debugOptions);
- }
+ hashCode = hashCode * 8191 + ((isSetDebugOptions()) ? 131071 : 524287);
+ if (isSetDebugOptions())
+ hashCode = hashCode * 8191 + debugOptions.hashCode();
- boolean present_queryOptions = true && (isSetQueryOptions());
- list.add(present_queryOptions);
- if (present_queryOptions) {
- list.add(queryOptions);
- }
+ hashCode = hashCode * 8191 + ((isSetQueryOptions()) ? 131071 : 524287);
+ if (isSetQueryOptions())
+ hashCode = hashCode * 8191 + queryOptions.hashCode();
- boolean present_havingFilterQuery = true && (isSetHavingFilterQuery());
- list.add(present_havingFilterQuery);
- if (present_havingFilterQuery) {
- list.add(havingFilterQuery);
- }
+ hashCode = hashCode * 8191 + ((isSetHavingFilterQuery()) ? 131071 : 524287);
+ if (isSetHavingFilterQuery())
+ hashCode = hashCode * 8191 + havingFilterQuery.hashCode();
- boolean present_havingFilterSubQueryMap = true && (isSetHavingFilterSubQueryMap());
- list.add(present_havingFilterSubQueryMap);
- if (present_havingFilterSubQueryMap) {
- list.add(havingFilterSubQueryMap);
- }
+ hashCode = hashCode * 8191 + ((isSetHavingFilterSubQueryMap()) ? 131071 : 524287);
+ if (isSetHavingFilterSubQueryMap())
+ hashCode = hashCode * 8191 + havingFilterSubQueryMap.hashCode();
- boolean present_pinotQuery = true && (isSetPinotQuery());
- list.add(present_pinotQuery);
- if (present_pinotQuery) {
- list.add(pinotQuery);
- }
+ hashCode = hashCode * 8191 + ((isSetPinotQuery()) ? 131071 : 524287);
+ if (isSetPinotQuery())
+ hashCode = hashCode * 8191 + pinotQuery.hashCode();
- return list.hashCode();
+ hashCode = hashCode * 8191 + ((isSetOrderBy()) ? 131071 : 524287);
+ if (isSetOrderBy())
+ hashCode = hashCode * 8191 + orderBy.hashCode();
+
+ return hashCode;
}
@Override
@@ -1381,7 +1364,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetQueryType()).compareTo(other.isSetQueryType());
+ lastComparison = java.lang.Boolean.valueOf(isSetQueryType()).compareTo(other.isSetQueryType());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1391,7 +1374,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQuerySource()).compareTo(other.isSetQuerySource());
+ lastComparison = java.lang.Boolean.valueOf(isSetQuerySource()).compareTo(other.isSetQuerySource());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1401,7 +1384,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTimeInterval()).compareTo(other.isSetTimeInterval());
+ lastComparison = java.lang.Boolean.valueOf(isSetTimeInterval()).compareTo(other.isSetTimeInterval());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1411,7 +1394,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDuration()).compareTo(other.isSetDuration());
+ lastComparison = java.lang.Boolean.valueOf(isSetDuration()).compareTo(other.isSetDuration());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1421,7 +1404,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFilterQuery()).compareTo(other.isSetFilterQuery());
+ lastComparison = java.lang.Boolean.valueOf(isSetFilterQuery()).compareTo(other.isSetFilterQuery());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1431,7 +1414,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAggregationsInfo()).compareTo(other.isSetAggregationsInfo());
+ lastComparison = java.lang.Boolean.valueOf(isSetAggregationsInfo()).compareTo(other.isSetAggregationsInfo());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1441,7 +1424,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetGroupBy()).compareTo(other.isSetGroupBy());
+ lastComparison = java.lang.Boolean.valueOf(isSetGroupBy()).compareTo(other.isSetGroupBy());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1451,7 +1434,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetSelections()).compareTo(other.isSetSelections());
+ lastComparison = java.lang.Boolean.valueOf(isSetSelections()).compareTo(other.isSetSelections());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1461,7 +1444,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFilterSubQueryMap()).compareTo(other.isSetFilterSubQueryMap());
+ lastComparison = java.lang.Boolean.valueOf(isSetFilterSubQueryMap()).compareTo(other.isSetFilterSubQueryMap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1471,7 +1454,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetBucketHashKey()).compareTo(other.isSetBucketHashKey());
+ lastComparison = java.lang.Boolean.valueOf(isSetBucketHashKey()).compareTo(other.isSetBucketHashKey());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1481,7 +1464,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetEnableTrace()).compareTo(other.isSetEnableTrace());
+ lastComparison = java.lang.Boolean.valueOf(isSetEnableTrace()).compareTo(other.isSetEnableTrace());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1491,7 +1474,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetResponseFormat()).compareTo(other.isSetResponseFormat());
+ lastComparison = java.lang.Boolean.valueOf(isSetResponseFormat()).compareTo(other.isSetResponseFormat());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1501,7 +1484,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetDebugOptions()).compareTo(other.isSetDebugOptions());
+ lastComparison = java.lang.Boolean.valueOf(isSetDebugOptions()).compareTo(other.isSetDebugOptions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1511,7 +1494,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetQueryOptions()).compareTo(other.isSetQueryOptions());
+ lastComparison = java.lang.Boolean.valueOf(isSetQueryOptions()).compareTo(other.isSetQueryOptions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1521,7 +1504,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHavingFilterQuery()).compareTo(other.isSetHavingFilterQuery());
+ lastComparison = java.lang.Boolean.valueOf(isSetHavingFilterQuery()).compareTo(other.isSetHavingFilterQuery());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1531,18 +1514,17 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetHavingFilterSubQueryMap()).compareTo(other.isSetHavingFilterSubQueryMap());
+ lastComparison = java.lang.Boolean.valueOf(isSetHavingFilterSubQueryMap()).compareTo(other.isSetHavingFilterSubQueryMap());
if (lastComparison != 0) {
return lastComparison;
}
if (isSetHavingFilterSubQueryMap()) {
- lastComparison =
- org.apache.thrift.TBaseHelper.compareTo(this.havingFilterSubQueryMap, other.havingFilterSubQueryMap);
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.havingFilterSubQueryMap, other.havingFilterSubQueryMap);
if (lastComparison != 0) {
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetPinotQuery()).compareTo(other.isSetPinotQuery());
+ lastComparison = java.lang.Boolean.valueOf(isSetPinotQuery()).compareTo(other.isSetPinotQuery());
if (lastComparison != 0) {
return lastComparison;
}
@@ -1552,26 +1534,35 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return lastComparison;
}
}
+ lastComparison = java.lang.Boolean.valueOf(isSetOrderBy()).compareTo(other.isSetOrderBy());
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ if (isSetOrderBy()) {
+ lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.orderBy, other.orderBy);
+ if (lastComparison != 0) {
+ return lastComparison;
+ }
+ }
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("BrokerRequest(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("BrokerRequest(");
boolean first = true;
if (isSetQueryType()) {
@@ -1584,9 +1575,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetQuerySource()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("querySource:");
if (this.querySource == null) {
sb.append("null");
@@ -1596,9 +1585,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetTimeInterval()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("timeInterval:");
if (this.timeInterval == null) {
sb.append("null");
@@ -1608,9 +1595,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetDuration()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("duration:");
if (this.duration == null) {
sb.append("null");
@@ -1620,9 +1605,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetFilterQuery()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("filterQuery:");
if (this.filterQuery == null) {
sb.append("null");
@@ -1632,9 +1615,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetAggregationsInfo()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("aggregationsInfo:");
if (this.aggregationsInfo == null) {
sb.append("null");
@@ -1644,9 +1625,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetGroupBy()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("groupBy:");
if (this.groupBy == null) {
sb.append("null");
@@ -1656,9 +1635,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetSelections()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("selections:");
if (this.selections == null) {
sb.append("null");
@@ -1668,9 +1645,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetFilterSubQueryMap()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("filterSubQueryMap:");
if (this.filterSubQueryMap == null) {
sb.append("null");
@@ -1680,9 +1655,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetBucketHashKey()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("bucketHashKey:");
if (this.bucketHashKey == null) {
sb.append("null");
@@ -1692,17 +1665,13 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetEnableTrace()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("enableTrace:");
sb.append(this.enableTrace);
first = false;
}
if (isSetResponseFormat()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("responseFormat:");
if (this.responseFormat == null) {
sb.append("null");
@@ -1712,9 +1681,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetDebugOptions()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("debugOptions:");
if (this.debugOptions == null) {
sb.append("null");
@@ -1724,9 +1691,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetQueryOptions()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("queryOptions:");
if (this.queryOptions == null) {
sb.append("null");
@@ -1736,9 +1701,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetHavingFilterQuery()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("havingFilterQuery:");
if (this.havingFilterQuery == null) {
sb.append("null");
@@ -1748,9 +1711,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetHavingFilterSubQueryMap()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("havingFilterSubQueryMap:");
if (this.havingFilterSubQueryMap == null) {
sb.append("null");
@@ -1760,9 +1721,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
first = false;
}
if (isSetPinotQuery()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("pinotQuery:");
if (this.pinotQuery == null) {
sb.append("null");
@@ -1771,12 +1730,21 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
first = false;
}
+ if (isSetOrderBy()) {
+ if (!first) sb.append(", ");
+ sb.append("orderBy:");
+ if (this.orderBy == null) {
+ sb.append("null");
+ } else {
+ sb.append(this.orderBy);
+ }
+ first = false;
+ }
sb.append(")");
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
if (queryType != null) {
@@ -1808,8 +1776,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -1817,8 +1784,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -1828,21 +1794,21 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
- private static class BrokerRequestStandardSchemeFactory implements SchemeFactory {
+ private static class BrokerRequestStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BrokerRequestStandardScheme getScheme() {
return new BrokerRequestStandardScheme();
}
}
- private static class BrokerRequestStandardScheme extends StandardScheme<BrokerRequest> {
+ private static class BrokerRequestStandardScheme extends org.apache.thrift.scheme.StandardScheme<BrokerRequest> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, BrokerRequest struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, BrokerRequest struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -1851,7 +1817,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.queryType = new QueryType();
struct.queryType.read(iprot);
struct.setQueryTypeIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1860,7 +1826,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.querySource = new QuerySource();
struct.querySource.read(iprot);
struct.setQuerySourceIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1868,7 +1834,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.timeInterval = iprot.readString();
struct.setTimeIntervalIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1876,7 +1842,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.duration = iprot.readString();
struct.setDurationIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1885,7 +1851,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.filterQuery = new FilterQuery();
struct.filterQuery.read(iprot);
struct.setFilterQueryIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1893,9 +1859,10 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list94 = iprot.readListBegin();
- struct.aggregationsInfo = new ArrayList<AggregationInfo>(_list94.size);
- AggregationInfo _elem95;
- for (int _i96 = 0; _i96 < _list94.size; ++_i96) {
+ struct.aggregationsInfo = new java.util.ArrayList<AggregationInfo>(_list94.size);
+ @org.apache.thrift.annotation.Nullable AggregationInfo _elem95;
+ for (int _i96 = 0; _i96 < _list94.size; ++_i96)
+ {
_elem95 = new AggregationInfo();
_elem95.read(iprot);
struct.aggregationsInfo.add(_elem95);
@@ -1903,7 +1870,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
iprot.readListEnd();
}
struct.setAggregationsInfoIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1912,7 +1879,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.groupBy = new GroupBy();
struct.groupBy.read(iprot);
struct.setGroupByIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1921,7 +1888,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.selections = new Selection();
struct.selections.read(iprot);
struct.setSelectionsIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1930,7 +1897,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.filterSubQueryMap = new FilterQueryMap();
struct.filterSubQueryMap.read(iprot);
struct.setFilterSubQueryMapIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1938,7 +1905,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.bucketHashKey = iprot.readString();
struct.setBucketHashKeyIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1946,7 +1913,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.enableTrace = iprot.readBool();
struct.setEnableTraceIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1954,7 +1921,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.responseFormat = iprot.readString();
struct.setResponseFormatIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1962,10 +1929,11 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map97 = iprot.readMapBegin();
- struct.debugOptions = new HashMap<String, String>(2 * _map97.size);
- String _key98;
- String _val99;
- for (int _i100 = 0; _i100 < _map97.size; ++_i100) {
+ struct.debugOptions = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map97.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key98;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val99;
+ for (int _i100 = 0; _i100 < _map97.size; ++_i100)
+ {
_key98 = iprot.readString();
_val99 = iprot.readString();
struct.debugOptions.put(_key98, _val99);
@@ -1973,7 +1941,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
iprot.readMapEnd();
}
struct.setDebugOptionsIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -1981,10 +1949,11 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map101 = iprot.readMapBegin();
- struct.queryOptions = new HashMap<String, String>(2 * _map101.size);
- String _key102;
- String _val103;
- for (int _i104 = 0; _i104 < _map101.size; ++_i104) {
+ struct.queryOptions = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map101.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key102;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val103;
+ for (int _i104 = 0; _i104 < _map101.size; ++_i104)
+ {
_key102 = iprot.readString();
_val103 = iprot.readString();
struct.queryOptions.put(_key102, _val103);
@@ -1992,7 +1961,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
iprot.readMapEnd();
}
struct.setQueryOptionsIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -2001,7 +1970,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.havingFilterQuery = new HavingFilterQuery();
struct.havingFilterQuery.read(iprot);
struct.setHavingFilterQueryIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -2010,7 +1979,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.havingFilterSubQueryMap = new HavingFilterQueryMap();
struct.havingFilterSubQueryMap.read(iprot);
struct.setHavingFilterSubQueryMapIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -2019,7 +1988,26 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.pinotQuery = new org.apache.pinot.common.request.PinotQuery();
struct.pinotQuery.read(iprot);
struct.setPinotQueryIsSet(true);
- } else {
+ } else {
+ org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
+ }
+ break;
+ case 18: // ORDER_BY
+ if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
+ {
+ org.apache.thrift.protocol.TList _list105 = iprot.readListBegin();
+ struct.orderBy = new java.util.ArrayList<SelectionSort>(_list105.size);
+ @org.apache.thrift.annotation.Nullable SelectionSort _elem106;
+ for (int _i107 = 0; _i107 < _list105.size; ++_i107)
+ {
+ _elem106 = new SelectionSort();
+ _elem106.read(iprot);
+ struct.orderBy.add(_elem106);
+ }
+ iprot.readListEnd();
+ }
+ struct.setOrderByIsSet(true);
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -2029,11 +2017,12 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, BrokerRequest struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, BrokerRequest struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -2076,10 +2065,10 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (struct.isSetAggregationsInfo()) {
oprot.writeFieldBegin(AGGREGATIONS_INFO_FIELD_DESC);
{
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
- struct.aggregationsInfo.size()));
- for (AggregationInfo _iter105 : struct.aggregationsInfo) {
- _iter105.write(oprot);
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.aggregationsInfo.size()));
+ for (AggregationInfo _iter108 : struct.aggregationsInfo)
+ {
+ _iter108.write(oprot);
}
oprot.writeListEnd();
}
@@ -2130,11 +2119,11 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (struct.isSetDebugOptions()) {
oprot.writeFieldBegin(DEBUG_OPTIONS_FIELD_DESC);
{
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
- org.apache.thrift.protocol.TType.STRING, struct.debugOptions.size()));
- for (Map.Entry<String, String> _iter106 : struct.debugOptions.entrySet()) {
- oprot.writeString(_iter106.getKey());
- oprot.writeString(_iter106.getValue());
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.debugOptions.size()));
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter109 : struct.debugOptions.entrySet())
+ {
+ oprot.writeString(_iter109.getKey());
+ oprot.writeString(_iter109.getValue());
}
oprot.writeMapEnd();
}
@@ -2145,11 +2134,11 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (struct.isSetQueryOptions()) {
oprot.writeFieldBegin(QUERY_OPTIONS_FIELD_DESC);
{
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
- org.apache.thrift.protocol.TType.STRING, struct.queryOptions.size()));
- for (Map.Entry<String, String> _iter107 : struct.queryOptions.entrySet()) {
- oprot.writeString(_iter107.getKey());
- oprot.writeString(_iter107.getValue());
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, struct.queryOptions.size()));
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter110 : struct.queryOptions.entrySet())
+ {
+ oprot.writeString(_iter110.getKey());
+ oprot.writeString(_iter110.getValue());
}
oprot.writeMapEnd();
}
@@ -2177,24 +2166,38 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
oprot.writeFieldEnd();
}
}
+ if (struct.orderBy != null) {
+ if (struct.isSetOrderBy()) {
+ oprot.writeFieldBegin(ORDER_BY_FIELD_DESC);
+ {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.orderBy.size()));
+ for (SelectionSort _iter111 : struct.orderBy)
+ {
+ _iter111.write(oprot);
+ }
+ oprot.writeListEnd();
+ }
+ oprot.writeFieldEnd();
+ }
+ }
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class BrokerRequestTupleSchemeFactory implements SchemeFactory {
+ private static class BrokerRequestTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public BrokerRequestTupleScheme getScheme() {
return new BrokerRequestTupleScheme();
}
}
- private static class BrokerRequestTupleScheme extends TupleScheme<BrokerRequest> {
+ private static class BrokerRequestTupleScheme extends org.apache.thrift.scheme.TupleScheme<BrokerRequest> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, BrokerRequest struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ public void write(org.apache.thrift.protocol.TProtocol prot, BrokerRequest struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetQueryType()) {
optionals.set(0);
}
@@ -2246,7 +2249,10 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (struct.isSetPinotQuery()) {
optionals.set(16);
}
- oprot.writeBitSet(optionals, 17);
+ if (struct.isSetOrderBy()) {
+ optionals.set(17);
+ }
+ oprot.writeBitSet(optionals, 18);
if (struct.isSetQueryType()) {
struct.queryType.write(oprot);
}
@@ -2265,8 +2271,9 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (struct.isSetAggregationsInfo()) {
{
oprot.writeI32(struct.aggregationsInfo.size());
- for (AggregationInfo _iter108 : struct.aggregationsInfo) {
- _iter108.write(oprot);
+ for (AggregationInfo _iter112 : struct.aggregationsInfo)
+ {
+ _iter112.write(oprot);
}
}
}
@@ -2291,18 +2298,20 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (struct.isSetDebugOptions()) {
{
oprot.writeI32(struct.debugOptions.size());
- for (Map.Entry<String, String> _iter109 : struct.debugOptions.entrySet()) {
- oprot.writeString(_iter109.getKey());
- oprot.writeString(_iter109.getValue());
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter113 : struct.debugOptions.entrySet())
+ {
+ oprot.writeString(_iter113.getKey());
+ oprot.writeString(_iter113.getValue());
}
}
}
if (struct.isSetQueryOptions()) {
{
oprot.writeI32(struct.queryOptions.size());
- for (Map.Entry<String, String> _iter110 : struct.queryOptions.entrySet()) {
- oprot.writeString(_iter110.getKey());
- oprot.writeString(_iter110.getValue());
+ for (java.util.Map.Entry<java.lang.String, java.lang.String> _iter114 : struct.queryOptions.entrySet())
+ {
+ oprot.writeString(_iter114.getKey());
+ oprot.writeString(_iter114.getValue());
}
}
}
@@ -2315,13 +2324,21 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (struct.isSetPinotQuery()) {
struct.pinotQuery.write(oprot);
}
+ if (struct.isSetOrderBy()) {
+ {
+ oprot.writeI32(struct.orderBy.size());
+ for (SelectionSort _iter115 : struct.orderBy)
+ {
+ _iter115.write(oprot);
+ }
+ }
+ }
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, BrokerRequest struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(17);
+ public void read(org.apache.thrift.protocol.TProtocol prot, BrokerRequest struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(18);
if (incoming.get(0)) {
struct.queryType = new QueryType();
struct.queryType.read(iprot);
@@ -2347,14 +2364,14 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
if (incoming.get(5)) {
{
- org.apache.thrift.protocol.TList _list111 =
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.aggregationsInfo = new ArrayList<AggregationInfo>(_list111.size);
- AggregationInfo _elem112;
- for (int _i113 = 0; _i113 < _list111.size; ++_i113) {
- _elem112 = new AggregationInfo();
- _elem112.read(iprot);
- struct.aggregationsInfo.add(_elem112);
+ org.apache.thrift.protocol.TList _list116 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.aggregationsInfo = new java.util.ArrayList<AggregationInfo>(_list116.size);
+ @org.apache.thrift.annotation.Nullable AggregationInfo _elem117;
+ for (int _i118 = 0; _i118 < _list116.size; ++_i118)
+ {
+ _elem117 = new AggregationInfo();
+ _elem117.read(iprot);
+ struct.aggregationsInfo.add(_elem117);
}
}
struct.setAggregationsInfoIsSet(true);
@@ -2388,32 +2405,30 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
if (incoming.get(12)) {
{
- org.apache.thrift.protocol.TMap _map114 =
- new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
- org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.debugOptions = new HashMap<String, String>(2 * _map114.size);
- String _key115;
- String _val116;
- for (int _i117 = 0; _i117 < _map114.size; ++_i117) {
- _key115 = iprot.readString();
- _val116 = iprot.readString();
- struct.debugOptions.put(_key115, _val116);
+ org.apache.thrift.protocol.TMap _map119 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.debugOptions = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map119.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key120;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val121;
+ for (int _i122 = 0; _i122 < _map119.size; ++_i122)
+ {
+ _key120 = iprot.readString();
+ _val121 = iprot.readString();
+ struct.debugOptions.put(_key120, _val121);
}
}
struct.setDebugOptionsIsSet(true);
}
if (incoming.get(13)) {
{
- org.apache.thrift.protocol.TMap _map118 =
- new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING,
- org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.queryOptions = new HashMap<String, String>(2 * _map118.size);
- String _key119;
- String _val120;
- for (int _i121 = 0; _i121 < _map118.size; ++_i121) {
- _key119 = iprot.readString();
- _val120 = iprot.readString();
- struct.queryOptions.put(_key119, _val120);
+ org.apache.thrift.protocol.TMap _map123 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.queryOptions = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map123.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key124;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val125;
+ for (int _i126 = 0; _i126 < _map123.size; ++_i126)
+ {
+ _key124 = iprot.readString();
+ _val125 = iprot.readString();
+ struct.queryOptions.put(_key124, _val125);
}
}
struct.setQueryOptionsIsSet(true);
@@ -2433,7 +2448,25 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
struct.pinotQuery.read(iprot);
struct.setPinotQueryIsSet(true);
}
+ if (incoming.get(17)) {
+ {
+ org.apache.thrift.protocol.TList _list127 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.orderBy = new java.util.ArrayList<SelectionSort>(_list127.size);
+ @org.apache.thrift.annotation.Nullable SelectionSort _elem128;
+ for (int _i129 = 0; _i129 < _list127.size; ++_i129)
+ {
+ _elem128 = new SelectionSort();
+ _elem128.read(iprot);
+ struct.orderBy.add(_elem128);
+ }
+ }
+ struct.setOrderByIsSet(true);
+ }
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/DataSource.java b/pinot-common/src/main/java/org/apache/pinot/common/request/DataSource.java
index d43ce73..9c7cff4 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/DataSource.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/DataSource.java
@@ -17,56 +17,33 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class DataSource implements org.apache.thrift.TBase<DataSource, DataSource._Fields>, java.io.Serializable, Cloneable, Comparable<DataSource> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("DataSource");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataSource");
- private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC =
- new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short) 1);
+ private static final org.apache.thrift.protocol.TField TABLE_NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("tableName", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new DataSourceStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new DataSourceTupleSchemeFactory();
- static {
- schemes.put(StandardScheme.class, new DataSourceStandardSchemeFactory());
- schemes.put(TupleScheme.class, new DataSourceTupleSchemeFactory());
- }
-
- private String tableName; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String tableName; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- TABLE_NAME((short) 1, "tableName");
+ TABLE_NAME((short)1, "tableName");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -74,8 +51,9 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // TABLE_NAME
return TABLE_NAME;
default:
@@ -89,23 +67,22 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -114,22 +91,19 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.TABLE_NAME};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TABLE_NAME,
- new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ 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.TABLE_NAME, new org.apache.thrift.meta_data.FieldMetaData("tableName", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ 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(DataSource.class, metaDataMap);
}
@@ -154,12 +128,14 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
this.tableName = null;
}
- public String getTableName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getTableName() {
return this.tableName;
}
- public void setTableName(String tableName) {
+ public DataSource setTableName(@org.apache.thrift.annotation.Nullable java.lang.String tableName) {
this.tableName = tableName;
+ return this;
}
public void unsetTableName() {
@@ -177,64 +153,64 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case TABLE_NAME:
- if (value == null) {
- unsetTableName();
- } else {
- setTableName((String) value);
- }
- break;
+ case TABLE_NAME:
+ if (value == null) {
+ unsetTableName();
+ } else {
+ setTableName((java.lang.String)value);
+ }
+ break;
+
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case TABLE_NAME:
- return getTableName();
+ case TABLE_NAME:
+ return getTableName();
+
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case TABLE_NAME:
- return isSetTableName();
+ case TABLE_NAME:
+ return isSetTableName();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof DataSource) {
- return this.equals((DataSource) that);
- }
+ if (that instanceof DataSource)
+ return this.equals((DataSource)that);
return false;
}
public boolean equals(DataSource that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_tableName = true && this.isSetTableName();
boolean that_present_tableName = true && that.isSetTableName();
if (this_present_tableName || that_present_tableName) {
- if (!(this_present_tableName && that_present_tableName)) {
+ if (!(this_present_tableName && that_present_tableName))
return false;
- }
- if (!this.tableName.equals(that.tableName)) {
+ if (!this.tableName.equals(that.tableName))
return false;
- }
}
return true;
@@ -242,15 +218,13 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_tableName = true && (isSetTableName());
- list.add(present_tableName);
- if (present_tableName) {
- list.add(tableName);
- }
+ hashCode = hashCode * 8191 + ((isSetTableName()) ? 131071 : 524287);
+ if (isSetTableName())
+ hashCode = hashCode * 8191 + tableName.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -261,7 +235,7 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
+ lastComparison = java.lang.Boolean.valueOf(isSetTableName()).compareTo(other.isSetTableName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -274,23 +248,22 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("DataSource(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("DataSource(");
boolean first = true;
if (isSetTableName()) {
@@ -306,14 +279,12 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -321,8 +292,7 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -330,21 +300,21 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
}
}
- private static class DataSourceStandardSchemeFactory implements SchemeFactory {
+ private static class DataSourceStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DataSourceStandardScheme getScheme() {
return new DataSourceStandardScheme();
}
}
- private static class DataSourceStandardScheme extends StandardScheme<DataSource> {
+ private static class DataSourceStandardScheme extends org.apache.thrift.scheme.StandardScheme<DataSource> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, DataSource struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, DataSource struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -352,7 +322,7 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -362,11 +332,12 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, DataSource struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, DataSource struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -380,21 +351,21 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class DataSourceTupleSchemeFactory implements SchemeFactory {
+ private static class DataSourceTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public DataSourceTupleScheme getScheme() {
return new DataSourceTupleScheme();
}
}
- private static class DataSourceTupleScheme extends TupleScheme<DataSource> {
+ private static class DataSourceTupleScheme extends org.apache.thrift.scheme.TupleScheme<DataSource> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, DataSource struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ public void write(org.apache.thrift.protocol.TProtocol prot, DataSource struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetTableName()) {
optionals.set(0);
}
@@ -405,15 +376,18 @@ public class DataSource implements org.apache.thrift.TBase<DataSource, DataSourc
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, DataSource struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ public void read(org.apache.thrift.protocol.TProtocol prot, DataSource struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
struct.tableName = iprot.readString();
struct.setTableNameIsSet(true);
}
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/Expression.java b/pinot-common/src/main/java/org/apache/pinot/common/request/Expression.java
index 43cae1d..240b2bb 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/Expression.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/Expression.java
@@ -17,72 +17,50 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class Expression implements org.apache.thrift.TBase<Expression, Expression._Fields>, java.io.Serializable, Cloneable, Comparable<Expression> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("Expression");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Expression");
- private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC =
- new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short) 1);
- private static final org.apache.thrift.protocol.TField FUNCTION_CALL_FIELD_DESC =
- new org.apache.thrift.protocol.TField("functionCall", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
- private static final org.apache.thrift.protocol.TField LITERAL_FIELD_DESC =
- new org.apache.thrift.protocol.TField("literal", org.apache.thrift.protocol.TType.STRUCT, (short) 3);
- private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC =
- new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.STRUCT, (short) 4);
+ private static final org.apache.thrift.protocol.TField TYPE_FIELD_DESC = new org.apache.thrift.protocol.TField("type", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField FUNCTION_CALL_FIELD_DESC = new org.apache.thrift.protocol.TField("functionCall", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField LITERAL_FIELD_DESC = new org.apache.thrift.protocol.TField("literal", org.apache.thrift.protocol.TType.STRUCT, (short)3);
+ private static final org.apache.thrift.protocol.TField IDENTIFIER_FIELD_DESC = new org.apache.thrift.protocol.TField("identifier", org.apache.thrift.protocol.TType.STRUCT, (short)4);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new ExpressionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new ExpressionTupleSchemeFactory();
- static {
- schemes.put(StandardScheme.class, new ExpressionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new ExpressionTupleSchemeFactory());
- }
-
- private ExpressionType type; // required
- private Function functionCall; // optional
- private Literal literal; // optional
- private Identifier identifier; // optional
+ /**
+ *
+ * @see ExpressionType
+ */
+ public @org.apache.thrift.annotation.Nullable ExpressionType type; // required
+ public @org.apache.thrift.annotation.Nullable Function functionCall; // optional
+ public @org.apache.thrift.annotation.Nullable Literal literal; // optional
+ public @org.apache.thrift.annotation.Nullable Identifier identifier; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
/**
- *
+ *
* @see ExpressionType
*/
- TYPE((short) 1, "type"),
- FUNCTION_CALL((short) 2, "functionCall"),
- LITERAL((short) 3, "literal"),
- IDENTIFIER((short) 4, "identifier");
+ TYPE((short)1, "type"),
+ FUNCTION_CALL((short)2, "functionCall"),
+ LITERAL((short)3, "literal"),
+ IDENTIFIER((short)4, "identifier");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -90,8 +68,9 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // TYPE
return TYPE;
case 2: // FUNCTION_CALL
@@ -111,23 +90,22 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -136,38 +114,34 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- private static final _Fields optionals[] = {_Fields.FUNCTION_CALL, _Fields.LITERAL, _Fields.IDENTIFIER};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ private static final _Fields optionals[] = {_Fields.FUNCTION_CALL,_Fields.LITERAL,_Fields.IDENTIFIER};
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.TYPE,
- new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExpressionType.class)));
- tmpMap.put(_Fields.FUNCTION_CALL,
- new org.apache.thrift.meta_data.FieldMetaData("functionCall", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT, "Function")));
- tmpMap.put(_Fields.LITERAL,
- new org.apache.thrift.meta_data.FieldMetaData("literal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT, "Literal")));
- tmpMap.put(_Fields.IDENTIFIER,
- new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT, "Identifier")));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ 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.TYPE, new org.apache.thrift.meta_data.FieldMetaData("type", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, ExpressionType.class)));
+ tmpMap.put(_Fields.FUNCTION_CALL, new org.apache.thrift.meta_data.FieldMetaData("functionCall", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "Function")));
+ tmpMap.put(_Fields.LITERAL, new org.apache.thrift.meta_data.FieldMetaData("literal", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "Literal")));
+ tmpMap.put(_Fields.IDENTIFIER, new org.apache.thrift.meta_data.FieldMetaData("identifier", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "Identifier")));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Expression.class, metaDataMap);
}
public Expression() {
}
- public Expression(ExpressionType type) {
+ public Expression(
+ ExpressionType type)
+ {
this();
this.type = type;
}
@@ -180,13 +154,13 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
this.type = other.type;
}
if (other.isSetFunctionCall()) {
- this.functionCall = other.functionCall;
+ this.functionCall = new Function(other.functionCall);
}
if (other.isSetLiteral()) {
- this.literal = other.literal;
+ this.literal = new Literal(other.literal);
}
if (other.isSetIdentifier()) {
- this.identifier = other.identifier;
+ this.identifier = new Identifier(other.identifier);
}
}
@@ -203,19 +177,21 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
/**
- *
+ *
* @see ExpressionType
*/
+ @org.apache.thrift.annotation.Nullable
public ExpressionType getType() {
return this.type;
}
/**
- *
+ *
* @see ExpressionType
*/
- public void setType(ExpressionType type) {
+ public Expression setType(@org.apache.thrift.annotation.Nullable ExpressionType type) {
this.type = type;
+ return this;
}
public void unsetType() {
@@ -233,12 +209,14 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
}
+ @org.apache.thrift.annotation.Nullable
public Function getFunctionCall() {
return this.functionCall;
}
- public void setFunctionCall(Function functionCall) {
+ public Expression setFunctionCall(@org.apache.thrift.annotation.Nullable Function functionCall) {
this.functionCall = functionCall;
+ return this;
}
public void unsetFunctionCall() {
@@ -256,12 +234,14 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
}
+ @org.apache.thrift.annotation.Nullable
public Literal getLiteral() {
return this.literal;
}
- public void setLiteral(Literal literal) {
+ public Expression setLiteral(@org.apache.thrift.annotation.Nullable Literal literal) {
this.literal = literal;
+ return this;
}
public void unsetLiteral() {
@@ -279,12 +259,14 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
}
+ @org.apache.thrift.annotation.Nullable
public Identifier getIdentifier() {
return this.identifier;
}
- public void setIdentifier(Identifier identifier) {
+ public Expression setIdentifier(@org.apache.thrift.annotation.Nullable Identifier identifier) {
this.identifier = identifier;
+ return this;
}
public void unsetIdentifier() {
@@ -302,136 +284,130 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case TYPE:
- if (value == null) {
- unsetType();
- } else {
- setType((ExpressionType) value);
- }
- break;
+ case TYPE:
+ if (value == null) {
+ unsetType();
+ } else {
+ setType((ExpressionType)value);
+ }
+ break;
- case FUNCTION_CALL:
- if (value == null) {
- unsetFunctionCall();
- } else {
- setFunctionCall((Function) value);
- }
- break;
+ case FUNCTION_CALL:
+ if (value == null) {
+ unsetFunctionCall();
+ } else {
+ setFunctionCall((Function)value);
+ }
+ break;
- case LITERAL:
- if (value == null) {
- unsetLiteral();
- } else {
- setLiteral((Literal) value);
- }
- break;
+ case LITERAL:
+ if (value == null) {
+ unsetLiteral();
+ } else {
+ setLiteral((Literal)value);
+ }
+ break;
+
+ case IDENTIFIER:
+ if (value == null) {
+ unsetIdentifier();
+ } else {
+ setIdentifier((Identifier)value);
+ }
+ break;
- case IDENTIFIER:
- if (value == null) {
- unsetIdentifier();
- } else {
- setIdentifier((Identifier) value);
- }
- break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case TYPE:
- return getType();
+ case TYPE:
+ return getType();
- case FUNCTION_CALL:
- return getFunctionCall();
+ case FUNCTION_CALL:
+ return getFunctionCall();
- case LITERAL:
- return getLiteral();
+ case LITERAL:
+ return getLiteral();
+
+ case IDENTIFIER:
+ return getIdentifier();
- case IDENTIFIER:
- return getIdentifier();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case TYPE:
- return isSetType();
- case FUNCTION_CALL:
- return isSetFunctionCall();
- case LITERAL:
- return isSetLiteral();
- case IDENTIFIER:
- return isSetIdentifier();
+ case TYPE:
+ return isSetType();
+ case FUNCTION_CALL:
+ return isSetFunctionCall();
+ case LITERAL:
+ return isSetLiteral();
+ case IDENTIFIER:
+ return isSetIdentifier();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof Expression) {
- return this.equals((Expression) that);
- }
+ if (that instanceof Expression)
+ return this.equals((Expression)that);
return false;
}
public boolean equals(Expression that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_type = true && this.isSetType();
boolean that_present_type = true && that.isSetType();
if (this_present_type || that_present_type) {
- if (!(this_present_type && that_present_type)) {
+ if (!(this_present_type && that_present_type))
return false;
- }
- if (!this.type.equals(that.type)) {
+ if (!this.type.equals(that.type))
return false;
- }
}
boolean this_present_functionCall = true && this.isSetFunctionCall();
boolean that_present_functionCall = true && that.isSetFunctionCall();
if (this_present_functionCall || that_present_functionCall) {
- if (!(this_present_functionCall && that_present_functionCall)) {
+ if (!(this_present_functionCall && that_present_functionCall))
return false;
- }
- if (!this.functionCall.equals(that.functionCall)) {
+ if (!this.functionCall.equals(that.functionCall))
return false;
- }
}
boolean this_present_literal = true && this.isSetLiteral();
boolean that_present_literal = true && that.isSetLiteral();
if (this_present_literal || that_present_literal) {
- if (!(this_present_literal && that_present_literal)) {
+ if (!(this_present_literal && that_present_literal))
return false;
- }
- if (!this.literal.equals(that.literal)) {
+ if (!this.literal.equals(that.literal))
return false;
- }
}
boolean this_present_identifier = true && this.isSetIdentifier();
boolean that_present_identifier = true && that.isSetIdentifier();
if (this_present_identifier || that_present_identifier) {
- if (!(this_present_identifier && that_present_identifier)) {
+ if (!(this_present_identifier && that_present_identifier))
return false;
- }
- if (!this.identifier.equals(that.identifier)) {
+ if (!this.identifier.equals(that.identifier))
return false;
- }
}
return true;
@@ -439,33 +415,25 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_type = true && (isSetType());
- list.add(present_type);
- if (present_type) {
- list.add(type.getValue());
- }
+ hashCode = hashCode * 8191 + ((isSetType()) ? 131071 : 524287);
+ if (isSetType())
+ hashCode = hashCode * 8191 + type.getValue();
- boolean present_functionCall = true && (isSetFunctionCall());
- list.add(present_functionCall);
- if (present_functionCall) {
- list.add(functionCall);
- }
+ hashCode = hashCode * 8191 + ((isSetFunctionCall()) ? 131071 : 524287);
+ if (isSetFunctionCall())
+ hashCode = hashCode * 8191 + functionCall.hashCode();
- boolean present_literal = true && (isSetLiteral());
- list.add(present_literal);
- if (present_literal) {
- list.add(literal);
- }
+ hashCode = hashCode * 8191 + ((isSetLiteral()) ? 131071 : 524287);
+ if (isSetLiteral())
+ hashCode = hashCode * 8191 + literal.hashCode();
- boolean present_identifier = true && (isSetIdentifier());
- list.add(present_identifier);
- if (present_identifier) {
- list.add(identifier);
- }
+ hashCode = hashCode * 8191 + ((isSetIdentifier()) ? 131071 : 524287);
+ if (isSetIdentifier())
+ hashCode = hashCode * 8191 + identifier.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -476,7 +444,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetType()).compareTo(other.isSetType());
+ lastComparison = java.lang.Boolean.valueOf(isSetType()).compareTo(other.isSetType());
if (lastComparison != 0) {
return lastComparison;
}
@@ -486,7 +454,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetFunctionCall()).compareTo(other.isSetFunctionCall());
+ lastComparison = java.lang.Boolean.valueOf(isSetFunctionCall()).compareTo(other.isSetFunctionCall());
if (lastComparison != 0) {
return lastComparison;
}
@@ -496,7 +464,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetLiteral()).compareTo(other.isSetLiteral());
+ lastComparison = java.lang.Boolean.valueOf(isSetLiteral()).compareTo(other.isSetLiteral());
if (lastComparison != 0) {
return lastComparison;
}
@@ -506,7 +474,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetIdentifier()).compareTo(other.isSetIdentifier());
+ lastComparison = java.lang.Boolean.valueOf(isSetIdentifier()).compareTo(other.isSetIdentifier());
if (lastComparison != 0) {
return lastComparison;
}
@@ -519,23 +487,22 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Expression(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Expression(");
boolean first = true;
sb.append("type:");
@@ -546,9 +513,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
first = false;
if (isSetFunctionCall()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("functionCall:");
if (this.functionCall == null) {
sb.append("null");
@@ -558,9 +523,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
first = false;
}
if (isSetLiteral()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("literal:");
if (this.literal == null) {
sb.append("null");
@@ -570,9 +533,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
first = false;
}
if (isSetIdentifier()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("identifier:");
if (this.identifier == null) {
sb.append("null");
@@ -585,18 +546,15 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (!isSetType()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' is unset! Struct:" + toString());
+ if (type == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'type' was not present! Struct: " + toString());
}
-
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -604,8 +562,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -613,21 +570,21 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
}
- private static class ExpressionStandardSchemeFactory implements SchemeFactory {
+ private static class ExpressionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExpressionStandardScheme getScheme() {
return new ExpressionStandardScheme();
}
}
- private static class ExpressionStandardScheme extends StandardScheme<Expression> {
+ private static class ExpressionStandardScheme extends org.apache.thrift.scheme.StandardScheme<Expression> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, Expression struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Expression struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -635,7 +592,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.type = org.apache.pinot.common.request.ExpressionType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -644,7 +601,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
struct.functionCall = new Function();
struct.functionCall.read(iprot);
struct.setFunctionCallIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -653,7 +610,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
struct.literal = new Literal();
struct.literal.read(iprot);
struct.setLiteralIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -662,7 +619,7 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
struct.identifier = new Identifier();
struct.identifier.read(iprot);
struct.setIdentifierIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -672,11 +629,12 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, Expression struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Expression struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -709,22 +667,22 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class ExpressionTupleSchemeFactory implements SchemeFactory {
+ private static class ExpressionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public ExpressionTupleScheme getScheme() {
return new ExpressionTupleScheme();
}
}
- private static class ExpressionTupleScheme extends TupleScheme<Expression> {
+ private static class ExpressionTupleScheme extends org.apache.thrift.scheme.TupleScheme<Expression> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Expression struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ public void write(org.apache.thrift.protocol.TProtocol prot, Expression struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.type.getValue());
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetFunctionCall()) {
optionals.set(0);
}
@@ -747,12 +705,11 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Expression struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ public void read(org.apache.thrift.protocol.TProtocol prot, Expression struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.type = org.apache.pinot.common.request.ExpressionType.findByValue(iprot.readI32());
struct.setTypeIsSet(true);
- BitSet incoming = iprot.readBitSet(3);
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
struct.functionCall = new Function();
struct.functionCall.read(iprot);
@@ -770,5 +727,9 @@ public class Expression implements org.apache.thrift.TBase<Expression, Expressio
}
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/ExpressionType.java b/pinot-common/src/main/java/org/apache/pinot/common/request/ExpressionType.java
index dd57180..de06b54 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/ExpressionType.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/ExpressionType.java
@@ -17,15 +17,19 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
+
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public enum ExpressionType implements org.apache.thrift.TEnum {
- LITERAL(0), IDENTIFIER(1), FUNCTION(2);
+ LITERAL(0),
+ IDENTIFIER(1),
+ FUNCTION(2);
private final int value;
@@ -44,7 +48,8 @@ public enum ExpressionType implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
- public static ExpressionType findByValue(int value) {
+ @org.apache.thrift.annotation.Nullable
+ public static ExpressionType findByValue(int value) {
switch (value) {
case 0:
return LITERAL;
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/FilterOperator.java b/pinot-common/src/main/java/org/apache/pinot/common/request/FilterOperator.java
index d1d6498..72d57ba 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/FilterOperator.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/FilterOperator.java
@@ -17,20 +17,29 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
+
/**
* AUTO GENERATED: DO NOT EDIT
* Filter Operator
- *
+ *
*/
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public enum FilterOperator implements org.apache.thrift.TEnum {
- AND(0), OR(1), EQUALITY(2), NOT(3), RANGE(4), REGEXP_LIKE(5), NOT_IN(6), IN(7);
+ AND(0),
+ OR(1),
+ EQUALITY(2),
+ NOT(3),
+ RANGE(4),
+ REGEXP_LIKE(5),
+ NOT_IN(6),
+ IN(7);
private final int value;
@@ -49,7 +58,8 @@ public enum FilterOperator implements org.apache.thrift.TEnum {
* Find a the enum type by its integer value, as defined in the Thrift IDL.
* @return null if the value is not found.
*/
- public static FilterOperator findByValue(int value) {
+ @org.apache.thrift.annotation.Nullable
+ public static FilterOperator findByValue(int value) {
switch (value) {
case 0:
return AND;
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/FilterQuery.java b/pinot-common/src/main/java/org/apache/pinot/common/request/FilterQuery.java
index 9ad9b5a..62c1e72 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/FilterQuery.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/FilterQuery.java
@@ -17,83 +17,64 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* AUTO GENERATED: DO NOT EDIT
* Filter query
- *
+ *
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQuery._Fields>, java.io.Serializable, Cloneable, Comparable<FilterQuery> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("FilterQuery");
-
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short) 1);
- private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC =
- new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short) 2);
- private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.LIST, (short) 3);
- private static final org.apache.thrift.protocol.TField OPERATOR_FIELD_DESC =
- new org.apache.thrift.protocol.TField("operator", org.apache.thrift.protocol.TType.I32, (short) 4);
- private static final org.apache.thrift.protocol.TField NESTED_FILTER_QUERY_IDS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("nestedFilterQueryIds", org.apache.thrift.protocol.TType.LIST, (short) 5);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FilterQuery");
- static {
- schemes.put(StandardScheme.class, new FilterQueryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new FilterQueryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField COLUMN_FIELD_DESC = new org.apache.thrift.protocol.TField("column", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.LIST, (short)3);
+ private static final org.apache.thrift.protocol.TField OPERATOR_FIELD_DESC = new org.apache.thrift.protocol.TField("operator", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField NESTED_FILTER_QUERY_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("nestedFilterQueryIds", org.apache.thrift.protocol.TType.LIST, (short)5);
- private int id; // required
- private String column; // optional
- private List<String> value; // required
- private FilterOperator operator; // optional
- private List<Integer> nestedFilterQueryIds; // required
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new FilterQueryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new FilterQueryTupleSchemeFactory();
+
+ public int id; // required
+ /**
+ * This should be unique within a single request *
+ */
+ public @org.apache.thrift.annotation.Nullable java.lang.String column; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> value; // required
+ /**
+ *
+ * @see FilterOperator
+ */
+ public @org.apache.thrift.annotation.Nullable FilterOperator operator; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> nestedFilterQueryIds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ID((short) 1, "id"),
+ ID((short)1, "id"),
/**
* This should be unique within a single request *
*/
- COLUMN((short) 2, "column"), VALUE((short) 3, "value"),
+ COLUMN((short)2, "column"),
+ VALUE((short)3, "value"),
/**
- *
+ *
* @see FilterOperator
*/
- OPERATOR((short) 4, "operator"), NESTED_FILTER_QUERY_IDS((short) 5, "nestedFilterQueryIds");
+ OPERATOR((short)4, "operator"),
+ NESTED_FILTER_QUERY_IDS((short)5, "nestedFilterQueryIds");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -101,8 +82,9 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // ID
return ID;
case 2: // COLUMN
@@ -124,23 +106,22 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -149,7 +130,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -157,37 +138,34 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
// isset id assignments
private static final int __ID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.COLUMN, _Fields.OPERATOR};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ private static final _Fields optionals[] = {_Fields.COLUMN,_Fields.OPERATOR};
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ID,
- new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.COLUMN,
- new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.VALUE,
- new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
- 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))));
- tmpMap.put(_Fields.OPERATOR,
- new org.apache.thrift.meta_data.FieldMetaData("operator", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FilterOperator.class)));
- tmpMap.put(_Fields.NESTED_FILTER_QUERY_IDS, new org.apache.thrift.meta_data.FieldMetaData("nestedFilterQueryIds",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.COLUMN, new org.apache.thrift.meta_data.FieldMetaData("column", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ 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))));
+ tmpMap.put(_Fields.OPERATOR, new org.apache.thrift.meta_data.FieldMetaData("operator", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FilterOperator.class)));
+ tmpMap.put(_Fields.NESTED_FILTER_QUERY_IDS, new org.apache.thrift.meta_data.FieldMetaData("nestedFilterQueryIds", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ 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.I32))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FilterQuery.class, metaDataMap);
}
public FilterQuery() {
}
- public FilterQuery(int id, List<String> value, List<Integer> nestedFilterQueryIds) {
+ public FilterQuery(
+ int id,
+ java.util.List<java.lang.String> value,
+ java.util.List<java.lang.Integer> nestedFilterQueryIds)
+ {
this();
this.id = id;
setIdIsSet(true);
@@ -205,14 +183,14 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
this.column = other.column;
}
if (other.isSetValue()) {
- List<String> __this__value = new ArrayList<String>(other.value);
+ java.util.List<java.lang.String> __this__value = new java.util.ArrayList<java.lang.String>(other.value);
this.value = __this__value;
}
if (other.isSetOperator()) {
this.operator = other.operator;
}
if (other.isSetNestedFilterQueryIds()) {
- List<Integer> __this__nestedFilterQueryIds = new ArrayList<Integer>(other.nestedFilterQueryIds);
+ java.util.List<java.lang.Integer> __this__nestedFilterQueryIds = new java.util.ArrayList<java.lang.Integer>(other.nestedFilterQueryIds);
this.nestedFilterQueryIds = __this__nestedFilterQueryIds;
}
}
@@ -235,36 +213,39 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return this.id;
}
- public void setId(int id) {
+ public FilterQuery setId(int id) {
this.id = id;
setIdIsSet(true);
+ return this;
}
public void unsetId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
- return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
}
/**
* This should be unique within a single request *
*/
- public String getColumn() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getColumn() {
return this.column;
}
/**
* This should be unique within a single request *
*/
- public void setColumn(String column) {
+ public FilterQuery setColumn(@org.apache.thrift.annotation.Nullable java.lang.String column) {
this.column = column;
+ return this;
}
public void unsetColumn() {
@@ -286,23 +267,26 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return (this.value == null) ? 0 : this.value.size();
}
- public java.util.Iterator<String> getValueIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getValueIterator() {
return (this.value == null) ? null : this.value.iterator();
}
- public void addToValue(String elem) {
+ public void addToValue(java.lang.String elem) {
if (this.value == null) {
- this.value = new ArrayList<String>();
+ this.value = new java.util.ArrayList<java.lang.String>();
}
this.value.add(elem);
}
- public List<String> getValue() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getValue() {
return this.value;
}
- public void setValue(List<String> value) {
+ public FilterQuery setValue(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> value) {
this.value = value;
+ return this;
}
public void unsetValue() {
@@ -321,19 +305,21 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
/**
- *
+ *
* @see FilterOperator
*/
+ @org.apache.thrift.annotation.Nullable
public FilterOperator getOperator() {
return this.operator;
}
/**
- *
+ *
* @see FilterOperator
*/
- public void setOperator(FilterOperator operator) {
+ public FilterQuery setOperator(@org.apache.thrift.annotation.Nullable FilterOperator operator) {
this.operator = operator;
+ return this;
}
public void unsetOperator() {
@@ -355,23 +341,26 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return (this.nestedFilterQueryIds == null) ? 0 : this.nestedFilterQueryIds.size();
}
- public java.util.Iterator<Integer> getNestedFilterQueryIdsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getNestedFilterQueryIdsIterator() {
return (this.nestedFilterQueryIds == null) ? null : this.nestedFilterQueryIds.iterator();
}
public void addToNestedFilterQueryIds(int elem) {
if (this.nestedFilterQueryIds == null) {
- this.nestedFilterQueryIds = new ArrayList<Integer>();
+ this.nestedFilterQueryIds = new java.util.ArrayList<java.lang.Integer>();
}
this.nestedFilterQueryIds.add(elem);
}
- public List<Integer> getNestedFilterQueryIds() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getNestedFilterQueryIds() {
return this.nestedFilterQueryIds;
}
- public void setNestedFilterQueryIds(List<Integer> nestedFilterQueryIds) {
+ public FilterQuery setNestedFilterQueryIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> nestedFilterQueryIds) {
this.nestedFilterQueryIds = nestedFilterQueryIds;
+ return this;
}
public void unsetNestedFilterQueryIds() {
@@ -389,160 +378,152 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((Integer) value);
- }
- break;
+ case ID:
+ if (value == null) {
+ unsetId();
+ } else {
+ setId((java.lang.Integer)value);
+ }
+ break;
- case COLUMN:
- if (value == null) {
- unsetColumn();
- } else {
- setColumn((String) value);
- }
- break;
+ case COLUMN:
+ if (value == null) {
+ unsetColumn();
+ } else {
+ setColumn((java.lang.String)value);
+ }
+ break;
- case VALUE:
- if (value == null) {
- unsetValue();
- } else {
- setValue((List<String>) value);
- }
- break;
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((java.util.List<java.lang.String>)value);
+ }
+ break;
- case OPERATOR:
- if (value == null) {
- unsetOperator();
- } else {
- setOperator((FilterOperator) value);
- }
- break;
+ case OPERATOR:
+ if (value == null) {
+ unsetOperator();
+ } else {
+ setOperator((FilterOperator)value);
+ }
+ break;
+
+ case NESTED_FILTER_QUERY_IDS:
+ if (value == null) {
+ unsetNestedFilterQueryIds();
+ } else {
+ setNestedFilterQueryIds((java.util.List<java.lang.Integer>)value);
+ }
+ break;
- case NESTED_FILTER_QUERY_IDS:
- if (value == null) {
- unsetNestedFilterQueryIds();
- } else {
- setNestedFilterQueryIds((List<Integer>) value);
- }
- break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case ID:
- return getId();
+ case ID:
+ return getId();
+
+ case COLUMN:
+ return getColumn();
- case COLUMN:
- return getColumn();
+ case VALUE:
+ return getValue();
- case VALUE:
- return getValue();
+ case OPERATOR:
+ return getOperator();
- case OPERATOR:
- return getOperator();
+ case NESTED_FILTER_QUERY_IDS:
+ return getNestedFilterQueryIds();
- case NESTED_FILTER_QUERY_IDS:
- return getNestedFilterQueryIds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case ID:
- return isSetId();
- case COLUMN:
- return isSetColumn();
- case VALUE:
- return isSetValue();
- case OPERATOR:
- return isSetOperator();
- case NESTED_FILTER_QUERY_IDS:
- return isSetNestedFilterQueryIds();
+ case ID:
+ return isSetId();
+ case COLUMN:
+ return isSetColumn();
+ case VALUE:
+ return isSetValue();
+ case OPERATOR:
+ return isSetOperator();
+ case NESTED_FILTER_QUERY_IDS:
+ return isSetNestedFilterQueryIds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof FilterQuery) {
- return this.equals((FilterQuery) that);
- }
+ if (that instanceof FilterQuery)
+ return this.equals((FilterQuery)that);
return false;
}
public boolean equals(FilterQuery that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_id = true;
boolean that_present_id = true;
if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id)) {
+ if (!(this_present_id && that_present_id))
return false;
- }
- if (this.id != that.id) {
+ if (this.id != that.id)
return false;
- }
}
boolean this_present_column = true && this.isSetColumn();
boolean that_present_column = true && that.isSetColumn();
if (this_present_column || that_present_column) {
- if (!(this_present_column && that_present_column)) {
+ if (!(this_present_column && that_present_column))
return false;
- }
- if (!this.column.equals(that.column)) {
+ if (!this.column.equals(that.column))
return false;
- }
}
boolean this_present_value = true && this.isSetValue();
boolean that_present_value = true && that.isSetValue();
if (this_present_value || that_present_value) {
- if (!(this_present_value && that_present_value)) {
+ if (!(this_present_value && that_present_value))
return false;
- }
- if (!this.value.equals(that.value)) {
+ if (!this.value.equals(that.value))
return false;
- }
}
boolean this_present_operator = true && this.isSetOperator();
boolean that_present_operator = true && that.isSetOperator();
if (this_present_operator || that_present_operator) {
- if (!(this_present_operator && that_present_operator)) {
+ if (!(this_present_operator && that_present_operator))
return false;
- }
- if (!this.operator.equals(that.operator)) {
+ if (!this.operator.equals(that.operator))
return false;
- }
}
boolean this_present_nestedFilterQueryIds = true && this.isSetNestedFilterQueryIds();
boolean that_present_nestedFilterQueryIds = true && that.isSetNestedFilterQueryIds();
if (this_present_nestedFilterQueryIds || that_present_nestedFilterQueryIds) {
- if (!(this_present_nestedFilterQueryIds && that_present_nestedFilterQueryIds)) {
+ if (!(this_present_nestedFilterQueryIds && that_present_nestedFilterQueryIds))
return false;
- }
- if (!this.nestedFilterQueryIds.equals(that.nestedFilterQueryIds)) {
+ if (!this.nestedFilterQueryIds.equals(that.nestedFilterQueryIds))
return false;
- }
}
return true;
@@ -550,39 +531,27 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_id = true;
- list.add(present_id);
- if (present_id) {
- list.add(id);
- }
+ hashCode = hashCode * 8191 + id;
- boolean present_column = true && (isSetColumn());
- list.add(present_column);
- if (present_column) {
- list.add(column);
- }
+ hashCode = hashCode * 8191 + ((isSetColumn()) ? 131071 : 524287);
+ if (isSetColumn())
+ hashCode = hashCode * 8191 + column.hashCode();
- boolean present_value = true && (isSetValue());
- list.add(present_value);
- if (present_value) {
- list.add(value);
- }
+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
+ if (isSetValue())
+ hashCode = hashCode * 8191 + value.hashCode();
- boolean present_operator = true && (isSetOperator());
- list.add(present_operator);
- if (present_operator) {
- list.add(operator.getValue());
- }
+ hashCode = hashCode * 8191 + ((isSetOperator()) ? 131071 : 524287);
+ if (isSetOperator())
+ hashCode = hashCode * 8191 + operator.getValue();
- boolean present_nestedFilterQueryIds = true && (isSetNestedFilterQueryIds());
- list.add(present_nestedFilterQueryIds);
- if (present_nestedFilterQueryIds) {
- list.add(nestedFilterQueryIds);
- }
+ hashCode = hashCode * 8191 + ((isSetNestedFilterQueryIds()) ? 131071 : 524287);
+ if (isSetNestedFilterQueryIds())
+ hashCode = hashCode * 8191 + nestedFilterQueryIds.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -593,7 +562,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
+ lastComparison = java.lang.Boolean.valueOf(isSetId()).compareTo(other.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -603,7 +572,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumn()).compareTo(other.isSetColumn());
if (lastComparison != 0) {
return lastComparison;
}
@@ -613,7 +582,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@@ -623,7 +592,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOperator()).compareTo(other.isSetOperator());
+ lastComparison = java.lang.Boolean.valueOf(isSetOperator()).compareTo(other.isSetOperator());
if (lastComparison != 0) {
return lastComparison;
}
@@ -633,7 +602,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNestedFilterQueryIds()).compareTo(other.isSetNestedFilterQueryIds());
+ lastComparison = java.lang.Boolean.valueOf(isSetNestedFilterQueryIds()).compareTo(other.isSetNestedFilterQueryIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -646,32 +615,29 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("FilterQuery(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("FilterQuery(");
boolean first = true;
sb.append("id:");
sb.append(this.id);
first = false;
if (isSetColumn()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("column:");
if (this.column == null) {
sb.append("null");
@@ -680,9 +646,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
first = false;
}
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("value:");
if (this.value == null) {
sb.append("null");
@@ -691,9 +655,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
first = false;
if (isSetOperator()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("operator:");
if (this.operator == null) {
sb.append("null");
@@ -702,9 +664,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
first = false;
}
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("nestedFilterQueryIds:");
if (this.nestedFilterQueryIds == null) {
sb.append("null");
@@ -716,18 +676,13 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (!isSetId()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString());
- }
-
+ // alas, we cannot check 'id' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -735,8 +690,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -746,21 +700,21 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
}
- private static class FilterQueryStandardSchemeFactory implements SchemeFactory {
+ private static class FilterQueryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public FilterQueryStandardScheme getScheme() {
return new FilterQueryStandardScheme();
}
}
- private static class FilterQueryStandardScheme extends StandardScheme<FilterQuery> {
+ private static class FilterQueryStandardScheme extends org.apache.thrift.scheme.StandardScheme<FilterQuery> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, FilterQuery struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, FilterQuery struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -768,7 +722,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.id = iprot.readI32();
struct.setIdIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -776,7 +730,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.column = iprot.readString();
struct.setColumnIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -784,16 +738,17 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
- struct.value = new ArrayList<String>(_list0.size);
- String _elem1;
- for (int _i2 = 0; _i2 < _list0.size; ++_i2) {
+ struct.value = new java.util.ArrayList<java.lang.String>(_list0.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem1;
+ for (int _i2 = 0; _i2 < _list0.size; ++_i2)
+ {
_elem1 = iprot.readString();
struct.value.add(_elem1);
}
iprot.readListEnd();
}
struct.setValueIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -801,7 +756,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.operator = org.apache.pinot.common.request.FilterOperator.findByValue(iprot.readI32());
struct.setOperatorIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -809,16 +764,17 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
- struct.nestedFilterQueryIds = new ArrayList<Integer>(_list3.size);
+ struct.nestedFilterQueryIds = new java.util.ArrayList<java.lang.Integer>(_list3.size);
int _elem4;
- for (int _i5 = 0; _i5 < _list3.size; ++_i5) {
+ for (int _i5 = 0; _i5 < _list3.size; ++_i5)
+ {
_elem4 = iprot.readI32();
struct.nestedFilterQueryIds.add(_elem4);
}
iprot.readListEnd();
}
struct.setNestedFilterQueryIdsIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -828,11 +784,15 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ if (!struct.isSetId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' was not found in serialized data! Struct: " + toString());
+ }
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, FilterQuery struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, FilterQuery struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -849,9 +809,9 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
{
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.value.size()));
- for (String _iter6 : struct.value) {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.value.size()));
+ for (java.lang.String _iter6 : struct.value)
+ {
oprot.writeString(_iter6);
}
oprot.writeListEnd();
@@ -868,9 +828,9 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (struct.nestedFilterQueryIds != null) {
oprot.writeFieldBegin(NESTED_FILTER_QUERY_IDS_FIELD_DESC);
{
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32,
- struct.nestedFilterQueryIds.size()));
- for (int _iter7 : struct.nestedFilterQueryIds) {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.nestedFilterQueryIds.size()));
+ for (int _iter7 : struct.nestedFilterQueryIds)
+ {
oprot.writeI32(_iter7);
}
oprot.writeListEnd();
@@ -880,22 +840,22 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class FilterQueryTupleSchemeFactory implements SchemeFactory {
+ private static class FilterQueryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public FilterQueryTupleScheme getScheme() {
return new FilterQueryTupleScheme();
}
}
- private static class FilterQueryTupleScheme extends TupleScheme<FilterQuery> {
+ private static class FilterQueryTupleScheme extends org.apache.thrift.scheme.TupleScheme<FilterQuery> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, FilterQuery struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ public void write(org.apache.thrift.protocol.TProtocol prot, FilterQuery struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.id);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetColumn()) {
optionals.set(0);
}
@@ -915,7 +875,8 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (struct.isSetValue()) {
{
oprot.writeI32(struct.value.size());
- for (String _iter8 : struct.value) {
+ for (java.lang.String _iter8 : struct.value)
+ {
oprot.writeString(_iter8);
}
}
@@ -926,7 +887,8 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (struct.isSetNestedFilterQueryIds()) {
{
oprot.writeI32(struct.nestedFilterQueryIds.size());
- for (int _iter9 : struct.nestedFilterQueryIds) {
+ for (int _iter9 : struct.nestedFilterQueryIds)
+ {
oprot.writeI32(_iter9);
}
}
@@ -934,23 +896,22 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, FilterQuery struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ public void read(org.apache.thrift.protocol.TProtocol prot, FilterQuery struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.id = iprot.readI32();
struct.setIdIsSet(true);
- BitSet incoming = iprot.readBitSet(4);
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.column = iprot.readString();
struct.setColumnIsSet(true);
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list10 =
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.value = new ArrayList<String>(_list10.size);
- String _elem11;
- for (int _i12 = 0; _i12 < _list10.size; ++_i12) {
+ org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.value = new java.util.ArrayList<java.lang.String>(_list10.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem11;
+ for (int _i12 = 0; _i12 < _list10.size; ++_i12)
+ {
_elem11 = iprot.readString();
struct.value.add(_elem11);
}
@@ -963,11 +924,11 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TList _list13 =
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.nestedFilterQueryIds = new ArrayList<Integer>(_list13.size);
+ org.apache.thrift.protocol.TList _list13 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
+ struct.nestedFilterQueryIds = new java.util.ArrayList<java.lang.Integer>(_list13.size);
int _elem14;
- for (int _i15 = 0; _i15 < _list13.size; ++_i15) {
+ for (int _i15 = 0; _i15 < _list13.size; ++_i15)
+ {
_elem14 = iprot.readI32();
struct.nestedFilterQueryIds.add(_elem14);
}
@@ -976,5 +937,9 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/FilterQueryMap.java b/pinot-common/src/main/java/org/apache/pinot/common/request/FilterQueryMap.java
index b74f01e..fa9902b 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/FilterQueryMap.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/FilterQueryMap.java
@@ -17,61 +17,38 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* AUTO GENERATED: DO NOT EDIT
* Filter Query is nested but thrift stable version does not support yet (The support is there in top of the trunk but no released jars. Two concerns : stability and onus of maintaining a stable point. Also, its pretty difficult to compile thrift in Linkedin software development environment which is not geared towards c++ dev. Hence, the )
- *
+ *
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, FilterQueryMap._Fields>, java.io.Serializable, Cloneable, Comparable<FilterQueryMap> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("FilterQueryMap");
-
- private static final org.apache.thrift.protocol.TField FILTER_QUERY_MAP_FIELD_DESC =
- new org.apache.thrift.protocol.TField("filterQueryMap", org.apache.thrift.protocol.TType.MAP, (short) 1);
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("FilterQueryMap");
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.protocol.TField FILTER_QUERY_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("filterQueryMap", org.apache.thrift.protocol.TType.MAP, (short)1);
- static {
- schemes.put(StandardScheme.class, new FilterQueryMapStandardSchemeFactory());
- schemes.put(TupleScheme.class, new FilterQueryMapTupleSchemeFactory());
- }
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new FilterQueryMapStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new FilterQueryMapTupleSchemeFactory();
- private Map<Integer, FilterQuery> filterQueryMap; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Integer,FilterQuery> filterQueryMap; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- FILTER_QUERY_MAP((short) 1, "filterQueryMap");
+ FILTER_QUERY_MAP((short)1, "filterQueryMap");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -79,8 +56,9 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // FILTER_QUERY_MAP
return FILTER_QUERY_MAP;
default:
@@ -94,23 +72,22 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -119,25 +96,21 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.FILTER_QUERY_MAP};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.FILTER_QUERY_MAP, new org.apache.thrift.meta_data.FieldMetaData("filterQueryMap",
- 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.I32),
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
- FilterQuery.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ 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.FILTER_QUERY_MAP, new org.apache.thrift.meta_data.FieldMetaData("filterQueryMap", 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.I32),
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, FilterQuery.class))));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FilterQueryMap.class, metaDataMap);
}
@@ -149,13 +122,13 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
*/
public FilterQueryMap(FilterQueryMap other) {
if (other.isSetFilterQueryMap()) {
- Map<Integer, FilterQuery> __this__filterQueryMap = new HashMap<Integer, FilterQuery>(other.filterQueryMap.size());
- for (Map.Entry<Integer, FilterQuery> other_element : other.filterQueryMap.entrySet()) {
+ java.util.Map<java.lang.Integer,FilterQuery> __this__filterQueryMap = new java.util.HashMap<java.lang.Integer,FilterQuery>(other.filterQueryMap.size());
+ for (java.util.Map.Entry<java.lang.Integer, FilterQuery> other_element : other.filterQueryMap.entrySet()) {
- Integer other_element_key = other_element.getKey();
+ java.lang.Integer other_element_key = other_element.getKey();
FilterQuery other_element_value = other_element.getValue();
- Integer __this__filterQueryMap_copy_key = other_element_key;
+ java.lang.Integer __this__filterQueryMap_copy_key = other_element_key;
FilterQuery __this__filterQueryMap_copy_value = new FilterQuery(other_element_value);
@@ -180,17 +153,19 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
public void putToFilterQueryMap(int key, FilterQuery val) {
if (this.filterQueryMap == null) {
- this.filterQueryMap = new HashMap<Integer, FilterQuery>();
+ this.filterQueryMap = new java.util.HashMap<java.lang.Integer,FilterQuery>();
}
this.filterQueryMap.put(key, val);
}
- public Map<Integer, FilterQuery> getFilterQueryMap() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.Integer,FilterQuery> getFilterQueryMap() {
return this.filterQueryMap;
}
- public void setFilterQueryMap(Map<Integer, FilterQuery> filterQueryMap) {
+ public FilterQueryMap setFilterQueryMap(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Integer,FilterQuery> filterQueryMap) {
this.filterQueryMap = filterQueryMap;
+ return this;
}
public void unsetFilterQueryMap() {
@@ -208,64 +183,64 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case FILTER_QUERY_MAP:
- if (value == null) {
- unsetFilterQueryMap();
- } else {
- setFilterQueryMap((Map<Integer, FilterQuery>) value);
- }
- break;
+ case FILTER_QUERY_MAP:
+ if (value == null) {
+ unsetFilterQueryMap();
+ } else {
+ setFilterQueryMap((java.util.Map<java.lang.Integer,FilterQuery>)value);
+ }
+ break;
+
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case FILTER_QUERY_MAP:
- return getFilterQueryMap();
+ case FILTER_QUERY_MAP:
+ return getFilterQueryMap();
+
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case FILTER_QUERY_MAP:
- return isSetFilterQueryMap();
+ case FILTER_QUERY_MAP:
+ return isSetFilterQueryMap();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof FilterQueryMap) {
- return this.equals((FilterQueryMap) that);
- }
+ if (that instanceof FilterQueryMap)
+ return this.equals((FilterQueryMap)that);
return false;
}
public boolean equals(FilterQueryMap that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_filterQueryMap = true && this.isSetFilterQueryMap();
boolean that_present_filterQueryMap = true && that.isSetFilterQueryMap();
if (this_present_filterQueryMap || that_present_filterQueryMap) {
- if (!(this_present_filterQueryMap && that_present_filterQueryMap)) {
+ if (!(this_present_filterQueryMap && that_present_filterQueryMap))
return false;
- }
- if (!this.filterQueryMap.equals(that.filterQueryMap)) {
+ if (!this.filterQueryMap.equals(that.filterQueryMap))
return false;
- }
}
return true;
@@ -273,15 +248,13 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_filterQueryMap = true && (isSetFilterQueryMap());
- list.add(present_filterQueryMap);
- if (present_filterQueryMap) {
- list.add(filterQueryMap);
- }
+ hashCode = hashCode * 8191 + ((isSetFilterQueryMap()) ? 131071 : 524287);
+ if (isSetFilterQueryMap())
+ hashCode = hashCode * 8191 + filterQueryMap.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -292,7 +265,7 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetFilterQueryMap()).compareTo(other.isSetFilterQueryMap());
+ lastComparison = java.lang.Boolean.valueOf(isSetFilterQueryMap()).compareTo(other.isSetFilterQueryMap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -305,23 +278,22 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("FilterQueryMap(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("FilterQueryMap(");
boolean first = true;
if (isSetFilterQueryMap()) {
@@ -337,14 +309,12 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -352,8 +322,7 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -361,21 +330,21 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
}
}
- private static class FilterQueryMapStandardSchemeFactory implements SchemeFactory {
+ private static class FilterQueryMapStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public FilterQueryMapStandardScheme getScheme() {
return new FilterQueryMapStandardScheme();
}
}
- private static class FilterQueryMapStandardScheme extends StandardScheme<FilterQueryMap> {
+ private static class FilterQueryMapStandardScheme extends org.apache.thrift.scheme.StandardScheme<FilterQueryMap> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, FilterQueryMap struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, FilterQueryMap struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -383,10 +352,11 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map16 = iprot.readMapBegin();
- struct.filterQueryMap = new HashMap<Integer, FilterQuery>(2 * _map16.size);
+ struct.filterQueryMap = new java.util.HashMap<java.lang.Integer,FilterQuery>(2*_map16.size);
int _key17;
- FilterQuery _val18;
- for (int _i19 = 0; _i19 < _map16.size; ++_i19) {
+ @org.apache.thrift.annotation.Nullable FilterQuery _val18;
+ for (int _i19 = 0; _i19 < _map16.size; ++_i19)
+ {
_key17 = iprot.readI32();
_val18 = new FilterQuery();
_val18.read(iprot);
@@ -395,7 +365,7 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
iprot.readMapEnd();
}
struct.setFilterQueryMapIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -405,11 +375,12 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, FilterQueryMap struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, FilterQueryMap struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -417,9 +388,9 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
if (struct.isSetFilterQueryMap()) {
oprot.writeFieldBegin(FILTER_QUERY_MAP_FIELD_DESC);
{
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32,
- org.apache.thrift.protocol.TType.STRUCT, struct.filterQueryMap.size()));
- for (Map.Entry<Integer, FilterQuery> _iter20 : struct.filterQueryMap.entrySet()) {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, struct.filterQueryMap.size()));
+ for (java.util.Map.Entry<java.lang.Integer, FilterQuery> _iter20 : struct.filterQueryMap.entrySet())
+ {
oprot.writeI32(_iter20.getKey());
_iter20.getValue().write(oprot);
}
@@ -431,21 +402,21 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class FilterQueryMapTupleSchemeFactory implements SchemeFactory {
+ private static class FilterQueryMapTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public FilterQueryMapTupleScheme getScheme() {
return new FilterQueryMapTupleScheme();
}
}
- private static class FilterQueryMapTupleScheme extends TupleScheme<FilterQueryMap> {
+ private static class FilterQueryMapTupleScheme extends org.apache.thrift.scheme.TupleScheme<FilterQueryMap> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, FilterQueryMap struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ public void write(org.apache.thrift.protocol.TProtocol prot, FilterQueryMap struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetFilterQueryMap()) {
optionals.set(0);
}
@@ -453,7 +424,8 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
if (struct.isSetFilterQueryMap()) {
{
oprot.writeI32(struct.filterQueryMap.size());
- for (Map.Entry<Integer, FilterQuery> _iter21 : struct.filterQueryMap.entrySet()) {
+ for (java.util.Map.Entry<java.lang.Integer, FilterQuery> _iter21 : struct.filterQueryMap.entrySet())
+ {
oprot.writeI32(_iter21.getKey());
_iter21.getValue().write(oprot);
}
@@ -462,19 +434,17 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, FilterQueryMap struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ public void read(org.apache.thrift.protocol.TProtocol prot, FilterQueryMap struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TMap _map22 =
- new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32,
- org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.filterQueryMap = new HashMap<Integer, FilterQuery>(2 * _map22.size);
+ org.apache.thrift.protocol.TMap _map22 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.filterQueryMap = new java.util.HashMap<java.lang.Integer,FilterQuery>(2*_map22.size);
int _key23;
- FilterQuery _val24;
- for (int _i25 = 0; _i25 < _map22.size; ++_i25) {
+ @org.apache.thrift.annotation.Nullable FilterQuery _val24;
+ for (int _i25 = 0; _i25 < _map22.size; ++_i25)
+ {
_key23 = iprot.readI32();
_val24 = new FilterQuery();
_val24.read(iprot);
@@ -485,5 +455,9 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
}
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/Function.java b/pinot-common/src/main/java/org/apache/pinot/common/request/Function.java
index 3e9e8d2..300dd3e 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/Function.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/Function.java
@@ -17,59 +17,36 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class Function implements org.apache.thrift.TBase<Function, Function._Fields>, java.io.Serializable, Cloneable, Comparable<Function> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("Function");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Function");
- private static final org.apache.thrift.protocol.TField OPERATOR_FIELD_DESC =
- new org.apache.thrift.protocol.TField("operator", org.apache.thrift.protocol.TType.STRING, (short) 1);
- private static final org.apache.thrift.protocol.TField OPERANDS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("operands", org.apache.thrift.protocol.TType.LIST, (short) 2);
+ private static final org.apache.thrift.protocol.TField OPERATOR_FIELD_DESC = new org.apache.thrift.protocol.TField("operator", org.apache.thrift.protocol.TType.STRING, (short)1);
+ private static final org.apache.thrift.protocol.TField OPERANDS_FIELD_DESC = new org.apache.thrift.protocol.TField("operands", org.apache.thrift.protocol.TType.LIST, (short)2);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new FunctionStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new FunctionTupleSchemeFactory();
- static {
- schemes.put(StandardScheme.class, new FunctionStandardSchemeFactory());
- schemes.put(TupleScheme.class, new FunctionTupleSchemeFactory());
- }
-
- private String operator; // required
- private List<Expression> operands; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String operator; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<Expression> operands; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- OPERATOR((short) 1, "operator"), OPERANDS((short) 2, "operands");
+ OPERATOR((short)1, "operator"),
+ OPERANDS((short)2, "operands");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -77,8 +54,9 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // OPERATOR
return OPERATOR;
case 2: // OPERANDS
@@ -94,23 +72,22 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -119,34 +96,31 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.OPERANDS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.OPERATOR,
- new org.apache.thrift.meta_data.FieldMetaData("operator", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- tmpMap.put(_Fields.OPERANDS,
- new org.apache.thrift.meta_data.FieldMetaData("operands", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
- Expression.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ 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.OPERATOR, new org.apache.thrift.meta_data.FieldMetaData("operator", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ tmpMap.put(_Fields.OPERANDS, new org.apache.thrift.meta_data.FieldMetaData("operands", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, Expression.class))));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Function.class, metaDataMap);
}
public Function() {
}
- public Function(String operator) {
+ public Function(
+ java.lang.String operator)
+ {
this();
this.operator = operator;
}
@@ -159,7 +133,7 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
this.operator = other.operator;
}
if (other.isSetOperands()) {
- List<Expression> __this__operands = new ArrayList<Expression>(other.operands.size());
+ java.util.List<Expression> __this__operands = new java.util.ArrayList<Expression>(other.operands.size());
for (Expression other_element : other.operands) {
__this__operands.add(new Expression(other_element));
}
@@ -177,12 +151,14 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
this.operands = null;
}
- public String getOperator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getOperator() {
return this.operator;
}
- public void setOperator(String operator) {
+ public Function setOperator(@org.apache.thrift.annotation.Nullable java.lang.String operator) {
this.operator = operator;
+ return this;
}
public void unsetOperator() {
@@ -204,23 +180,26 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
return (this.operands == null) ? 0 : this.operands.size();
}
+ @org.apache.thrift.annotation.Nullable
public java.util.Iterator<Expression> getOperandsIterator() {
return (this.operands == null) ? null : this.operands.iterator();
}
public void addToOperands(Expression elem) {
if (this.operands == null) {
- this.operands = new ArrayList<Expression>();
+ this.operands = new java.util.ArrayList<Expression>();
}
this.operands.add(elem);
}
- public List<Expression> getOperands() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<Expression> getOperands() {
return this.operands;
}
- public void setOperands(List<Expression> operands) {
+ public Function setOperands(@org.apache.thrift.annotation.Nullable java.util.List<Expression> operands) {
this.operands = operands;
+ return this;
}
public void unsetOperands() {
@@ -238,88 +217,86 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case OPERATOR:
- if (value == null) {
- unsetOperator();
- } else {
- setOperator((String) value);
- }
- break;
+ case OPERATOR:
+ if (value == null) {
+ unsetOperator();
+ } else {
+ setOperator((java.lang.String)value);
+ }
+ break;
+
+ case OPERANDS:
+ if (value == null) {
+ unsetOperands();
+ } else {
+ setOperands((java.util.List<Expression>)value);
+ }
+ break;
- case OPERANDS:
- if (value == null) {
- unsetOperands();
- } else {
- setOperands((List<Expression>) value);
- }
- break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case OPERATOR:
- return getOperator();
+ case OPERATOR:
+ return getOperator();
+
+ case OPERANDS:
+ return getOperands();
- case OPERANDS:
- return getOperands();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case OPERATOR:
- return isSetOperator();
- case OPERANDS:
- return isSetOperands();
+ case OPERATOR:
+ return isSetOperator();
+ case OPERANDS:
+ return isSetOperands();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof Function) {
- return this.equals((Function) that);
- }
+ if (that instanceof Function)
+ return this.equals((Function)that);
return false;
}
public boolean equals(Function that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_operator = true && this.isSetOperator();
boolean that_present_operator = true && that.isSetOperator();
if (this_present_operator || that_present_operator) {
- if (!(this_present_operator && that_present_operator)) {
+ if (!(this_present_operator && that_present_operator))
return false;
- }
- if (!this.operator.equals(that.operator)) {
+ if (!this.operator.equals(that.operator))
return false;
- }
}
boolean this_present_operands = true && this.isSetOperands();
boolean that_present_operands = true && that.isSetOperands();
if (this_present_operands || that_present_operands) {
- if (!(this_present_operands && that_present_operands)) {
+ if (!(this_present_operands && that_present_operands))
return false;
- }
- if (!this.operands.equals(that.operands)) {
+ if (!this.operands.equals(that.operands))
return false;
- }
}
return true;
@@ -327,21 +304,17 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_operator = true && (isSetOperator());
- list.add(present_operator);
- if (present_operator) {
- list.add(operator);
- }
+ hashCode = hashCode * 8191 + ((isSetOperator()) ? 131071 : 524287);
+ if (isSetOperator())
+ hashCode = hashCode * 8191 + operator.hashCode();
- boolean present_operands = true && (isSetOperands());
- list.add(present_operands);
- if (present_operands) {
- list.add(operands);
- }
+ hashCode = hashCode * 8191 + ((isSetOperands()) ? 131071 : 524287);
+ if (isSetOperands())
+ hashCode = hashCode * 8191 + operands.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -352,7 +325,7 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetOperator()).compareTo(other.isSetOperator());
+ lastComparison = java.lang.Boolean.valueOf(isSetOperator()).compareTo(other.isSetOperator());
if (lastComparison != 0) {
return lastComparison;
}
@@ -362,7 +335,7 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOperands()).compareTo(other.isSetOperands());
+ lastComparison = java.lang.Boolean.valueOf(isSetOperands()).compareTo(other.isSetOperands());
if (lastComparison != 0) {
return lastComparison;
}
@@ -375,23 +348,22 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Function(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Function(");
boolean first = true;
sb.append("operator:");
@@ -402,9 +374,7 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
}
first = false;
if (isSetOperands()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("operands:");
if (this.operands == null) {
sb.append("null");
@@ -417,19 +387,15 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (!isSetOperator()) {
- throw new org.apache.thrift.protocol.TProtocolException(
- "Required field 'operator' is unset! Struct:" + toString());
+ if (operator == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'operator' was not present! Struct: " + toString());
}
-
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -437,8 +403,7 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -446,21 +411,21 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
}
}
- private static class FunctionStandardSchemeFactory implements SchemeFactory {
+ private static class FunctionStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public FunctionStandardScheme getScheme() {
return new FunctionStandardScheme();
}
}
- private static class FunctionStandardScheme extends StandardScheme<Function> {
+ private static class FunctionStandardScheme extends org.apache.thrift.scheme.StandardScheme<Function> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, Function struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Function struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -468,25 +433,26 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.operator = iprot.readString();
struct.setOperatorIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // OPERANDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
- struct.operands = new ArrayList<Expression>(_list52.size);
- Expression _elem53;
- for (int _i54 = 0; _i54 < _list52.size; ++_i54) {
- _elem53 = new Expression();
- _elem53.read(iprot);
- struct.operands.add(_elem53);
+ org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
+ struct.operands = new java.util.ArrayList<Expression>(_list44.size);
+ @org.apache.thrift.annotation.Nullable Expression _elem45;
+ for (int _i46 = 0; _i46 < _list44.size; ++_i46)
+ {
+ _elem45 = new Expression();
+ _elem45.read(iprot);
+ struct.operands.add(_elem45);
}
iprot.readListEnd();
}
struct.setOperandsIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -496,11 +462,12 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, Function struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Function struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -513,10 +480,10 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
if (struct.isSetOperands()) {
oprot.writeFieldBegin(OPERANDS_FIELD_DESC);
{
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.operands.size()));
- for (Expression _iter55 : struct.operands) {
- _iter55.write(oprot);
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.operands.size()));
+ for (Expression _iter47 : struct.operands)
+ {
+ _iter47.write(oprot);
}
oprot.writeListEnd();
}
@@ -526,22 +493,22 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class FunctionTupleSchemeFactory implements SchemeFactory {
+ private static class FunctionTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public FunctionTupleScheme getScheme() {
return new FunctionTupleScheme();
}
}
- private static class FunctionTupleScheme extends TupleScheme<Function> {
+ private static class FunctionTupleScheme extends org.apache.thrift.scheme.TupleScheme<Function> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Function struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ public void write(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.operator);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetOperands()) {
optionals.set(0);
}
@@ -549,35 +516,39 @@ public class Function implements org.apache.thrift.TBase<Function, Function._Fie
if (struct.isSetOperands()) {
{
oprot.writeI32(struct.operands.size());
- for (Expression _iter56 : struct.operands) {
- _iter56.write(oprot);
+ for (Expression _iter48 : struct.operands)
+ {
+ _iter48.write(oprot);
}
}
}
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Function struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ public void read(org.apache.thrift.protocol.TProtocol prot, Function struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.operator = iprot.readString();
struct.setOperatorIsSet(true);
- BitSet incoming = iprot.readBitSet(1);
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list57 =
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.operands = new ArrayList<Expression>(_list57.size);
- Expression _elem58;
- for (int _i59 = 0; _i59 < _list57.size; ++_i59) {
- _elem58 = new Expression();
- _elem58.read(iprot);
- struct.operands.add(_elem58);
+ org.apache.thrift.protocol.TList _list49 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.operands = new java.util.ArrayList<Expression>(_list49.size);
+ @org.apache.thrift.annotation.Nullable Expression _elem50;
+ for (int _i51 = 0; _i51 < _list49.size; ++_i51)
+ {
+ _elem50 = new Expression();
+ _elem50.read(iprot);
+ struct.operands.add(_elem50);
}
}
struct.setOperandsIsSet(true);
}
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/GroupBy.java b/pinot-common/src/main/java/org/apache/pinot/common/request/GroupBy.java
index bfe9d57..f055b11 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/GroupBy.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/GroupBy.java
@@ -17,68 +17,44 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* AUTO GENERATED: DO NOT EDIT
* GroupBy
- *
+ *
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields>, java.io.Serializable, Cloneable, Comparable<GroupBy> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("GroupBy");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("GroupBy");
- private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short) 1);
- private static final org.apache.thrift.protocol.TField TOP_N_FIELD_DESC =
- new org.apache.thrift.protocol.TField("topN", org.apache.thrift.protocol.TType.I64, (short) 2);
- private static final org.apache.thrift.protocol.TField EXPRESSIONS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("expressions", org.apache.thrift.protocol.TType.LIST, (short) 3);
+ private static final org.apache.thrift.protocol.TField COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("columns", org.apache.thrift.protocol.TType.LIST, (short)1);
+ private static final org.apache.thrift.protocol.TField TOP_N_FIELD_DESC = new org.apache.thrift.protocol.TField("topN", org.apache.thrift.protocol.TType.I64, (short)2);
+ private static final org.apache.thrift.protocol.TField EXPRESSIONS_FIELD_DESC = new org.apache.thrift.protocol.TField("expressions", org.apache.thrift.protocol.TType.LIST, (short)3);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new GroupByStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new GroupByTupleSchemeFactory();
- static {
- schemes.put(StandardScheme.class, new GroupByStandardSchemeFactory());
- schemes.put(TupleScheme.class, new GroupByTupleSchemeFactory());
- }
-
- private List<String> columns; // optional
- private long topN; // optional
- private List<String> expressions; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> columns; // optional
+ public long topN; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> expressions; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- COLUMNS((short) 1, "columns"), TOP_N((short) 2, "topN"), EXPRESSIONS((short) 3, "expressions");
+ COLUMNS((short)1, "columns"),
+ TOP_N((short)2, "topN"),
+ EXPRESSIONS((short)3, "expressions");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -86,8 +62,9 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // COLUMNS
return COLUMNS;
case 2: // TOP_N
@@ -105,23 +82,22 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -130,7 +106,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -138,24 +114,19 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
// isset id assignments
private static final int __TOPN_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.COLUMNS, _Fields.TOP_N, _Fields.EXPRESSIONS};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ private static final _Fields optionals[] = {_Fields.COLUMNS,_Fields.TOP_N,_Fields.EXPRESSIONS};
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.COLUMNS,
- new org.apache.thrift.meta_data.FieldMetaData("columns", 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))));
- tmpMap.put(_Fields.TOP_N,
- new org.apache.thrift.meta_data.FieldMetaData("topN", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- 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 = Collections.unmodifiableMap(tmpMap);
+ 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.COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("columns", 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))));
+ tmpMap.put(_Fields.TOP_N, new org.apache.thrift.meta_data.FieldMetaData("topN", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ 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(GroupBy.class, metaDataMap);
}
@@ -168,12 +139,12 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
public GroupBy(GroupBy other) {
__isset_bitfield = other.__isset_bitfield;
if (other.isSetColumns()) {
- List<String> __this__columns = new ArrayList<String>(other.columns);
+ java.util.List<java.lang.String> __this__columns = new java.util.ArrayList<java.lang.String>(other.columns);
this.columns = __this__columns;
}
this.topN = other.topN;
if (other.isSetExpressions()) {
- List<String> __this__expressions = new ArrayList<String>(other.expressions);
+ java.util.List<java.lang.String> __this__expressions = new java.util.ArrayList<java.lang.String>(other.expressions);
this.expressions = __this__expressions;
}
}
@@ -194,23 +165,26 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
return (this.columns == null) ? 0 : this.columns.size();
}
- public java.util.Iterator<String> getColumnsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getColumnsIterator() {
return (this.columns == null) ? null : this.columns.iterator();
}
- public void addToColumns(String elem) {
+ public void addToColumns(java.lang.String elem) {
if (this.columns == null) {
- this.columns = new ArrayList<String>();
+ this.columns = new java.util.ArrayList<java.lang.String>();
}
this.columns.add(elem);
}
- public List<String> getColumns() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getColumns() {
return this.columns;
}
- public void setColumns(List<String> columns) {
+ public GroupBy setColumns(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> columns) {
this.columns = columns;
+ return this;
}
public void unsetColumns() {
@@ -232,45 +206,49 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
return this.topN;
}
- public void setTopN(long topN) {
+ public GroupBy setTopN(long topN) {
this.topN = topN;
setTopNIsSet(true);
+ return this;
}
public void unsetTopN() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TOPN_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __TOPN_ISSET_ID);
}
/** Returns true if field topN is set (has been assigned a value) and false otherwise */
public boolean isSetTopN() {
- return EncodingUtils.testBit(__isset_bitfield, __TOPN_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __TOPN_ISSET_ID);
}
public void setTopNIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TOPN_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __TOPN_ISSET_ID, value);
}
public int getExpressionsSize() {
return (this.expressions == null) ? 0 : this.expressions.size();
}
- public java.util.Iterator<String> getExpressionsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getExpressionsIterator() {
return (this.expressions == null) ? null : this.expressions.iterator();
}
- public void addToExpressions(String elem) {
+ public void addToExpressions(java.lang.String elem) {
if (this.expressions == null) {
- this.expressions = new ArrayList<String>();
+ this.expressions = new java.util.ArrayList<java.lang.String>();
}
this.expressions.add(elem);
}
- public List<String> getExpressions() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getExpressions() {
return this.expressions;
}
- public void setExpressions(List<String> expressions) {
+ public GroupBy setExpressions(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> expressions) {
this.expressions = expressions;
+ return this;
}
public void unsetExpressions() {
@@ -288,112 +266,108 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case COLUMNS:
- if (value == null) {
- unsetColumns();
- } else {
- setColumns((List<String>) value);
- }
- break;
+ case COLUMNS:
+ if (value == null) {
+ unsetColumns();
+ } else {
+ setColumns((java.util.List<java.lang.String>)value);
+ }
+ break;
- case TOP_N:
- if (value == null) {
- unsetTopN();
- } else {
- setTopN((Long) value);
- }
- break;
+ case TOP_N:
+ if (value == null) {
+ unsetTopN();
+ } else {
+ setTopN((java.lang.Long)value);
+ }
+ break;
+
+ case EXPRESSIONS:
+ if (value == null) {
+ unsetExpressions();
+ } else {
+ setExpressions((java.util.List<java.lang.String>)value);
+ }
+ break;
- case EXPRESSIONS:
- if (value == null) {
- unsetExpressions();
- } else {
- setExpressions((List<String>) value);
- }
- break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case COLUMNS:
- return getColumns();
+ case COLUMNS:
+ return getColumns();
+
+ case TOP_N:
+ return getTopN();
- case TOP_N:
- return getTopN();
+ case EXPRESSIONS:
+ return getExpressions();
- case EXPRESSIONS:
- return getExpressions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case COLUMNS:
- return isSetColumns();
- case TOP_N:
- return isSetTopN();
- case EXPRESSIONS:
- return isSetExpressions();
+ case COLUMNS:
+ return isSetColumns();
+ case TOP_N:
+ return isSetTopN();
+ case EXPRESSIONS:
+ return isSetExpressions();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof GroupBy) {
- return this.equals((GroupBy) that);
- }
+ if (that instanceof GroupBy)
+ return this.equals((GroupBy)that);
return false;
}
public boolean equals(GroupBy that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_columns = true && this.isSetColumns();
boolean that_present_columns = true && that.isSetColumns();
if (this_present_columns || that_present_columns) {
- if (!(this_present_columns && that_present_columns)) {
+ if (!(this_present_columns && that_present_columns))
return false;
- }
- if (!this.columns.equals(that.columns)) {
+ if (!this.columns.equals(that.columns))
return false;
- }
}
boolean this_present_topN = true && this.isSetTopN();
boolean that_present_topN = true && that.isSetTopN();
if (this_present_topN || that_present_topN) {
- if (!(this_present_topN && that_present_topN)) {
+ if (!(this_present_topN && that_present_topN))
return false;
- }
- if (this.topN != that.topN) {
+ if (this.topN != that.topN)
return false;
- }
}
boolean this_present_expressions = true && this.isSetExpressions();
boolean that_present_expressions = true && that.isSetExpressions();
if (this_present_expressions || that_present_expressions) {
- if (!(this_present_expressions && that_present_expressions)) {
+ if (!(this_present_expressions && that_present_expressions))
return false;
- }
- if (!this.expressions.equals(that.expressions)) {
+ if (!this.expressions.equals(that.expressions))
return false;
- }
}
return true;
@@ -401,27 +375,21 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_columns = true && (isSetColumns());
- list.add(present_columns);
- if (present_columns) {
- list.add(columns);
- }
+ hashCode = hashCode * 8191 + ((isSetColumns()) ? 131071 : 524287);
+ if (isSetColumns())
+ hashCode = hashCode * 8191 + columns.hashCode();
- boolean present_topN = true && (isSetTopN());
- list.add(present_topN);
- if (present_topN) {
- list.add(topN);
- }
+ hashCode = hashCode * 8191 + ((isSetTopN()) ? 131071 : 524287);
+ if (isSetTopN())
+ hashCode = hashCode * 8191 + org.apache.thrift.TBaseHelper.hashCode(topN);
- boolean present_expressions = true && (isSetExpressions());
- list.add(present_expressions);
- if (present_expressions) {
- list.add(expressions);
- }
+ hashCode = hashCode * 8191 + ((isSetExpressions()) ? 131071 : 524287);
+ if (isSetExpressions())
+ hashCode = hashCode * 8191 + expressions.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -432,7 +400,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
+ lastComparison = java.lang.Boolean.valueOf(isSetColumns()).compareTo(other.isSetColumns());
if (lastComparison != 0) {
return lastComparison;
}
@@ -442,7 +410,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetTopN()).compareTo(other.isSetTopN());
+ lastComparison = java.lang.Boolean.valueOf(isSetTopN()).compareTo(other.isSetTopN());
if (lastComparison != 0) {
return lastComparison;
}
@@ -452,7 +420,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetExpressions()).compareTo(other.isSetExpressions());
+ lastComparison = java.lang.Boolean.valueOf(isSetExpressions()).compareTo(other.isSetExpressions());
if (lastComparison != 0) {
return lastComparison;
}
@@ -465,23 +433,22 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("GroupBy(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("GroupBy(");
boolean first = true;
if (isSetColumns()) {
@@ -494,17 +461,13 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
first = false;
}
if (isSetTopN()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("topN:");
sb.append(this.topN);
first = false;
}
if (isSetExpressions()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("expressions:");
if (this.expressions == null) {
sb.append("null");
@@ -517,14 +480,12 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -532,8 +493,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -543,21 +503,21 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
}
}
- private static class GroupByStandardSchemeFactory implements SchemeFactory {
+ private static class GroupByStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupByStandardScheme getScheme() {
return new GroupByStandardScheme();
}
}
- private static class GroupByStandardScheme extends StandardScheme<GroupBy> {
+ private static class GroupByStandardScheme extends org.apache.thrift.scheme.StandardScheme<GroupBy> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, GroupBy struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, GroupBy struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -565,16 +525,17 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list62 = iprot.readListBegin();
- struct.columns = new ArrayList<String>(_list62.size);
- String _elem63;
- for (int _i64 = 0; _i64 < _list62.size; ++_i64) {
+ struct.columns = new java.util.ArrayList<java.lang.String>(_list62.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem63;
+ for (int _i64 = 0; _i64 < _list62.size; ++_i64)
+ {
_elem63 = iprot.readString();
struct.columns.add(_elem63);
}
iprot.readListEnd();
}
struct.setColumnsIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -582,7 +543,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.I64) {
struct.topN = iprot.readI64();
struct.setTopNIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -590,16 +551,17 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list65 = iprot.readListBegin();
- struct.expressions = new ArrayList<String>(_list65.size);
- String _elem66;
- for (int _i67 = 0; _i67 < _list65.size; ++_i67) {
+ struct.expressions = new java.util.ArrayList<java.lang.String>(_list65.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem66;
+ for (int _i67 = 0; _i67 < _list65.size; ++_i67)
+ {
_elem66 = iprot.readString();
struct.expressions.add(_elem66);
}
iprot.readListEnd();
}
struct.setExpressionsIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -609,11 +571,12 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, GroupBy struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, GroupBy struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -621,9 +584,9 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
if (struct.isSetColumns()) {
oprot.writeFieldBegin(COLUMNS_FIELD_DESC);
{
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
- for (String _iter68 : struct.columns) {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
+ for (java.lang.String _iter68 : struct.columns)
+ {
oprot.writeString(_iter68);
}
oprot.writeListEnd();
@@ -640,9 +603,9 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
if (struct.isSetExpressions()) {
oprot.writeFieldBegin(EXPRESSIONS_FIELD_DESC);
{
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
- struct.expressions.size()));
- for (String _iter69 : struct.expressions) {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.expressions.size()));
+ for (java.lang.String _iter69 : struct.expressions)
+ {
oprot.writeString(_iter69);
}
oprot.writeListEnd();
@@ -653,21 +616,21 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class GroupByTupleSchemeFactory implements SchemeFactory {
+ private static class GroupByTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public GroupByTupleScheme getScheme() {
return new GroupByTupleScheme();
}
}
- private static class GroupByTupleScheme extends TupleScheme<GroupBy> {
+ private static class GroupByTupleScheme extends org.apache.thrift.scheme.TupleScheme<GroupBy> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, GroupBy struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ public void write(org.apache.thrift.protocol.TProtocol prot, GroupBy struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetColumns()) {
optionals.set(0);
}
@@ -681,7 +644,8 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
- for (String _iter70 : struct.columns) {
+ for (java.lang.String _iter70 : struct.columns)
+ {
oprot.writeString(_iter70);
}
}
@@ -692,7 +656,8 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
if (struct.isSetExpressions()) {
{
oprot.writeI32(struct.expressions.size());
- for (String _iter71 : struct.expressions) {
+ for (java.lang.String _iter71 : struct.expressions)
+ {
oprot.writeString(_iter71);
}
}
@@ -700,17 +665,16 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, GroupBy struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(3);
+ public void read(org.apache.thrift.protocol.TProtocol prot, GroupBy struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list72 =
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.columns = new ArrayList<String>(_list72.size);
- String _elem73;
- for (int _i74 = 0; _i74 < _list72.size; ++_i74) {
+ org.apache.thrift.protocol.TList _list72 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.columns = new java.util.ArrayList<java.lang.String>(_list72.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem73;
+ for (int _i74 = 0; _i74 < _list72.size; ++_i74)
+ {
_elem73 = iprot.readString();
struct.columns.add(_elem73);
}
@@ -723,11 +687,11 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list75 =
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.expressions = new ArrayList<String>(_list75.size);
- String _elem76;
- for (int _i77 = 0; _i77 < _list75.size; ++_i77) {
+ org.apache.thrift.protocol.TList _list75 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.expressions = new java.util.ArrayList<java.lang.String>(_list75.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem76;
+ for (int _i77 = 0; _i77 < _list75.size; ++_i77)
+ {
_elem76 = iprot.readString();
struct.expressions.add(_elem76);
}
@@ -736,5 +700,9 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
}
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/HavingFilterQuery.java b/pinot-common/src/main/java/org/apache/pinot/common/request/HavingFilterQuery.java
index ff59b0c..f2cda61 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/HavingFilterQuery.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/HavingFilterQuery.java
@@ -17,83 +17,64 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* AUTO GENERATED: DO NOT EDIT
* Having Filter query
- *
+ *
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQuery, HavingFilterQuery._Fields>, java.io.Serializable, Cloneable, Comparable<HavingFilterQuery> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("HavingFilterQuery");
-
- private static final org.apache.thrift.protocol.TField ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short) 1);
- private static final org.apache.thrift.protocol.TField AGGREGATION_INFO_FIELD_DESC =
- new org.apache.thrift.protocol.TField("aggregationInfo", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
- private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC =
- new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.LIST, (short) 3);
- private static final org.apache.thrift.protocol.TField OPERATOR_FIELD_DESC =
- new org.apache.thrift.protocol.TField("operator", org.apache.thrift.protocol.TType.I32, (short) 4);
- private static final org.apache.thrift.protocol.TField NESTED_FILTER_QUERY_IDS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("nestedFilterQueryIds", org.apache.thrift.protocol.TType.LIST, (short) 5);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HavingFilterQuery");
- static {
- schemes.put(StandardScheme.class, new HavingFilterQueryStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HavingFilterQueryTupleSchemeFactory());
- }
+ private static final org.apache.thrift.protocol.TField ID_FIELD_DESC = new org.apache.thrift.protocol.TField("id", org.apache.thrift.protocol.TType.I32, (short)1);
+ private static final org.apache.thrift.protocol.TField AGGREGATION_INFO_FIELD_DESC = new org.apache.thrift.protocol.TField("aggregationInfo", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("value", org.apache.thrift.protocol.TType.LIST, (short)3);
+ private static final org.apache.thrift.protocol.TField OPERATOR_FIELD_DESC = new org.apache.thrift.protocol.TField("operator", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final org.apache.thrift.protocol.TField NESTED_FILTER_QUERY_IDS_FIELD_DESC = new org.apache.thrift.protocol.TField("nestedFilterQueryIds", org.apache.thrift.protocol.TType.LIST, (short)5);
- private int id; // required
- private AggregationInfo aggregationInfo; // optional
- private List<String> value; // required
- private FilterOperator operator; // optional
- private List<Integer> nestedFilterQueryIds; // required
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HavingFilterQueryStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HavingFilterQueryTupleSchemeFactory();
+
+ public int id; // required
+ /**
+ * This should be unique within a single request *
+ */
+ public @org.apache.thrift.annotation.Nullable AggregationInfo aggregationInfo; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> value; // required
+ /**
+ *
+ * @see FilterOperator
+ */
+ public @org.apache.thrift.annotation.Nullable FilterOperator operator; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> nestedFilterQueryIds; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ID((short) 1, "id"),
+ ID((short)1, "id"),
/**
* This should be unique within a single request *
*/
- AGGREGATION_INFO((short) 2, "aggregationInfo"), VALUE((short) 3, "value"),
+ AGGREGATION_INFO((short)2, "aggregationInfo"),
+ VALUE((short)3, "value"),
/**
- *
+ *
* @see FilterOperator
*/
- OPERATOR((short) 4, "operator"), NESTED_FILTER_QUERY_IDS((short) 5, "nestedFilterQueryIds");
+ OPERATOR((short)4, "operator"),
+ NESTED_FILTER_QUERY_IDS((short)5, "nestedFilterQueryIds");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -101,8 +82,9 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // ID
return ID;
case 2: // AGGREGATION_INFO
@@ -124,23 +106,22 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -149,7 +130,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
@@ -157,38 +138,34 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
// isset id assignments
private static final int __ID_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.AGGREGATION_INFO, _Fields.OPERATOR};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ private static final _Fields optionals[] = {_Fields.AGGREGATION_INFO,_Fields.OPERATOR};
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.ID,
- new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.AGGREGATION_INFO, new org.apache.thrift.meta_data.FieldMetaData("aggregationInfo",
- org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT,
- "AggregationInfo")));
- tmpMap.put(_Fields.VALUE,
- new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
- 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))));
- tmpMap.put(_Fields.OPERATOR,
- new org.apache.thrift.meta_data.FieldMetaData("operator", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FilterOperator.class)));
- tmpMap.put(_Fields.NESTED_FILTER_QUERY_IDS, new org.apache.thrift.meta_data.FieldMetaData("nestedFilterQueryIds",
- org.apache.thrift.TFieldRequirementType.DEFAULT,
- new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST,
+ 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.ID, new org.apache.thrift.meta_data.FieldMetaData("id", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.AGGREGATION_INFO, new org.apache.thrift.meta_data.FieldMetaData("aggregationInfo", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRUCT , "AggregationInfo")));
+ tmpMap.put(_Fields.VALUE, new org.apache.thrift.meta_data.FieldMetaData("value", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ 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))));
+ tmpMap.put(_Fields.OPERATOR, new org.apache.thrift.meta_data.FieldMetaData("operator", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.EnumMetaData(org.apache.thrift.protocol.TType.ENUM, FilterOperator.class)));
+ tmpMap.put(_Fields.NESTED_FILTER_QUERY_IDS, new org.apache.thrift.meta_data.FieldMetaData("nestedFilterQueryIds", org.apache.thrift.TFieldRequirementType.DEFAULT,
+ 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.I32))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HavingFilterQuery.class, metaDataMap);
}
public HavingFilterQuery() {
}
- public HavingFilterQuery(int id, List<String> value, List<Integer> nestedFilterQueryIds) {
+ public HavingFilterQuery(
+ int id,
+ java.util.List<java.lang.String> value,
+ java.util.List<java.lang.Integer> nestedFilterQueryIds)
+ {
this();
this.id = id;
setIdIsSet(true);
@@ -203,17 +180,17 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
__isset_bitfield = other.__isset_bitfield;
this.id = other.id;
if (other.isSetAggregationInfo()) {
- this.aggregationInfo = other.aggregationInfo;
+ this.aggregationInfo = new AggregationInfo(other.aggregationInfo);
}
if (other.isSetValue()) {
- List<String> __this__value = new ArrayList<String>(other.value);
+ java.util.List<java.lang.String> __this__value = new java.util.ArrayList<java.lang.String>(other.value);
this.value = __this__value;
}
if (other.isSetOperator()) {
this.operator = other.operator;
}
if (other.isSetNestedFilterQueryIds()) {
- List<Integer> __this__nestedFilterQueryIds = new ArrayList<Integer>(other.nestedFilterQueryIds);
+ java.util.List<java.lang.Integer> __this__nestedFilterQueryIds = new java.util.ArrayList<java.lang.Integer>(other.nestedFilterQueryIds);
this.nestedFilterQueryIds = __this__nestedFilterQueryIds;
}
}
@@ -236,27 +213,29 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return this.id;
}
- public void setId(int id) {
+ public HavingFilterQuery setId(int id) {
this.id = id;
setIdIsSet(true);
+ return this;
}
public void unsetId() {
- __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.clearBit(__isset_bitfield, __ID_ISSET_ID);
}
/** Returns true if field id is set (has been assigned a value) and false otherwise */
public boolean isSetId() {
- return EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
+ return org.apache.thrift.EncodingUtils.testBit(__isset_bitfield, __ID_ISSET_ID);
}
public void setIdIsSet(boolean value) {
- __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
+ __isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __ID_ISSET_ID, value);
}
/**
* This should be unique within a single request *
*/
+ @org.apache.thrift.annotation.Nullable
public AggregationInfo getAggregationInfo() {
return this.aggregationInfo;
}
@@ -264,8 +243,9 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
/**
* This should be unique within a single request *
*/
- public void setAggregationInfo(AggregationInfo aggregationInfo) {
+ public HavingFilterQuery setAggregationInfo(@org.apache.thrift.annotation.Nullable AggregationInfo aggregationInfo) {
this.aggregationInfo = aggregationInfo;
+ return this;
}
public void unsetAggregationInfo() {
@@ -287,23 +267,26 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return (this.value == null) ? 0 : this.value.size();
}
- public java.util.Iterator<String> getValueIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.String> getValueIterator() {
return (this.value == null) ? null : this.value.iterator();
}
- public void addToValue(String elem) {
+ public void addToValue(java.lang.String elem) {
if (this.value == null) {
- this.value = new ArrayList<String>();
+ this.value = new java.util.ArrayList<java.lang.String>();
}
this.value.add(elem);
}
- public List<String> getValue() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.String> getValue() {
return this.value;
}
- public void setValue(List<String> value) {
+ public HavingFilterQuery setValue(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> value) {
this.value = value;
+ return this;
}
public void unsetValue() {
@@ -322,19 +305,21 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
/**
- *
+ *
* @see FilterOperator
*/
+ @org.apache.thrift.annotation.Nullable
public FilterOperator getOperator() {
return this.operator;
}
/**
- *
+ *
* @see FilterOperator
*/
- public void setOperator(FilterOperator operator) {
+ public HavingFilterQuery setOperator(@org.apache.thrift.annotation.Nullable FilterOperator operator) {
this.operator = operator;
+ return this;
}
public void unsetOperator() {
@@ -356,23 +341,26 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return (this.nestedFilterQueryIds == null) ? 0 : this.nestedFilterQueryIds.size();
}
- public java.util.Iterator<Integer> getNestedFilterQueryIdsIterator() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Iterator<java.lang.Integer> getNestedFilterQueryIdsIterator() {
return (this.nestedFilterQueryIds == null) ? null : this.nestedFilterQueryIds.iterator();
}
public void addToNestedFilterQueryIds(int elem) {
if (this.nestedFilterQueryIds == null) {
- this.nestedFilterQueryIds = new ArrayList<Integer>();
+ this.nestedFilterQueryIds = new java.util.ArrayList<java.lang.Integer>();
}
this.nestedFilterQueryIds.add(elem);
}
- public List<Integer> getNestedFilterQueryIds() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.List<java.lang.Integer> getNestedFilterQueryIds() {
return this.nestedFilterQueryIds;
}
- public void setNestedFilterQueryIds(List<Integer> nestedFilterQueryIds) {
+ public HavingFilterQuery setNestedFilterQueryIds(@org.apache.thrift.annotation.Nullable java.util.List<java.lang.Integer> nestedFilterQueryIds) {
this.nestedFilterQueryIds = nestedFilterQueryIds;
+ return this;
}
public void unsetNestedFilterQueryIds() {
@@ -390,160 +378,152 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((Integer) value);
- }
- break;
+ case ID:
+ if (value == null) {
+ unsetId();
+ } else {
+ setId((java.lang.Integer)value);
+ }
+ break;
- case AGGREGATION_INFO:
- if (value == null) {
- unsetAggregationInfo();
- } else {
- setAggregationInfo((AggregationInfo) value);
- }
- break;
+ case AGGREGATION_INFO:
+ if (value == null) {
+ unsetAggregationInfo();
+ } else {
+ setAggregationInfo((AggregationInfo)value);
+ }
+ break;
- case VALUE:
- if (value == null) {
- unsetValue();
- } else {
- setValue((List<String>) value);
- }
- break;
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((java.util.List<java.lang.String>)value);
+ }
+ break;
- case OPERATOR:
- if (value == null) {
- unsetOperator();
- } else {
- setOperator((FilterOperator) value);
- }
- break;
+ case OPERATOR:
+ if (value == null) {
+ unsetOperator();
+ } else {
+ setOperator((FilterOperator)value);
+ }
+ break;
+
+ case NESTED_FILTER_QUERY_IDS:
+ if (value == null) {
+ unsetNestedFilterQueryIds();
+ } else {
+ setNestedFilterQueryIds((java.util.List<java.lang.Integer>)value);
+ }
+ break;
- case NESTED_FILTER_QUERY_IDS:
- if (value == null) {
- unsetNestedFilterQueryIds();
- } else {
- setNestedFilterQueryIds((List<Integer>) value);
- }
- break;
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case ID:
- return getId();
+ case ID:
+ return getId();
+
+ case AGGREGATION_INFO:
+ return getAggregationInfo();
- case AGGREGATION_INFO:
- return getAggregationInfo();
+ case VALUE:
+ return getValue();
- case VALUE:
- return getValue();
+ case OPERATOR:
+ return getOperator();
- case OPERATOR:
- return getOperator();
+ case NESTED_FILTER_QUERY_IDS:
+ return getNestedFilterQueryIds();
- case NESTED_FILTER_QUERY_IDS:
- return getNestedFilterQueryIds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case ID:
- return isSetId();
- case AGGREGATION_INFO:
- return isSetAggregationInfo();
- case VALUE:
- return isSetValue();
- case OPERATOR:
- return isSetOperator();
- case NESTED_FILTER_QUERY_IDS:
- return isSetNestedFilterQueryIds();
+ case ID:
+ return isSetId();
+ case AGGREGATION_INFO:
+ return isSetAggregationInfo();
+ case VALUE:
+ return isSetValue();
+ case OPERATOR:
+ return isSetOperator();
+ case NESTED_FILTER_QUERY_IDS:
+ return isSetNestedFilterQueryIds();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof HavingFilterQuery) {
- return this.equals((HavingFilterQuery) that);
- }
+ if (that instanceof HavingFilterQuery)
+ return this.equals((HavingFilterQuery)that);
return false;
}
public boolean equals(HavingFilterQuery that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_id = true;
boolean that_present_id = true;
if (this_present_id || that_present_id) {
- if (!(this_present_id && that_present_id)) {
+ if (!(this_present_id && that_present_id))
return false;
- }
- if (this.id != that.id) {
+ if (this.id != that.id)
return false;
- }
}
boolean this_present_aggregationInfo = true && this.isSetAggregationInfo();
boolean that_present_aggregationInfo = true && that.isSetAggregationInfo();
if (this_present_aggregationInfo || that_present_aggregationInfo) {
- if (!(this_present_aggregationInfo && that_present_aggregationInfo)) {
+ if (!(this_present_aggregationInfo && that_present_aggregationInfo))
return false;
- }
- if (!this.aggregationInfo.equals(that.aggregationInfo)) {
+ if (!this.aggregationInfo.equals(that.aggregationInfo))
return false;
- }
}
boolean this_present_value = true && this.isSetValue();
boolean that_present_value = true && that.isSetValue();
if (this_present_value || that_present_value) {
- if (!(this_present_value && that_present_value)) {
+ if (!(this_present_value && that_present_value))
return false;
- }
- if (!this.value.equals(that.value)) {
+ if (!this.value.equals(that.value))
return false;
- }
}
boolean this_present_operator = true && this.isSetOperator();
boolean that_present_operator = true && that.isSetOperator();
if (this_present_operator || that_present_operator) {
- if (!(this_present_operator && that_present_operator)) {
+ if (!(this_present_operator && that_present_operator))
return false;
- }
- if (!this.operator.equals(that.operator)) {
+ if (!this.operator.equals(that.operator))
return false;
- }
}
boolean this_present_nestedFilterQueryIds = true && this.isSetNestedFilterQueryIds();
boolean that_present_nestedFilterQueryIds = true && that.isSetNestedFilterQueryIds();
if (this_present_nestedFilterQueryIds || that_present_nestedFilterQueryIds) {
- if (!(this_present_nestedFilterQueryIds && that_present_nestedFilterQueryIds)) {
+ if (!(this_present_nestedFilterQueryIds && that_present_nestedFilterQueryIds))
return false;
- }
- if (!this.nestedFilterQueryIds.equals(that.nestedFilterQueryIds)) {
+ if (!this.nestedFilterQueryIds.equals(that.nestedFilterQueryIds))
return false;
- }
}
return true;
@@ -551,39 +531,27 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_id = true;
- list.add(present_id);
- if (present_id) {
- list.add(id);
- }
+ hashCode = hashCode * 8191 + id;
- boolean present_aggregationInfo = true && (isSetAggregationInfo());
- list.add(present_aggregationInfo);
- if (present_aggregationInfo) {
- list.add(aggregationInfo);
- }
+ hashCode = hashCode * 8191 + ((isSetAggregationInfo()) ? 131071 : 524287);
+ if (isSetAggregationInfo())
+ hashCode = hashCode * 8191 + aggregationInfo.hashCode();
- boolean present_value = true && (isSetValue());
- list.add(present_value);
- if (present_value) {
- list.add(value);
- }
+ hashCode = hashCode * 8191 + ((isSetValue()) ? 131071 : 524287);
+ if (isSetValue())
+ hashCode = hashCode * 8191 + value.hashCode();
- boolean present_operator = true && (isSetOperator());
- list.add(present_operator);
- if (present_operator) {
- list.add(operator.getValue());
- }
+ hashCode = hashCode * 8191 + ((isSetOperator()) ? 131071 : 524287);
+ if (isSetOperator())
+ hashCode = hashCode * 8191 + operator.getValue();
- boolean present_nestedFilterQueryIds = true && (isSetNestedFilterQueryIds());
- list.add(present_nestedFilterQueryIds);
- if (present_nestedFilterQueryIds) {
- list.add(nestedFilterQueryIds);
- }
+ hashCode = hashCode * 8191 + ((isSetNestedFilterQueryIds()) ? 131071 : 524287);
+ if (isSetNestedFilterQueryIds())
+ hashCode = hashCode * 8191 + nestedFilterQueryIds.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -594,7 +562,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetId()).compareTo(other.isSetId());
+ lastComparison = java.lang.Boolean.valueOf(isSetId()).compareTo(other.isSetId());
if (lastComparison != 0) {
return lastComparison;
}
@@ -604,7 +572,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetAggregationInfo()).compareTo(other.isSetAggregationInfo());
+ lastComparison = java.lang.Boolean.valueOf(isSetAggregationInfo()).compareTo(other.isSetAggregationInfo());
if (lastComparison != 0) {
return lastComparison;
}
@@ -614,7 +582,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
+ lastComparison = java.lang.Boolean.valueOf(isSetValue()).compareTo(other.isSetValue());
if (lastComparison != 0) {
return lastComparison;
}
@@ -624,7 +592,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetOperator()).compareTo(other.isSetOperator());
+ lastComparison = java.lang.Boolean.valueOf(isSetOperator()).compareTo(other.isSetOperator());
if (lastComparison != 0) {
return lastComparison;
}
@@ -634,7 +602,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return lastComparison;
}
}
- lastComparison = Boolean.valueOf(isSetNestedFilterQueryIds()).compareTo(other.isSetNestedFilterQueryIds());
+ lastComparison = java.lang.Boolean.valueOf(isSetNestedFilterQueryIds()).compareTo(other.isSetNestedFilterQueryIds());
if (lastComparison != 0) {
return lastComparison;
}
@@ -647,32 +615,29 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("HavingFilterQuery(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("HavingFilterQuery(");
boolean first = true;
sb.append("id:");
sb.append(this.id);
first = false;
if (isSetAggregationInfo()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("aggregationInfo:");
if (this.aggregationInfo == null) {
sb.append("null");
@@ -681,9 +646,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
first = false;
}
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("value:");
if (this.value == null) {
sb.append("null");
@@ -692,9 +655,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
first = false;
if (isSetOperator()) {
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("operator:");
if (this.operator == null) {
sb.append("null");
@@ -703,9 +664,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
first = false;
}
- if (!first) {
- sb.append(", ");
- }
+ if (!first) sb.append(", ");
sb.append("nestedFilterQueryIds:");
if (this.nestedFilterQueryIds == null) {
sb.append("null");
@@ -717,18 +676,13 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (!isSetId()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' is unset! Struct:" + toString());
- }
-
+ // alas, we cannot check 'id' because it's a primitive and you chose the non-beans generator.
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -736,8 +690,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
// it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor.
__isset_bitfield = 0;
@@ -747,21 +700,21 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
}
- private static class HavingFilterQueryStandardSchemeFactory implements SchemeFactory {
+ private static class HavingFilterQueryStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HavingFilterQueryStandardScheme getScheme() {
return new HavingFilterQueryStandardScheme();
}
}
- private static class HavingFilterQueryStandardScheme extends StandardScheme<HavingFilterQuery> {
+ private static class HavingFilterQueryStandardScheme extends org.apache.thrift.scheme.StandardScheme<HavingFilterQuery> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, HavingFilterQuery struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, HavingFilterQuery struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -769,7 +722,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.id = iprot.readI32();
struct.setIdIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -778,7 +731,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
struct.aggregationInfo = new AggregationInfo();
struct.aggregationInfo.read(iprot);
struct.setAggregationInfoIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -786,16 +739,17 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list26 = iprot.readListBegin();
- struct.value = new ArrayList<String>(_list26.size);
- String _elem27;
- for (int _i28 = 0; _i28 < _list26.size; ++_i28) {
+ struct.value = new java.util.ArrayList<java.lang.String>(_list26.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem27;
+ for (int _i28 = 0; _i28 < _list26.size; ++_i28)
+ {
_elem27 = iprot.readString();
struct.value.add(_elem27);
}
iprot.readListEnd();
}
struct.setValueIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -803,7 +757,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.operator = org.apache.pinot.common.request.FilterOperator.findByValue(iprot.readI32());
struct.setOperatorIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -811,16 +765,17 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
- struct.nestedFilterQueryIds = new ArrayList<Integer>(_list29.size);
+ struct.nestedFilterQueryIds = new java.util.ArrayList<java.lang.Integer>(_list29.size);
int _elem30;
- for (int _i31 = 0; _i31 < _list29.size; ++_i31) {
+ for (int _i31 = 0; _i31 < _list29.size; ++_i31)
+ {
_elem30 = iprot.readI32();
struct.nestedFilterQueryIds.add(_elem30);
}
iprot.readListEnd();
}
struct.setNestedFilterQueryIdsIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -830,11 +785,15 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
+ if (!struct.isSetId()) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'id' was not found in serialized data! Struct: " + toString());
+ }
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, HavingFilterQuery struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, HavingFilterQuery struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -851,9 +810,9 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
if (struct.value != null) {
oprot.writeFieldBegin(VALUE_FIELD_DESC);
{
- oprot.writeListBegin(
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.value.size()));
- for (String _iter32 : struct.value) {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.value.size()));
+ for (java.lang.String _iter32 : struct.value)
+ {
oprot.writeString(_iter32);
}
oprot.writeListEnd();
@@ -870,9 +829,9 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
if (struct.nestedFilterQueryIds != null) {
oprot.writeFieldBegin(NESTED_FILTER_QUERY_IDS_FIELD_DESC);
{
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32,
- struct.nestedFilterQueryIds.size()));
- for (int _iter33 : struct.nestedFilterQueryIds) {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, struct.nestedFilterQueryIds.size()));
+ for (int _iter33 : struct.nestedFilterQueryIds)
+ {
oprot.writeI32(_iter33);
}
oprot.writeListEnd();
@@ -882,22 +841,22 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class HavingFilterQueryTupleSchemeFactory implements SchemeFactory {
+ private static class HavingFilterQueryTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HavingFilterQueryTupleScheme getScheme() {
return new HavingFilterQueryTupleScheme();
}
}
- private static class HavingFilterQueryTupleScheme extends TupleScheme<HavingFilterQuery> {
+ private static class HavingFilterQueryTupleScheme extends org.apache.thrift.scheme.TupleScheme<HavingFilterQuery> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, HavingFilterQuery struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ public void write(org.apache.thrift.protocol.TProtocol prot, HavingFilterQuery struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeI32(struct.id);
- BitSet optionals = new BitSet();
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetAggregationInfo()) {
optionals.set(0);
}
@@ -917,7 +876,8 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
if (struct.isSetValue()) {
{
oprot.writeI32(struct.value.size());
- for (String _iter34 : struct.value) {
+ for (java.lang.String _iter34 : struct.value)
+ {
oprot.writeString(_iter34);
}
}
@@ -928,7 +888,8 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
if (struct.isSetNestedFilterQueryIds()) {
{
oprot.writeI32(struct.nestedFilterQueryIds.size());
- for (int _iter35 : struct.nestedFilterQueryIds) {
+ for (int _iter35 : struct.nestedFilterQueryIds)
+ {
oprot.writeI32(_iter35);
}
}
@@ -936,12 +897,11 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, HavingFilterQuery struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ public void read(org.apache.thrift.protocol.TProtocol prot, HavingFilterQuery struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.id = iprot.readI32();
struct.setIdIsSet(true);
- BitSet incoming = iprot.readBitSet(4);
+ java.util.BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
struct.aggregationInfo = new AggregationInfo();
struct.aggregationInfo.read(iprot);
@@ -949,11 +909,11 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list36 =
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
- struct.value = new ArrayList<String>(_list36.size);
- String _elem37;
- for (int _i38 = 0; _i38 < _list36.size; ++_i38) {
+ org.apache.thrift.protocol.TList _list36 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ struct.value = new java.util.ArrayList<java.lang.String>(_list36.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem37;
+ for (int _i38 = 0; _i38 < _list36.size; ++_i38)
+ {
_elem37 = iprot.readString();
struct.value.add(_elem37);
}
@@ -966,11 +926,11 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
if (incoming.get(3)) {
{
- org.apache.thrift.protocol.TList _list39 =
- new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
- struct.nestedFilterQueryIds = new ArrayList<Integer>(_list39.size);
+ org.apache.thrift.protocol.TList _list39 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, iprot.readI32());
+ struct.nestedFilterQueryIds = new java.util.ArrayList<java.lang.Integer>(_list39.size);
int _elem40;
- for (int _i41 = 0; _i41 < _list39.size; ++_i41) {
+ for (int _i41 = 0; _i41 < _list39.size; ++_i41)
+ {
_elem40 = iprot.readI32();
struct.nestedFilterQueryIds.add(_elem40);
}
@@ -979,5 +939,9 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/HavingFilterQueryMap.java b/pinot-common/src/main/java/org/apache/pinot/common/request/HavingFilterQueryMap.java
index b47b511..4dbb6f9 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/HavingFilterQueryMap.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/HavingFilterQueryMap.java
@@ -17,56 +17,33 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilterQueryMap, HavingFilterQueryMap._Fields>, java.io.Serializable, Cloneable, Comparable<HavingFilterQueryMap> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("HavingFilterQueryMap");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("HavingFilterQueryMap");
- private static final org.apache.thrift.protocol.TField FILTER_QUERY_MAP_FIELD_DESC =
- new org.apache.thrift.protocol.TField("filterQueryMap", org.apache.thrift.protocol.TType.MAP, (short) 1);
+ private static final org.apache.thrift.protocol.TField FILTER_QUERY_MAP_FIELD_DESC = new org.apache.thrift.protocol.TField("filterQueryMap", org.apache.thrift.protocol.TType.MAP, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new HavingFilterQueryMapStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new HavingFilterQueryMapTupleSchemeFactory();
- static {
- schemes.put(StandardScheme.class, new HavingFilterQueryMapStandardSchemeFactory());
- schemes.put(TupleScheme.class, new HavingFilterQueryMapTupleSchemeFactory());
- }
-
- private Map<Integer, HavingFilterQuery> filterQueryMap; // optional
+ public @org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Integer,HavingFilterQuery> filterQueryMap; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- FILTER_QUERY_MAP((short) 1, "filterQueryMap");
+ FILTER_QUERY_MAP((short)1, "filterQueryMap");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -74,8 +51,9 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // FILTER_QUERY_MAP
return FILTER_QUERY_MAP;
default:
@@ -89,23 +67,22 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -114,25 +91,21 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
private static final _Fields optionals[] = {_Fields.FILTER_QUERY_MAP};
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.FILTER_QUERY_MAP, new org.apache.thrift.meta_data.FieldMetaData("filterQueryMap",
- 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.I32),
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
- HavingFilterQuery.class))));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ 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.FILTER_QUERY_MAP, new org.apache.thrift.meta_data.FieldMetaData("filterQueryMap", 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.I32),
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, HavingFilterQuery.class))));
+ metaDataMap = java.util.Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HavingFilterQueryMap.class, metaDataMap);
}
@@ -144,14 +117,13 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
*/
public HavingFilterQueryMap(HavingFilterQueryMap other) {
if (other.isSetFilterQueryMap()) {
- Map<Integer, HavingFilterQuery> __this__filterQueryMap =
- new HashMap<Integer, HavingFilterQuery>(other.filterQueryMap.size());
- for (Map.Entry<Integer, HavingFilterQuery> other_element : other.filterQueryMap.entrySet()) {
+ java.util.Map<java.lang.Integer,HavingFilterQuery> __this__filterQueryMap = new java.util.HashMap<java.lang.Integer,HavingFilterQuery>(other.filterQueryMap.size());
+ for (java.util.Map.Entry<java.lang.Integer, HavingFilterQuery> other_element : other.filterQueryMap.entrySet()) {
- Integer other_element_key = other_element.getKey();
+ java.lang.Integer other_element_key = other_element.getKey();
HavingFilterQuery other_element_value = other_element.getValue();
- Integer __this__filterQueryMap_copy_key = other_element_key;
+ java.lang.Integer __this__filterQueryMap_copy_key = other_element_key;
HavingFilterQuery __this__filterQueryMap_copy_value = new HavingFilterQuery(other_element_value);
@@ -176,17 +148,19 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
public void putToFilterQueryMap(int key, HavingFilterQuery val) {
if (this.filterQueryMap == null) {
- this.filterQueryMap = new HashMap<Integer, HavingFilterQuery>();
+ this.filterQueryMap = new java.util.HashMap<java.lang.Integer,HavingFilterQuery>();
}
this.filterQueryMap.put(key, val);
}
- public Map<Integer, HavingFilterQuery> getFilterQueryMap() {
+ @org.apache.thrift.annotation.Nullable
+ public java.util.Map<java.lang.Integer,HavingFilterQuery> getFilterQueryMap() {
return this.filterQueryMap;
}
- public void setFilterQueryMap(Map<Integer, HavingFilterQuery> filterQueryMap) {
+ public HavingFilterQueryMap setFilterQueryMap(@org.apache.thrift.annotation.Nullable java.util.Map<java.lang.Integer,HavingFilterQuery> filterQueryMap) {
this.filterQueryMap = filterQueryMap;
+ return this;
}
public void unsetFilterQueryMap() {
@@ -204,64 +178,64 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case FILTER_QUERY_MAP:
- if (value == null) {
- unsetFilterQueryMap();
- } else {
- setFilterQueryMap((Map<Integer, HavingFilterQuery>) value);
- }
- break;
+ case FILTER_QUERY_MAP:
+ if (value == null) {
+ unsetFilterQueryMap();
+ } else {
+ setFilterQueryMap((java.util.Map<java.lang.Integer,HavingFilterQuery>)value);
+ }
+ break;
+
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case FILTER_QUERY_MAP:
- return getFilterQueryMap();
+ case FILTER_QUERY_MAP:
+ return getFilterQueryMap();
+
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case FILTER_QUERY_MAP:
- return isSetFilterQueryMap();
+ case FILTER_QUERY_MAP:
+ return isSetFilterQueryMap();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof HavingFilterQueryMap) {
- return this.equals((HavingFilterQueryMap) that);
- }
+ if (that instanceof HavingFilterQueryMap)
+ return this.equals((HavingFilterQueryMap)that);
return false;
}
public boolean equals(HavingFilterQueryMap that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_filterQueryMap = true && this.isSetFilterQueryMap();
boolean that_present_filterQueryMap = true && that.isSetFilterQueryMap();
if (this_present_filterQueryMap || that_present_filterQueryMap) {
- if (!(this_present_filterQueryMap && that_present_filterQueryMap)) {
+ if (!(this_present_filterQueryMap && that_present_filterQueryMap))
return false;
- }
- if (!this.filterQueryMap.equals(that.filterQueryMap)) {
+ if (!this.filterQueryMap.equals(that.filterQueryMap))
return false;
- }
}
return true;
@@ -269,15 +243,13 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_filterQueryMap = true && (isSetFilterQueryMap());
- list.add(present_filterQueryMap);
- if (present_filterQueryMap) {
- list.add(filterQueryMap);
- }
+ hashCode = hashCode * 8191 + ((isSetFilterQueryMap()) ? 131071 : 524287);
+ if (isSetFilterQueryMap())
+ hashCode = hashCode * 8191 + filterQueryMap.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -288,7 +260,7 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetFilterQueryMap()).compareTo(other.isSetFilterQueryMap());
+ lastComparison = java.lang.Boolean.valueOf(isSetFilterQueryMap()).compareTo(other.isSetFilterQueryMap());
if (lastComparison != 0) {
return lastComparison;
}
@@ -301,23 +273,22 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("HavingFilterQueryMap(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("HavingFilterQueryMap(");
boolean first = true;
if (isSetFilterQueryMap()) {
@@ -333,14 +304,12 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -348,8 +317,7 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -357,21 +325,21 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
}
}
- private static class HavingFilterQueryMapStandardSchemeFactory implements SchemeFactory {
+ private static class HavingFilterQueryMapStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HavingFilterQueryMapStandardScheme getScheme() {
return new HavingFilterQueryMapStandardScheme();
}
}
- private static class HavingFilterQueryMapStandardScheme extends StandardScheme<HavingFilterQueryMap> {
+ private static class HavingFilterQueryMapStandardScheme extends org.apache.thrift.scheme.StandardScheme<HavingFilterQueryMap> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, HavingFilterQueryMap struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, HavingFilterQueryMap struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -379,10 +347,11 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map42 = iprot.readMapBegin();
- struct.filterQueryMap = new HashMap<Integer, HavingFilterQuery>(2 * _map42.size);
+ struct.filterQueryMap = new java.util.HashMap<java.lang.Integer,HavingFilterQuery>(2*_map42.size);
int _key43;
- HavingFilterQuery _val44;
- for (int _i45 = 0; _i45 < _map42.size; ++_i45) {
+ @org.apache.thrift.annotation.Nullable HavingFilterQuery _val44;
+ for (int _i45 = 0; _i45 < _map42.size; ++_i45)
+ {
_key43 = iprot.readI32();
_val44 = new HavingFilterQuery();
_val44.read(iprot);
@@ -391,7 +360,7 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
iprot.readMapEnd();
}
struct.setFilterQueryMapIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -401,11 +370,12 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, HavingFilterQueryMap struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, HavingFilterQueryMap struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -413,9 +383,9 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
if (struct.isSetFilterQueryMap()) {
oprot.writeFieldBegin(FILTER_QUERY_MAP_FIELD_DESC);
{
- oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32,
- org.apache.thrift.protocol.TType.STRUCT, struct.filterQueryMap.size()));
- for (Map.Entry<Integer, HavingFilterQuery> _iter46 : struct.filterQueryMap.entrySet()) {
+ oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, struct.filterQueryMap.size()));
+ for (java.util.Map.Entry<java.lang.Integer, HavingFilterQuery> _iter46 : struct.filterQueryMap.entrySet())
+ {
oprot.writeI32(_iter46.getKey());
_iter46.getValue().write(oprot);
}
@@ -427,21 +397,21 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class HavingFilterQueryMapTupleSchemeFactory implements SchemeFactory {
+ private static class HavingFilterQueryMapTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public HavingFilterQueryMapTupleScheme getScheme() {
return new HavingFilterQueryMapTupleScheme();
}
}
- private static class HavingFilterQueryMapTupleScheme extends TupleScheme<HavingFilterQueryMap> {
+ private static class HavingFilterQueryMapTupleScheme extends org.apache.thrift.scheme.TupleScheme<HavingFilterQueryMap> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, HavingFilterQueryMap struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
- BitSet optionals = new BitSet();
+ public void write(org.apache.thrift.protocol.TProtocol prot, HavingFilterQueryMap struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet optionals = new java.util.BitSet();
if (struct.isSetFilterQueryMap()) {
optionals.set(0);
}
@@ -449,7 +419,8 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
if (struct.isSetFilterQueryMap()) {
{
oprot.writeI32(struct.filterQueryMap.size());
- for (Map.Entry<Integer, HavingFilterQuery> _iter47 : struct.filterQueryMap.entrySet()) {
+ for (java.util.Map.Entry<java.lang.Integer, HavingFilterQuery> _iter47 : struct.filterQueryMap.entrySet())
+ {
oprot.writeI32(_iter47.getKey());
_iter47.getValue().write(oprot);
}
@@ -458,19 +429,17 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, HavingFilterQueryMap struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
- BitSet incoming = iprot.readBitSet(1);
+ public void read(org.apache.thrift.protocol.TProtocol prot, HavingFilterQueryMap struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
+ java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TMap _map48 =
- new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32,
- org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
- struct.filterQueryMap = new HashMap<Integer, HavingFilterQuery>(2 * _map48.size);
+ org.apache.thrift.protocol.TMap _map48 = new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.I32, org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ struct.filterQueryMap = new java.util.HashMap<java.lang.Integer,HavingFilterQuery>(2*_map48.size);
int _key49;
- HavingFilterQuery _val50;
- for (int _i51 = 0; _i51 < _map48.size; ++_i51) {
+ @org.apache.thrift.annotation.Nullable HavingFilterQuery _val50;
+ for (int _i51 = 0; _i51 < _map48.size; ++_i51)
+ {
_key49 = iprot.readI32();
_val50 = new HavingFilterQuery();
_val50.read(iprot);
@@ -481,5 +450,9 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
}
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/Identifier.java b/pinot-common/src/main/java/org/apache/pinot/common/request/Identifier.java
index 2bab01d..6ae7ab2 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/Identifier.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/Identifier.java
@@ -17,55 +17,33 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class Identifier implements org.apache.thrift.TBase<Identifier, Identifier._Fields>, java.io.Serializable, Cloneable, Comparable<Identifier> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("Identifier");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Identifier");
- private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC =
- new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short) 1);
+ private static final org.apache.thrift.protocol.TField NAME_FIELD_DESC = new org.apache.thrift.protocol.TField("name", org.apache.thrift.protocol.TType.STRING, (short)1);
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new IdentifierStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new IdentifierTupleSchemeFactory();
- static {
- schemes.put(StandardScheme.class, new IdentifierStandardSchemeFactory());
- schemes.put(TupleScheme.class, new IdentifierTupleSchemeFactory());
- }
-
- private String name; // required
+ public @org.apache.thrift.annotation.Nullable java.lang.String name; // required
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- NAME((short) 1, "name");
+ NAME((short)1, "name");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -73,8 +51,9 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // NAME
return NAME;
default:
@@ -88,23 +67,22 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
- _Fields(short thriftId, String fieldName) {
+ _Fields(short thriftId, java.lang.String fieldName) {
_thriftId = thriftId;
_fieldName = fieldName;
}
@@ -113,28 +91,27 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
return _thriftId;
}
- public String getFieldName() {
+ public java.lang.String getFieldName() {
return _fieldName;
}
}
// isset id assignments
- public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
-
+ public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
- Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
- new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
- tmpMap.put(_Fields.NAME,
- new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
- metaDataMap = Collections.unmodifiableMap(tmpMap);
+ 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.NAME, new org.apache.thrift.meta_data.FieldMetaData("name", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ 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(Identifier.class, metaDataMap);
}
public Identifier() {
}
- public Identifier(String name) {
+ public Identifier(
+ java.lang.String name)
+ {
this();
this.name = name;
}
@@ -157,12 +134,14 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
this.name = null;
}
- public String getName() {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.String getName() {
return this.name;
}
- public void setName(String name) {
+ public Identifier setName(@org.apache.thrift.annotation.Nullable java.lang.String name) {
this.name = name;
+ return this;
}
public void unsetName() {
@@ -180,64 +159,64 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
}
}
- public void setFieldValue(_Fields field, Object value) {
+ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable java.lang.Object value) {
switch (field) {
- case NAME:
- if (value == null) {
- unsetName();
- } else {
- setName((String) value);
- }
- break;
+ case NAME:
+ if (value == null) {
+ unsetName();
+ } else {
+ setName((java.lang.String)value);
+ }
+ break;
+
}
}
- public Object getFieldValue(_Fields field) {
+ @org.apache.thrift.annotation.Nullable
+ public java.lang.Object getFieldValue(_Fields field) {
switch (field) {
- case NAME:
- return getName();
+ case NAME:
+ return getName();
+
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
public boolean isSet(_Fields field) {
if (field == null) {
- throw new IllegalArgumentException();
+ throw new java.lang.IllegalArgumentException();
}
switch (field) {
- case NAME:
- return isSetName();
+ case NAME:
+ return isSetName();
}
- throw new IllegalStateException();
+ throw new java.lang.IllegalStateException();
}
@Override
- public boolean equals(Object that) {
- if (that == null) {
+ public boolean equals(java.lang.Object that) {
+ if (that == null)
return false;
- }
- if (that instanceof Identifier) {
- return this.equals((Identifier) that);
- }
+ if (that instanceof Identifier)
+ return this.equals((Identifier)that);
return false;
}
public boolean equals(Identifier that) {
- if (that == null) {
+ if (that == null)
return false;
- }
+ if (this == that)
+ return true;
boolean this_present_name = true && this.isSetName();
boolean that_present_name = true && that.isSetName();
if (this_present_name || that_present_name) {
- if (!(this_present_name && that_present_name)) {
+ if (!(this_present_name && that_present_name))
return false;
- }
- if (!this.name.equals(that.name)) {
+ if (!this.name.equals(that.name))
return false;
- }
}
return true;
@@ -245,15 +224,13 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
@Override
public int hashCode() {
- List<Object> list = new ArrayList<Object>();
+ int hashCode = 1;
- boolean present_name = true && (isSetName());
- list.add(present_name);
- if (present_name) {
- list.add(name);
- }
+ hashCode = hashCode * 8191 + ((isSetName()) ? 131071 : 524287);
+ if (isSetName())
+ hashCode = hashCode * 8191 + name.hashCode();
- return list.hashCode();
+ return hashCode;
}
@Override
@@ -264,7 +241,7 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
int lastComparison = 0;
- lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName());
+ lastComparison = java.lang.Boolean.valueOf(isSetName()).compareTo(other.isSetName());
if (lastComparison != 0) {
return lastComparison;
}
@@ -277,23 +254,22 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
return 0;
}
+ @org.apache.thrift.annotation.Nullable
public _Fields fieldForId(int fieldId) {
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot)
- throws org.apache.thrift.TException {
- schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
+ public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ scheme(iprot).read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot)
- throws org.apache.thrift.TException {
- schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
+ public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ scheme(oprot).write(oprot, this);
}
@Override
- public String toString() {
- StringBuilder sb = new StringBuilder("Identifier(");
+ public java.lang.String toString() {
+ java.lang.StringBuilder sb = new java.lang.StringBuilder("Identifier(");
boolean first = true;
sb.append("name:");
@@ -307,18 +283,15 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
return sb.toString();
}
- public void validate()
- throws org.apache.thrift.TException {
+ public void validate() throws org.apache.thrift.TException {
// check for required fields
- if (!isSetName()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' is unset! Struct:" + toString());
+ if (name == null) {
+ throw new org.apache.thrift.protocol.TProtocolException("Required field 'name' was not present! Struct: " + toString());
}
-
// check for sub-struct validity
}
- private void writeObject(java.io.ObjectOutputStream out)
- throws java.io.IOException {
+ private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException {
try {
write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out)));
} catch (org.apache.thrift.TException te) {
@@ -326,8 +299,7 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
}
}
- private void readObject(java.io.ObjectInputStream in)
- throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, java.lang.ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -335,21 +307,21 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
}
}
- private static class IdentifierStandardSchemeFactory implements SchemeFactory {
+ private static class IdentifierStandardSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IdentifierStandardScheme getScheme() {
return new IdentifierStandardScheme();
}
}
- private static class IdentifierStandardScheme extends StandardScheme<Identifier> {
+ private static class IdentifierStandardScheme extends org.apache.thrift.scheme.StandardScheme<Identifier> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, Identifier struct)
- throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Identifier struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
- while (true) {
+ 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) {
@@ -357,7 +329,7 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
if (schemeField.type == org.apache.thrift.protocol.TType.STRING) {
struct.name = iprot.readString();
struct.setNameIsSet(true);
- } else {
+ } else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
@@ -367,11 +339,12 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
iprot.readFieldEnd();
}
iprot.readStructEnd();
+
+ // check for required fields of primitive type, which can't be checked in the validate method
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, Identifier struct)
- throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Identifier struct) throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -383,30 +356,33 @@ public class Identifier implements org.apache.thrift.TBase<Identifier, Identifie
oprot.writeFieldStop();
oprot.writeStructEnd();
}
+
}
- private static class IdentifierTupleSchemeFactory implements SchemeFactory {
+ private static class IdentifierTupleSchemeFactory implements org.apache.thrift.scheme.SchemeFactory {
public IdentifierTupleScheme getScheme() {
return new IdentifierTupleScheme();
}
}
- private static class IdentifierTupleScheme extends TupleScheme<Identifier> {
+ private static class IdentifierTupleScheme extends org.apache.thrift.scheme.TupleScheme<Identifier> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Identifier struct)
- throws org.apache.thrift.TException {
- TTupleProtocol oprot = (TTupleProtocol) prot;
+ public void write(org.apache.thrift.protocol.TProtocol prot, Identifier struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol oprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
oprot.writeString(struct.name);
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Identifier struct)
- throws org.apache.thrift.TException {
- TTupleProtocol iprot = (TTupleProtocol) prot;
+ public void read(org.apache.thrift.protocol.TProtocol prot, Identifier struct) throws org.apache.thrift.TException {
+ org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
struct.name = iprot.readString();
struct.setNameIsSet(true);
}
}
+
+ private static <S extends org.apache.thrift.scheme.IScheme> S scheme(org.apache.thrift.protocol.TProtocol proto) {
+ return (org.apache.thrift.scheme.StandardScheme.class.equals(proto.getScheme()) ? STANDARD_SCHEME_FACTORY : TUPLE_SCHEME_FACTORY).getScheme();
+ }
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/InstanceRequest.java b/pinot-common/src/main/java/org/apache/pinot/common/request/InstanceRequest.java
index 00b3c4c..534b6bb 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/InstanceRequest.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/InstanceRequest.java
@@ -17,78 +17,50 @@
* under the License.
*/
/**
- * Autogenerated by Thrift Compiler (0.9.3)
+ * Autogenerated by Thrift Compiler (0.12.0)
*
* DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING
* @generated
*/
package org.apache.pinot.common.request;
-import java.util.ArrayList;
-import java.util.BitSet;
-import java.util.Collections;
-import java.util.EnumMap;
-import java.util.EnumSet;
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-import javax.annotation.Generated;
-import org.apache.thrift.EncodingUtils;
-import org.apache.thrift.protocol.TTupleProtocol;
-import org.apache.thrift.scheme.IScheme;
-import org.apache.thrift.scheme.SchemeFactory;
-import org.apache.thrift.scheme.StandardScheme;
-import org.apache.thrift.scheme.TupleScheme;
-
-
-@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
+@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
/**
* AUTO GENERATED: DO NOT EDIT
* Instance Request
- *
+ *
*/
-@Generated(value = "Autogenerated by Thrift Compiler (0.9.3)", date = "2019-06-06")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.12.0)", date = "2019-07-19")
public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest, InstanceRequest._Fields>, java.io.Serializable, Cloneable, Comparable<InstanceRequest> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
- new org.apache.thrift.protocol.TStruct("InstanceRequest");
-
- private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField("requestId", org.apache.thrift.protocol.TType.I64, (short) 1);
- private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC =
- new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRUCT, (short) 2);
- private static final org.apache.thrift.protocol.TField SEARCH_SEGMENTS_FIELD_DESC =
- new org.apache.thrift.protocol.TField("searchSegments", org.apache.thrift.protocol.TType.LIST, (short) 3);
- private static final org.apache.thrift.protocol.TField ENABLE_TRACE_FIELD_DESC =
- new org.apache.thrift.protocol.TField("enableTrace", org.apache.thrift.protocol.TType.BOOL, (short) 4);
- private static final org.apache.thrift.protocol.TField BROKER_ID_FIELD_DESC =
- new org.apache.thrift.protocol.TField("brokerId", org.apache.thrift.protocol.TType.STRING, (short) 5);
-
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
- new HashMap<Class<? extends IScheme>, SchemeFactory>();
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InstanceRequest");
- static {
- schemes.put(StandardScheme.class, new InstanceRequestStandardSchemeFactory());
- schemes.put(TupleScheme.class, new InstanceRequestTupleSchemeFactory());
- }
+ private static final org.apache.thrift.protocol.TField REQUEST_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("requestId", org.apache.thrift.protocol.TType.I64, (short)1);
+ private static final org.apache.thrift.protocol.TField QUERY_FIELD_DESC = new org.apache.thrift.protocol.TField("query", org.apache.thrift.protocol.TType.STRUCT, (short)2);
+ private static final org.apache.thrift.protocol.TField SEARCH_SEGMENTS_FIELD_DESC = new org.apache.thrift.protocol.TField("searchSegments", org.apache.thrift.protocol.TType.LIST, (short)3);
+ private static final org.apache.thrift.protocol.TField ENABLE_TRACE_FIELD_DESC = new org.apache.thrift.protocol.TField("enableTrace", org.apache.thrift.protocol.TType.BOOL, (short)4);
+ private static final org.apache.thrift.protocol.TField BROKER_ID_FIELD_DESC = new org.apache.thrift.protocol.TField("brokerId", org.apache.thrift.protocol.TType.STRING, (short)5);
+
+ private static final org.apache.thrift.scheme.SchemeFactory STANDARD_SCHEME_FACTORY = new InstanceRequestStandardSchemeFactory();
+ private static final org.apache.thrift.scheme.SchemeFactory TUPLE_SCHEME_FACTORY = new InstanceRequestTupleSchemeFactory();
- private long requestId; // required
- private BrokerRequest query; // required
- private List<String> searchSegments; // optional
- private boolean enableTrace; // optional
- private String brokerId; // optional
+ public long requestId; // required
+ public @org.apache.thrift.annotation.Nullable BrokerRequest query; // required
+ public @org.apache.thrift.annotation.Nullable java.util.List<java.lang.String> searchSegments; // optional
+ public boolean enableTrace; // optional
+ public @org.apache.thrift.annotation.Nullable java.lang.String brokerId; // optional
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- REQUEST_ID((short) 1, "requestId"),
- QUERY((short) 2, "query"),
- SEARCH_SEGMENTS((short) 3, "searchSegments"),
- ENABLE_TRACE((short) 4, "enableTrace"),
- BROKER_ID((short) 5, "brokerId");
+ REQUEST_ID((short)1, "requestId"),
+ QUERY((short)2, "query"),
+ SEARCH_SEGMENTS((short)3, "searchSegments"),
+ ENABLE_TRACE((short)4, "enableTrace"),
+ BROKER_ID((short)5, "brokerId");
- private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
+ private static final java.util.Map<java.lang.String, _Fields> byName = new java.util.HashMap<java.lang.String, _Fields>();
static {
- for (_Fields field : EnumSet.allOf(_Fields.class)) {
+ for (_Fields field : java.util.EnumSet.allOf(_Fields.class)) {
byName.put(field.getFieldName(), field);
}
}
@@ -96,8 +68,9 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
/**
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
+ @org.apache.thrift.annotation.Nullable
public static _Fields findByThriftId(int fieldId) {
- switch (fieldId) {
+ switch(fieldId) {
case 1: // REQUEST_ID
return REQUEST_ID;
case 2: // QUERY
@@ -119,23 +92,22 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
*/
public static _Fields findByThriftIdOrThrow(int fieldId) {
_Fields fields = findByThriftId(fieldId);
- if (fields == null) {
- throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!");
- }
+ if (fields == null) throw new java.lang.IllegalArgumentException("Field " + fieldId + " doesn't exist!");
return fields;
}
/**
* Find the _Fields constant that matches name, or null if its not found.
*/
- public static _Fields findByName(String name) {
+ @org.apache.thrift.annotation.Nullable
+ public static _Fields findByName(java.lang.String name) {
return byName.get(name);
}
private final short _thriftId;
- private final String _fieldName;
+ private final java.lang.String _fieldName;
... 6600 lines suppressed ...
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org