You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by ja...@apache.org on 2019/06/05 23:00:05 UTC
[incubator-pinot] 01/01: Reformat classes in pinot-common
This is an automated email from the ASF dual-hosted git repository.
jackie pushed a commit to branch auto_reformat
in repository https://gitbox.apache.org/repos/asf/incubator-pinot.git
commit 3a8521d6ec7f0978acc094a5006f706f48818d72
Author: Jackie (Xiaotian) Jiang <xa...@linkedin.com>
AuthorDate: Wed Jun 5 15:55:06 2019 -0700
Reformat classes in pinot-common
Includes thrift auto-generated files.
Auto-generated files from different Thrift version have different format.
Keep thrift files following Pinot Style can minimize the change when re-compiling using different Thrift version.
---
.../pinot/annotations/InterfaceAudience.java | 19 +-
.../pinot/annotations/InterfaceStability.java | 19 +-
.../apache/pinot/common/config/Deserializer.java | 3 +-
.../apache/pinot/common/config/TagNameUtils.java | 3 +-
.../pinot/common/data/DateTimeFormatUnitSpec.java | 1 -
.../java/org/apache/pinot/common/data/Schema.java | 2 +-
...roupBasedStreamPartitionAssignmentStrategy.java | 3 +-
.../ReplicaGroupPartitionAssignmentGenerator.java | 4 -
.../StreamPartitionAssignmentGenerator.java | 5 +-
.../StreamPartitionAssignmentStrategy.java | 3 +-
.../StreamPartitionAssignmentStrategyFactory.java | 5 +-
.../pinot/common/request/AggregationInfo.java | 224 +++---
.../apache/pinot/common/request/BrokerRequest.java | 884 ++++++++++++---------
.../pinot/common/request/FilterOperator.java | 9 +-
.../apache/pinot/common/request/FilterQuery.java | 328 ++++----
.../pinot/common/request/FilterQueryMap.java | 138 ++--
.../org/apache/pinot/common/request/GroupBy.java | 234 +++---
.../pinot/common/request/HavingFilterQuery.java | 329 ++++----
.../pinot/common/request/HavingFilterQueryMap.java | 139 ++--
.../pinot/common/request/InstanceRequest.java | 313 ++++----
.../apache/pinot/common/request/QuerySource.java | 104 ++-
.../org/apache/pinot/common/request/QueryType.java | 287 ++++---
.../org/apache/pinot/common/request/Selection.java | 282 ++++---
.../apache/pinot/common/request/SelectionSort.java | 150 ++--
.../pinot/common/response/ProcessingException.java | 155 ++--
.../apache/pinot/common/utils/ServiceStatus.java | 11 +-
.../src/main/resources/log4j2-fatal-only.xml | 2 +-
.../main/resources/logging-severe-only.properties | 3 +-
.../src/main/resources/swagger-ui/index.html | 22 +-
...icaGroupBasedStreamPartitionAssignmentTest.java | 44 +-
.../StreamPartitionAssignmentGeneratorTest.java | 3 +-
.../UniformStreamPartitionAssignmentTest.java | 23 +-
.../pinot/common/utils/ServiceStatusTest.java | 32 +-
pinot-common/src/test/resources/log4j2.xml | 2 +-
34 files changed, 2151 insertions(+), 1634 deletions(-)
diff --git a/pinot-common/src/main/java/org/apache/pinot/annotations/InterfaceAudience.java b/pinot-common/src/main/java/org/apache/pinot/annotations/InterfaceAudience.java
index 865bdf6..6a77e2f 100644
--- a/pinot-common/src/main/java/org/apache/pinot/annotations/InterfaceAudience.java
+++ b/pinot-common/src/main/java/org/apache/pinot/annotations/InterfaceAudience.java
@@ -52,7 +52,10 @@ public class InterfaceAudience {
* Intended for use by any project or application.
*/
@Documented
- public @interface Public {};
+ public @interface Public {
+ }
+
+ ;
/**
* Intended only for the project(s) specified in the annotation.
@@ -61,13 +64,19 @@ public class InterfaceAudience {
@Documented
public @interface LimitedPrivate {
String[] value();
- };
+ }
+
+ ;
/**
* Intended for use only within Pinot itself.
*/
@Documented
- public @interface Private {};
+ public @interface Private {
+ }
+
+ ;
- private InterfaceAudience() {} // Audience can't exist on its own
-}
\ No newline at end of file
+ private InterfaceAudience() {
+ } // Audience can't exist on its own
+}
diff --git a/pinot-common/src/main/java/org/apache/pinot/annotations/InterfaceStability.java b/pinot-common/src/main/java/org/apache/pinot/annotations/InterfaceStability.java
index 26eeda3..60a6f3f 100644
--- a/pinot-common/src/main/java/org/apache/pinot/annotations/InterfaceStability.java
+++ b/pinot-common/src/main/java/org/apache/pinot/annotations/InterfaceStability.java
@@ -17,8 +17,10 @@
* under the License.
*/
package org.apache.pinot.annotations;
+
import java.lang.annotation.Documented;
+
/**
* Annotation to inform users of how much to rely on a particular package,
* class or method not changing over time. Currently the stability can be
@@ -53,18 +55,27 @@ public class InterfaceStability {
* can break compatibility only at major release (ie. at m.0).
*/
@Documented
- public @interface Stable {};
+ public @interface Stable {
+ }
+
+ ;
/**
* Evolving, but can break compatibility at minor release (i.e. m.x)
*/
@Documented
- public @interface Evolving {};
+ public @interface Evolving {
+ }
+
+ ;
/**
* No guarantee is provided as to reliability or stability across any
* level of release granularity.
*/
@Documented
- public @interface Unstable {};
-}
\ No newline at end of file
+ public @interface Unstable {
+ }
+
+ ;
+}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/config/Deserializer.java b/pinot-common/src/main/java/org/apache/pinot/common/config/Deserializer.java
index 794874f..cb41d75 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/config/Deserializer.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/config/Deserializer.java
@@ -367,8 +367,7 @@ public class Deserializer {
destinationValue = Byte.parseByte(stringValue);
} else if (fieldType.isAssignableFrom(Character.class) || fieldType.isAssignableFrom(char.class)) {
destinationValue = stringValue.charAt(0);
- }
- else {
+ } else {
throw new RuntimeException("Unsupported conversion from " + objectType + " -> " + fieldType);
}
} catch (Exception e) {
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/config/TagNameUtils.java b/pinot-common/src/main/java/org/apache/pinot/common/config/TagNameUtils.java
index 878c438..f1ab25e 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/config/TagNameUtils.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/config/TagNameUtils.java
@@ -45,7 +45,8 @@ public class TagNameUtils {
return false;
}
- public static TenantRole getTenantRoleFromTag(String tagName) throws InvalidConfigException {
+ public static TenantRole getTenantRoleFromTag(String tagName)
+ throws InvalidConfigException {
if (tagName.endsWith(ServerType.REALTIME.toString())) {
return TenantRole.SERVER;
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/data/DateTimeFormatUnitSpec.java b/pinot-common/src/main/java/org/apache/pinot/common/data/DateTimeFormatUnitSpec.java
index 7596867..34059e3 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/data/DateTimeFormatUnitSpec.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/data/DateTimeFormatUnitSpec.java
@@ -95,7 +95,6 @@ public class DateTimeFormatUnitSpec {
* @return Time since epoch of desired time unit
*/
public abstract long fromMillis(long millisSinceEpoch);
-
}
private TimeUnit _timeUnit = null;
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/data/Schema.java b/pinot-common/src/main/java/org/apache/pinot/common/data/Schema.java
index 2db6475..f06b14c 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/data/Schema.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/data/Schema.java
@@ -137,7 +137,7 @@ public final class Schema {
public List<MetricFieldSpec> getMetricFieldSpecs() {
return _metricFieldSpecs;
}
-
+
/**
* Required by JSON deserializer. DO NOT USE. DO NOT REMOVE.
* Adding @Deprecated to prevent usage
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/partition/ReplicaGroupBasedStreamPartitionAssignmentStrategy.java b/pinot-common/src/main/java/org/apache/pinot/common/partition/ReplicaGroupBasedStreamPartitionAssignmentStrategy.java
index 43fe69a..d3d5b6a 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/partition/ReplicaGroupBasedStreamPartitionAssignmentStrategy.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/partition/ReplicaGroupBasedStreamPartitionAssignmentStrategy.java
@@ -38,7 +38,8 @@ public class ReplicaGroupBasedStreamPartitionAssignmentStrategy implements Strea
*/
@Override
public PartitionAssignment getStreamPartitionAssignment(HelixManager helixManager, @Nonnull String tableNameWithType,
- @Nonnull List<String> partitions, int numReplicas, List<String> instances) throws InvalidConfigException {
+ @Nonnull List<String> partitions, int numReplicas, List<String> instances)
+ throws InvalidConfigException {
ReplicaGroupPartitionAssignment replicaGroupPartitionAssignment =
getReplicaGroupPartitionAssignment(helixManager, tableNameWithType);
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/partition/ReplicaGroupPartitionAssignmentGenerator.java b/pinot-common/src/main/java/org/apache/pinot/common/partition/ReplicaGroupPartitionAssignmentGenerator.java
index 3c1aeb5..b6f53c6 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/partition/ReplicaGroupPartitionAssignmentGenerator.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/partition/ReplicaGroupPartitionAssignmentGenerator.java
@@ -27,10 +27,6 @@ import org.apache.helix.store.zk.ZkHelixPropertyStore;
import org.apache.pinot.common.config.ReplicaGroupStrategyConfig;
import org.apache.pinot.common.config.TableConfig;
import org.apache.pinot.common.metadata.ZKMetadataProvider;
-import org.apache.pinot.common.utils.CommonConstants;
-import org.apache.pinot.common.utils.CommonConstants.Helix.TableType;
-
-import static org.apache.pinot.common.utils.CommonConstants.*;
/**
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentGenerator.java b/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentGenerator.java
index 0844e24..5598f36 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentGenerator.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentGenerator.java
@@ -121,8 +121,9 @@ public class StreamPartitionAssignmentGenerator {
StreamPartitionAssignmentStrategy streamPartitionAssignmentStrategy =
StreamPartitionAssignmentStrategyFactory.getStreamPartitionAssignmentStrategy(tableConfig);
- return streamPartitionAssignmentStrategy.getStreamPartitionAssignment(_helixManager, tableNameWithType, partitions,
- numReplicas, consumingTaggedInstances);
+ return streamPartitionAssignmentStrategy
+ .getStreamPartitionAssignment(_helixManager, tableNameWithType, partitions, numReplicas,
+ consumingTaggedInstances);
}
@VisibleForTesting
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentStrategy.java b/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentStrategy.java
index ea12517..8c79261 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentStrategy.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentStrategy.java
@@ -35,5 +35,6 @@ public interface StreamPartitionAssignmentStrategy {
*/
// TODO: pass current partition assignment to add smarts which can minimize shuffle
PartitionAssignment getStreamPartitionAssignment(HelixManager helixManager, @Nonnull String tableNameWithType,
- @Nonnull List<String> partitions, int numReplicas, List<String> instances) throws InvalidConfigException;
+ @Nonnull List<String> partitions, int numReplicas, List<String> instances)
+ throws InvalidConfigException;
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentStrategyFactory.java b/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentStrategyFactory.java
index 6a10ced..063e4c9 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentStrategyFactory.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/partition/StreamPartitionAssignmentStrategyFactory.java
@@ -35,9 +35,8 @@ public class StreamPartitionAssignmentStrategyFactory {
SegmentsValidationAndRetentionConfig validationConfig = tableConfig.getValidationConfig();
if (validationConfig != null) {
String segmentAssignmentStrategy = validationConfig.getSegmentAssignmentStrategy();
- if (segmentAssignmentStrategy != null
- && SegmentAssignmentStrategyType.ReplicaGroupSegmentAssignmentStrategy.toString()
- .equalsIgnoreCase(segmentAssignmentStrategy)) {
+ if (segmentAssignmentStrategy != null && SegmentAssignmentStrategyType.ReplicaGroupSegmentAssignmentStrategy
+ .toString().equalsIgnoreCase(segmentAssignmentStrategy)) {
return new ReplicaGroupBasedStreamPartitionAssignmentStrategy();
}
}
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 aa0b3db..6508b14 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
@@ -40,6 +40,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -48,27 +49,33 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-8-24")
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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new AggregationInfoStandardSchemeFactory());
schemes.put(TupleScheme.class, new AggregationInfoTupleSchemeFactory());
}
private String aggregationType; // optional
- private Map<String,String> aggregationParams; // optional
+ private Map<String, String> aggregationParams; // optional
private 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>();
@@ -82,7 +89,7 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // AGGREGATION_TYPE
return AGGREGATION_TYPE;
case 2: // AGGREGATION_PARAMS
@@ -100,7 +107,9 @@ 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -131,17 +140,23 @@ 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};
+ 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;
+
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,
+ 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,
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,
+ 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);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(AggregationInfo.class, metaDataMap);
@@ -159,7 +174,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);
+ Map<String, String> __this__aggregationParams = new HashMap<String, String>(other.aggregationParams);
this.aggregationParams = __this__aggregationParams;
}
this.isInSelectList = other.isInSelectList;
@@ -206,16 +221,16 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
public void putToAggregationParams(String key, String val) {
if (this.aggregationParams == null) {
- this.aggregationParams = new HashMap<String,String>();
+ this.aggregationParams = new HashMap<String, String>();
}
this.aggregationParams.put(key, val);
}
- public Map<String,String> getAggregationParams() {
+ public Map<String, String> getAggregationParams() {
return this.aggregationParams;
}
- public void setAggregationParams(Map<String,String> aggregationParams) {
+ public void setAggregationParams(Map<String, String> aggregationParams) {
this.aggregationParams = aggregationParams;
}
@@ -258,44 +273,42 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case AGGREGATION_TYPE:
- if (value == null) {
- unsetAggregationType();
- } else {
- setAggregationType((String)value);
- }
- break;
-
- case AGGREGATION_PARAMS:
- if (value == null) {
- unsetAggregationParams();
- } else {
- setAggregationParams((Map<String,String>)value);
- }
- break;
+ case AGGREGATION_TYPE:
+ if (value == null) {
+ unsetAggregationType();
+ } else {
+ setAggregationType((String) value);
+ }
+ break;
- case IS_IN_SELECT_LIST:
- if (value == null) {
- unsetIsInSelectList();
- } else {
- setIsInSelectList((Boolean)value);
- }
- break;
+ case AGGREGATION_PARAMS:
+ if (value == null) {
+ unsetAggregationParams();
+ } else {
+ setAggregationParams((Map<String, String>) value);
+ }
+ break;
+ case IS_IN_SELECT_LIST:
+ if (value == null) {
+ unsetIsInSelectList();
+ } else {
+ setIsInSelectList((Boolean) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case AGGREGATION_TYPE:
- return getAggregationType();
-
- case AGGREGATION_PARAMS:
- return getAggregationParams();
+ case AGGREGATION_TYPE:
+ return getAggregationType();
- case IS_IN_SELECT_LIST:
- return Boolean.valueOf(isIsInSelectList());
+ case AGGREGATION_PARAMS:
+ return getAggregationParams();
+ case IS_IN_SELECT_LIST:
+ return Boolean.valueOf(isIsInSelectList());
}
throw new IllegalStateException();
}
@@ -307,54 +320,63 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
}
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();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ 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;
+ }
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;
@@ -366,18 +388,21 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
boolean present_aggregationType = true && (isSetAggregationType());
list.add(present_aggregationType);
- if (present_aggregationType)
+ if (present_aggregationType) {
list.add(aggregationType);
+ }
boolean present_aggregationParams = true && (isSetAggregationParams());
list.add(present_aggregationParams);
- if (present_aggregationParams)
+ if (present_aggregationParams) {
list.add(aggregationParams);
+ }
boolean present_isInSelectList = true && (isSetIsInSelectList());
list.add(present_isInSelectList);
- if (present_isInSelectList)
+ if (present_isInSelectList) {
list.add(isInSelectList);
+ }
return list.hashCode();
}
@@ -427,11 +452,13 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -450,7 +477,9 @@ 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");
@@ -460,7 +489,9 @@ 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;
@@ -469,12 +500,14 @@ 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) {
@@ -482,7 +515,8 @@ 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, 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;
@@ -500,11 +534,11 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
private static class AggregationInfoStandardScheme extends 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) {
break;
@@ -522,11 +556,10 @@ 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);
+ struct.aggregationParams = new HashMap<String, String>(2 * _map52.size);
String _key53;
String _val54;
- for (int _i55 = 0; _i55 < _map52.size; ++_i55)
- {
+ for (int _i55 = 0; _i55 < _map52.size; ++_i55) {
_key53 = iprot.readString();
_val54 = iprot.readString();
struct.aggregationParams.put(_key53, _val54);
@@ -555,7 +588,8 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
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);
@@ -570,9 +604,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 (Map.Entry<String, String> _iter56 : struct.aggregationParams.entrySet()) {
oprot.writeString(_iter56.getKey());
oprot.writeString(_iter56.getValue());
}
@@ -589,7 +623,6 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class AggregationInfoTupleSchemeFactory implements SchemeFactory {
@@ -601,7 +634,8 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
private static class AggregationInfoTupleScheme extends TupleScheme<AggregationInfo> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, AggregationInfo struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, AggregationInfo struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetAggregationType()) {
@@ -620,8 +654,7 @@ 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 (Map.Entry<String, String> _iter57 : struct.aggregationParams.entrySet()) {
oprot.writeString(_iter57.getKey());
oprot.writeString(_iter57.getValue());
}
@@ -633,7 +666,8 @@ 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 {
+ 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);
if (incoming.get(0)) {
@@ -642,12 +676,13 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
}
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);
+ 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)
- {
+ for (int _i61 = 0; _i61 < _map58.size; ++_i61) {
_key59 = iprot.readString();
_val60 = iprot.readString();
struct.aggregationParams.put(_key59, _val60);
@@ -661,6 +696,5 @@ public class AggregationInfo implements org.apache.thrift.TBase<AggregationInfo,
}
}
}
-
}
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 c95c782..c9925de 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
@@ -40,6 +40,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -48,26 +49,46 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-8-24")
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 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("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 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());
@@ -85,29 +106,29 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
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 Map<String, String> debugOptions; // optional
+ private Map<String, String> queryOptions; // optional
private HavingFilterQuery havingFilterQuery; // optional
private HavingFilterQueryMap havingFilterSubQueryMap; // 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");
+ 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");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -121,7 +142,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // QUERY_TYPE
return QUERY_TYPE;
case 2: // QUERY_SOURCE
@@ -165,7 +186,9 @@ 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -196,47 +219,72 @@ 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};
+ 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};
public static final 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,
+ 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,
+ 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.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.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)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(BrokerRequest.class, metaDataMap);
}
@@ -288,11 +336,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);
+ Map<String, String> __this__debugOptions = new HashMap<String, String>(other.debugOptions);
this.debugOptions = __this__debugOptions;
}
if (other.isSetQueryOptions()) {
- Map<String,String> __this__queryOptions = new HashMap<String,String>(other.queryOptions);
+ Map<String, String> __this__queryOptions = new HashMap<String, String>(other.queryOptions);
this.queryOptions = __this__queryOptions;
}
if (other.isSetHavingFilterQuery()) {
@@ -624,16 +672,16 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
public void putToDebugOptions(String key, String val) {
if (this.debugOptions == null) {
- this.debugOptions = new HashMap<String,String>();
+ this.debugOptions = new HashMap<String, String>();
}
this.debugOptions.put(key, val);
}
- public Map<String,String> getDebugOptions() {
+ public Map<String, String> getDebugOptions() {
return this.debugOptions;
}
- public void setDebugOptions(Map<String,String> debugOptions) {
+ public void setDebugOptions(Map<String, String> debugOptions) {
this.debugOptions = debugOptions;
}
@@ -658,16 +706,16 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
public void putToQueryOptions(String key, String val) {
if (this.queryOptions == null) {
- this.queryOptions = new HashMap<String,String>();
+ this.queryOptions = new HashMap<String, String>();
}
this.queryOptions.put(key, val);
}
- public Map<String,String> getQueryOptions() {
+ public Map<String, String> getQueryOptions() {
return this.queryOptions;
}
- public void setQueryOptions(Map<String,String> queryOptions) {
+ public void setQueryOptions(Map<String, String> queryOptions) {
this.queryOptions = queryOptions;
}
@@ -734,187 +782,185 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- 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_TYPE:
+ if (value == null) {
+ unsetQueryType();
+ } else {
+ setQueryType((QueryType) value);
+ }
+ break;
- case TIME_INTERVAL:
- if (value == null) {
- unsetTimeInterval();
- } else {
- setTimeInterval((String)value);
- }
- break;
+ case QUERY_SOURCE:
+ if (value == null) {
+ unsetQuerySource();
+ } else {
+ setQuerySource((QuerySource) value);
+ }
+ break;
- case DURATION:
- if (value == null) {
- unsetDuration();
- } else {
- setDuration((String)value);
- }
- break;
+ case TIME_INTERVAL:
+ if (value == null) {
+ unsetTimeInterval();
+ } else {
+ setTimeInterval((String) value);
+ }
+ break;
- case FILTER_QUERY:
- if (value == null) {
- unsetFilterQuery();
- } else {
- setFilterQuery((FilterQuery)value);
- }
- break;
+ case DURATION:
+ if (value == null) {
+ unsetDuration();
+ } else {
+ setDuration((String) value);
+ }
+ break;
- case AGGREGATIONS_INFO:
- if (value == null) {
- unsetAggregationsInfo();
- } else {
- setAggregationsInfo((List<AggregationInfo>)value);
- }
- break;
+ case FILTER_QUERY:
+ if (value == null) {
+ unsetFilterQuery();
+ } else {
+ setFilterQuery((FilterQuery) value);
+ }
+ break;
- case GROUP_BY:
- if (value == null) {
- unsetGroupBy();
- } else {
- setGroupBy((GroupBy)value);
- }
- break;
+ case AGGREGATIONS_INFO:
+ if (value == null) {
+ unsetAggregationsInfo();
+ } else {
+ setAggregationsInfo((List<AggregationInfo>) value);
+ }
+ break;
- case SELECTIONS:
- if (value == null) {
- unsetSelections();
- } else {
- setSelections((Selection)value);
- }
- break;
+ case GROUP_BY:
+ if (value == null) {
+ unsetGroupBy();
+ } else {
+ setGroupBy((GroupBy) value);
+ }
+ break;
- case FILTER_SUB_QUERY_MAP:
- if (value == null) {
- unsetFilterSubQueryMap();
- } else {
- setFilterSubQueryMap((FilterQueryMap)value);
- }
- break;
+ case SELECTIONS:
+ if (value == null) {
+ unsetSelections();
+ } else {
+ setSelections((Selection) value);
+ }
+ break;
- case BUCKET_HASH_KEY:
- if (value == null) {
- unsetBucketHashKey();
- } else {
- setBucketHashKey((String)value);
- }
- break;
+ case FILTER_SUB_QUERY_MAP:
+ if (value == null) {
+ unsetFilterSubQueryMap();
+ } else {
+ setFilterSubQueryMap((FilterQueryMap) value);
+ }
+ break;
- case ENABLE_TRACE:
- if (value == null) {
- unsetEnableTrace();
- } else {
- setEnableTrace((Boolean)value);
- }
- break;
+ case BUCKET_HASH_KEY:
+ if (value == null) {
+ unsetBucketHashKey();
+ } else {
+ setBucketHashKey((String) value);
+ }
+ break;
- case RESPONSE_FORMAT:
- if (value == null) {
- unsetResponseFormat();
- } else {
- setResponseFormat((String)value);
- }
- break;
+ case ENABLE_TRACE:
+ if (value == null) {
+ unsetEnableTrace();
+ } else {
+ setEnableTrace((Boolean) value);
+ }
+ break;
- case DEBUG_OPTIONS:
- if (value == null) {
- unsetDebugOptions();
- } else {
- setDebugOptions((Map<String,String>)value);
- }
- break;
+ case RESPONSE_FORMAT:
+ if (value == null) {
+ unsetResponseFormat();
+ } else {
+ setResponseFormat((String) value);
+ }
+ break;
- case QUERY_OPTIONS:
- if (value == null) {
- unsetQueryOptions();
- } else {
- setQueryOptions((Map<String,String>)value);
- }
- break;
+ case DEBUG_OPTIONS:
+ if (value == null) {
+ unsetDebugOptions();
+ } else {
+ setDebugOptions((Map<String, String>) value);
+ }
+ break;
- case HAVING_FILTER_QUERY:
- if (value == null) {
- unsetHavingFilterQuery();
- } else {
- setHavingFilterQuery((HavingFilterQuery)value);
- }
- break;
+ case QUERY_OPTIONS:
+ if (value == null) {
+ unsetQueryOptions();
+ } else {
+ setQueryOptions((Map<String, String>) value);
+ }
+ break;
- case HAVING_FILTER_SUB_QUERY_MAP:
- if (value == null) {
- unsetHavingFilterSubQueryMap();
- } else {
- setHavingFilterSubQueryMap((HavingFilterQueryMap)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;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case QUERY_TYPE:
- return getQueryType();
+ case QUERY_TYPE:
+ return getQueryType();
- case QUERY_SOURCE:
- return getQuerySource();
+ case QUERY_SOURCE:
+ return getQuerySource();
- case TIME_INTERVAL:
- return getTimeInterval();
+ case TIME_INTERVAL:
+ return getTimeInterval();
- case DURATION:
- return getDuration();
+ case DURATION:
+ return getDuration();
- case FILTER_QUERY:
- return getFilterQuery();
+ case FILTER_QUERY:
+ return getFilterQuery();
- case AGGREGATIONS_INFO:
- return getAggregationsInfo();
+ case AGGREGATIONS_INFO:
+ return getAggregationsInfo();
- case GROUP_BY:
- return getGroupBy();
+ case GROUP_BY:
+ return getGroupBy();
- case SELECTIONS:
- return getSelections();
+ case SELECTIONS:
+ return getSelections();
- case FILTER_SUB_QUERY_MAP:
- return getFilterSubQueryMap();
+ case FILTER_SUB_QUERY_MAP:
+ return getFilterSubQueryMap();
- case BUCKET_HASH_KEY:
- return getBucketHashKey();
+ case BUCKET_HASH_KEY:
+ return getBucketHashKey();
- case ENABLE_TRACE:
- return Boolean.valueOf(isEnableTrace());
+ case ENABLE_TRACE:
+ return Boolean.valueOf(isEnableTrace());
- case RESPONSE_FORMAT:
- return getResponseFormat();
+ case RESPONSE_FORMAT:
+ return getResponseFormat();
- case DEBUG_OPTIONS:
- return getDebugOptions();
+ case DEBUG_OPTIONS:
+ return getDebugOptions();
- case QUERY_OPTIONS:
- return getQueryOptions();
+ case QUERY_OPTIONS:
+ return getQueryOptions();
- case HAVING_FILTER_QUERY:
- return getHavingFilterQuery();
-
- case HAVING_FILTER_SUB_QUERY_MAP:
- return getHavingFilterSubQueryMap();
+ case HAVING_FILTER_QUERY:
+ return getHavingFilterQuery();
+ case HAVING_FILTER_SUB_QUERY_MAP:
+ return getHavingFilterSubQueryMap();
}
throw new IllegalStateException();
}
@@ -926,197 +972,232 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
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 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();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ 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;
+ }
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;
+ }
}
return true;
@@ -1128,83 +1209,99 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
boolean present_queryType = true && (isSetQueryType());
list.add(present_queryType);
- if (present_queryType)
+ if (present_queryType) {
list.add(queryType);
+ }
boolean present_querySource = true && (isSetQuerySource());
list.add(present_querySource);
- if (present_querySource)
+ if (present_querySource) {
list.add(querySource);
+ }
boolean present_timeInterval = true && (isSetTimeInterval());
list.add(present_timeInterval);
- if (present_timeInterval)
+ if (present_timeInterval) {
list.add(timeInterval);
+ }
boolean present_duration = true && (isSetDuration());
list.add(present_duration);
- if (present_duration)
+ if (present_duration) {
list.add(duration);
+ }
boolean present_filterQuery = true && (isSetFilterQuery());
list.add(present_filterQuery);
- if (present_filterQuery)
+ if (present_filterQuery) {
list.add(filterQuery);
+ }
boolean present_aggregationsInfo = true && (isSetAggregationsInfo());
list.add(present_aggregationsInfo);
- if (present_aggregationsInfo)
+ if (present_aggregationsInfo) {
list.add(aggregationsInfo);
+ }
boolean present_groupBy = true && (isSetGroupBy());
list.add(present_groupBy);
- if (present_groupBy)
+ if (present_groupBy) {
list.add(groupBy);
+ }
boolean present_selections = true && (isSetSelections());
list.add(present_selections);
- if (present_selections)
+ if (present_selections) {
list.add(selections);
+ }
boolean present_filterSubQueryMap = true && (isSetFilterSubQueryMap());
list.add(present_filterSubQueryMap);
- if (present_filterSubQueryMap)
+ if (present_filterSubQueryMap) {
list.add(filterSubQueryMap);
+ }
boolean present_bucketHashKey = true && (isSetBucketHashKey());
list.add(present_bucketHashKey);
- if (present_bucketHashKey)
+ if (present_bucketHashKey) {
list.add(bucketHashKey);
+ }
boolean present_enableTrace = true && (isSetEnableTrace());
list.add(present_enableTrace);
- if (present_enableTrace)
+ if (present_enableTrace) {
list.add(enableTrace);
+ }
boolean present_responseFormat = true && (isSetResponseFormat());
list.add(present_responseFormat);
- if (present_responseFormat)
+ if (present_responseFormat) {
list.add(responseFormat);
+ }
boolean present_debugOptions = true && (isSetDebugOptions());
list.add(present_debugOptions);
- if (present_debugOptions)
+ if (present_debugOptions) {
list.add(debugOptions);
+ }
boolean present_queryOptions = true && (isSetQueryOptions());
list.add(present_queryOptions);
- if (present_queryOptions)
+ if (present_queryOptions) {
list.add(queryOptions);
+ }
boolean present_havingFilterQuery = true && (isSetHavingFilterQuery());
list.add(present_havingFilterQuery);
- if (present_havingFilterQuery)
+ if (present_havingFilterQuery) {
list.add(havingFilterQuery);
+ }
boolean present_havingFilterSubQueryMap = true && (isSetHavingFilterSubQueryMap());
list.add(present_havingFilterSubQueryMap);
- if (present_havingFilterSubQueryMap)
+ if (present_havingFilterSubQueryMap) {
list.add(havingFilterSubQueryMap);
+ }
return list.hashCode();
}
@@ -1372,7 +1469,8 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
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;
}
@@ -1384,11 +1482,13 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -1407,7 +1507,9 @@ 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");
@@ -1417,7 +1519,9 @@ 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");
@@ -1427,7 +1531,9 @@ 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");
@@ -1437,7 +1543,9 @@ 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");
@@ -1447,7 +1555,9 @@ 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");
@@ -1457,7 +1567,9 @@ 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");
@@ -1467,7 +1579,9 @@ 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");
@@ -1477,7 +1591,9 @@ 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");
@@ -1487,7 +1603,9 @@ 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");
@@ -1497,13 +1615,17 @@ 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");
@@ -1513,7 +1635,9 @@ 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");
@@ -1523,7 +1647,9 @@ 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");
@@ -1533,7 +1659,9 @@ 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");
@@ -1543,7 +1671,9 @@ 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");
@@ -1556,7 +1686,8 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
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) {
@@ -1585,7 +1716,8 @@ 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) {
@@ -1593,7 +1725,8 @@ 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, 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;
@@ -1611,11 +1744,11 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
private static class BrokerRequestStandardScheme extends 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) {
break;
@@ -1670,8 +1803,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
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)
- {
+ for (int _i96 = 0; _i96 < _list94.size; ++_i96) {
_elem95 = new AggregationInfo();
_elem95.read(iprot);
struct.aggregationsInfo.add(_elem95);
@@ -1738,11 +1870,10 @@ 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);
+ struct.debugOptions = new HashMap<String, String>(2 * _map97.size);
String _key98;
String _val99;
- for (int _i100 = 0; _i100 < _map97.size; ++_i100)
- {
+ for (int _i100 = 0; _i100 < _map97.size; ++_i100) {
_key98 = iprot.readString();
_val99 = iprot.readString();
struct.debugOptions.put(_key98, _val99);
@@ -1758,11 +1889,10 @@ 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);
+ struct.queryOptions = new HashMap<String, String>(2 * _map101.size);
String _key102;
String _val103;
- for (int _i104 = 0; _i104 < _map101.size; ++_i104)
- {
+ for (int _i104 = 0; _i104 < _map101.size; ++_i104) {
_key102 = iprot.readString();
_val103 = iprot.readString();
struct.queryOptions.put(_key102, _val103);
@@ -1801,7 +1931,8 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
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);
@@ -1844,9 +1975,9 @@ 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)
- {
+ 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.writeListEnd();
@@ -1898,9 +2029,9 @@ 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.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());
}
@@ -1913,9 +2044,9 @@ 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.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());
}
@@ -1941,7 +2072,6 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class BrokerRequestTupleSchemeFactory implements SchemeFactory {
@@ -1953,7 +2083,8 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
private static class BrokerRequestTupleScheme extends TupleScheme<BrokerRequest> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, BrokerRequest struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, BrokerRequest struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetQueryType()) {
@@ -2023,8 +2154,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (struct.isSetAggregationsInfo()) {
{
oprot.writeI32(struct.aggregationsInfo.size());
- for (AggregationInfo _iter108 : struct.aggregationsInfo)
- {
+ for (AggregationInfo _iter108 : struct.aggregationsInfo) {
_iter108.write(oprot);
}
}
@@ -2050,8 +2180,7 @@ 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())
- {
+ for (Map.Entry<String, String> _iter109 : struct.debugOptions.entrySet()) {
oprot.writeString(_iter109.getKey());
oprot.writeString(_iter109.getValue());
}
@@ -2060,8 +2189,7 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
if (struct.isSetQueryOptions()) {
{
oprot.writeI32(struct.queryOptions.size());
- for (Map.Entry<String, String> _iter110 : struct.queryOptions.entrySet())
- {
+ for (Map.Entry<String, String> _iter110 : struct.queryOptions.entrySet()) {
oprot.writeString(_iter110.getKey());
oprot.writeString(_iter110.getValue());
}
@@ -2076,7 +2204,8 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, BrokerRequest struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, BrokerRequest struct)
+ throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(16);
if (incoming.get(0)) {
@@ -2104,11 +2233,11 @@ 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());
+ 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)
- {
+ for (int _i113 = 0; _i113 < _list111.size; ++_i113) {
_elem112 = new AggregationInfo();
_elem112.read(iprot);
struct.aggregationsInfo.add(_elem112);
@@ -2145,12 +2274,13 @@ 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);
+ 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)
- {
+ for (int _i117 = 0; _i117 < _map114.size; ++_i117) {
_key115 = iprot.readString();
_val116 = iprot.readString();
struct.debugOptions.put(_key115, _val116);
@@ -2160,12 +2290,13 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
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);
+ 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)
- {
+ for (int _i121 = 0; _i121 < _map118.size; ++_i121) {
_key119 = iprot.readString();
_val120 = iprot.readString();
struct.queryOptions.put(_key119, _val120);
@@ -2185,6 +2316,5 @@ public class BrokerRequest implements org.apache.thrift.TBase<BrokerRequest, Bro
}
}
}
-
}
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 797aad5..2994e5d 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
@@ -30,14 +30,7 @@ package org.apache.pinot.common.request;
*
*/
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;
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 54a8141..e070b39 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
@@ -40,6 +40,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -48,15 +49,23 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-5-24")
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 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new FilterQueryStandardSchemeFactory());
schemes.put(TupleScheme.class, new FilterQueryTupleSchemeFactory());
@@ -70,18 +79,16 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
/** 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>();
@@ -95,7 +102,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // ID
return ID;
case 2: // COLUMN
@@ -117,7 +124,9 @@ 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -148,20 +157,27 @@ 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};
+ private static final _Fields optionals[] = {_Fields.COLUMN, _Fields.OPERATOR};
public static final 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,
+ 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,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -171,11 +187,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
public FilterQuery() {
}
- public FilterQuery(
- int id,
- List<String> value,
- List<Integer> nestedFilterQueryIds)
- {
+ public FilterQuery(int id, List<String> value, List<Integer> nestedFilterQueryIds) {
this();
this.id = id;
setIdIsSet(true);
@@ -379,66 +391,64 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((Integer)value);
- }
- break;
-
- case COLUMN:
- if (value == null) {
- unsetColumn();
- } else {
- setColumn((String)value);
- }
- break;
+ case ID:
+ if (value == null) {
+ unsetId();
+ } else {
+ setId((Integer) value);
+ }
+ break;
- case VALUE:
- if (value == null) {
- unsetValue();
- } else {
- setValue((List<String>)value);
- }
- break;
+ case COLUMN:
+ if (value == null) {
+ unsetColumn();
+ } else {
+ setColumn((String) value);
+ }
+ break;
- case OPERATOR:
- if (value == null) {
- unsetOperator();
- } else {
- setOperator((FilterOperator)value);
- }
- break;
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((List<String>) value);
+ }
+ break;
- case NESTED_FILTER_QUERY_IDS:
- if (value == null) {
- unsetNestedFilterQueryIds();
- } else {
- setNestedFilterQueryIds((List<Integer>)value);
- }
- break;
+ case OPERATOR:
+ if (value == null) {
+ unsetOperator();
+ } else {
+ setOperator((FilterOperator) value);
+ }
+ break;
+ case NESTED_FILTER_QUERY_IDS:
+ if (value == null) {
+ unsetNestedFilterQueryIds();
+ } else {
+ setNestedFilterQueryIds((List<Integer>) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case ID:
- return Integer.valueOf(getId());
+ case ID:
+ return Integer.valueOf(getId());
- case COLUMN:
- return getColumn();
+ case COLUMN:
+ return getColumn();
- case VALUE:
- return getValue();
+ case VALUE:
+ return getValue();
- case OPERATOR:
- return getOperator();
-
- case NESTED_FILTER_QUERY_IDS:
- return getNestedFilterQueryIds();
+ case OPERATOR:
+ return getOperator();
+ case NESTED_FILTER_QUERY_IDS:
+ return getNestedFilterQueryIds();
}
throw new IllegalStateException();
}
@@ -450,76 +460,89 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
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();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ 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;
+ }
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;
@@ -531,28 +554,33 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
boolean present_id = true;
list.add(present_id);
- if (present_id)
+ if (present_id) {
list.add(id);
+ }
boolean present_column = true && (isSetColumn());
list.add(present_column);
- if (present_column)
+ if (present_column) {
list.add(column);
+ }
boolean present_value = true && (isSetValue());
list.add(present_value);
- if (present_value)
+ if (present_value) {
list.add(value);
+ }
boolean present_operator = true && (isSetOperator());
list.add(present_operator);
- if (present_operator)
+ if (present_operator) {
list.add(operator.getValue());
+ }
boolean present_nestedFilterQueryIds = true && (isSetNestedFilterQueryIds());
list.add(present_nestedFilterQueryIds);
- if (present_nestedFilterQueryIds)
+ if (present_nestedFilterQueryIds) {
list.add(nestedFilterQueryIds);
+ }
return list.hashCode();
}
@@ -622,11 +650,13 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -639,7 +669,9 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
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");
@@ -648,7 +680,9 @@ 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");
@@ -657,7 +691,9 @@ 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");
@@ -666,7 +702,9 @@ 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");
@@ -678,7 +716,8 @@ 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());
@@ -687,7 +726,8 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
// 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) {
@@ -695,7 +735,8 @@ 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, 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;
@@ -713,11 +754,11 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
private static class FilterQueryStandardScheme extends 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) {
break;
@@ -745,8 +786,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
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)
- {
+ for (int _i2 = 0; _i2 < _list0.size; ++_i2) {
_elem1 = iprot.readString();
struct.value.add(_elem1);
}
@@ -771,8 +811,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
struct.nestedFilterQueryIds = new ArrayList<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);
}
@@ -792,7 +831,8 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
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);
@@ -809,9 +849,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 (String _iter6 : struct.value) {
oprot.writeString(_iter6);
}
oprot.writeListEnd();
@@ -828,9 +868,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();
@@ -840,7 +880,6 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class FilterQueryTupleSchemeFactory implements SchemeFactory {
@@ -852,7 +891,8 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
private static class FilterQueryTupleScheme extends TupleScheme<FilterQuery> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, FilterQuery struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, FilterQuery struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeI32(struct.id);
BitSet optionals = new BitSet();
@@ -875,8 +915,7 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
if (struct.isSetValue()) {
{
oprot.writeI32(struct.value.size());
- for (String _iter8 : struct.value)
- {
+ for (String _iter8 : struct.value) {
oprot.writeString(_iter8);
}
}
@@ -887,8 +926,7 @@ 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);
}
}
@@ -896,7 +934,8 @@ 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 {
+ public void read(org.apache.thrift.protocol.TProtocol prot, FilterQuery struct)
+ throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.id = iprot.readI32();
struct.setIdIsSet(true);
@@ -907,11 +946,11 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list10 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ 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)
- {
+ for (int _i12 = 0; _i12 < _list10.size; ++_i12) {
_elem11 = iprot.readString();
struct.value.add(_elem11);
}
@@ -924,11 +963,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());
+ 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);
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);
}
@@ -937,6 +976,5 @@ public class FilterQuery implements org.apache.thrift.TBase<FilterQuery, FilterQ
}
}
}
-
}
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 8754c80..0a78c50 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
@@ -39,6 +39,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -47,21 +48,25 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-5-24")
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.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.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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new FilterQueryMapStandardSchemeFactory());
schemes.put(TupleScheme.class, new FilterQueryMapTupleSchemeFactory());
}
- private Map<Integer,FilterQuery> filterQueryMap; // optional
+ private Map<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>();
@@ -75,7 +80,7 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // FILTER_QUERY_MAP
return FILTER_QUERY_MAP;
default:
@@ -89,7 +94,9 @@ 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -120,12 +127,16 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
// isset id assignments
private static final _Fields optionals[] = {_Fields.FILTER_QUERY_MAP};
public static final 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,
+ 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))));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
+ FilterQuery.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(FilterQueryMap.class, metaDataMap);
}
@@ -138,7 +149,7 @@ 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());
+ Map<Integer, FilterQuery> __this__filterQueryMap = new HashMap<Integer, FilterQuery>(other.filterQueryMap.size());
for (Map.Entry<Integer, FilterQuery> other_element : other.filterQueryMap.entrySet()) {
Integer other_element_key = other_element.getKey();
@@ -169,16 +180,16 @@ 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 HashMap<Integer, FilterQuery>();
}
this.filterQueryMap.put(key, val);
}
- public Map<Integer,FilterQuery> getFilterQueryMap() {
+ public Map<Integer, FilterQuery> getFilterQueryMap() {
return this.filterQueryMap;
}
- public void setFilterQueryMap(Map<Integer,FilterQuery> filterQueryMap) {
+ public void setFilterQueryMap(Map<Integer, FilterQuery> filterQueryMap) {
this.filterQueryMap = filterQueryMap;
}
@@ -199,22 +210,20 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
public void setFieldValue(_Fields field, 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((Map<Integer, FilterQuery>) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case FILTER_QUERY_MAP:
- return getFilterQueryMap();
-
+ case FILTER_QUERY_MAP:
+ return getFilterQueryMap();
}
throw new IllegalStateException();
}
@@ -226,32 +235,37 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
}
switch (field) {
- case FILTER_QUERY_MAP:
- return isSetFilterQueryMap();
+ case FILTER_QUERY_MAP:
+ return isSetFilterQueryMap();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ 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;
+ }
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;
@@ -263,8 +277,9 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
boolean present_filterQueryMap = true && (isSetFilterQueryMap());
list.add(present_filterQueryMap);
- if (present_filterQueryMap)
+ if (present_filterQueryMap) {
list.add(filterQueryMap);
+ }
return list.hashCode();
}
@@ -294,11 +309,13 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -320,12 +337,14 @@ 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) {
@@ -333,7 +352,8 @@ 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, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -349,11 +369,11 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
private static class FilterQueryMapStandardScheme extends 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) {
break;
@@ -363,11 +383,10 @@ 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 HashMap<Integer, FilterQuery>(2 * _map16.size);
int _key17;
FilterQuery _val18;
- for (int _i19 = 0; _i19 < _map16.size; ++_i19)
- {
+ for (int _i19 = 0; _i19 < _map16.size; ++_i19) {
_key17 = iprot.readI32();
_val18 = new FilterQuery();
_val18.read(iprot);
@@ -389,7 +408,8 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
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);
@@ -397,9 +417,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 (Map.Entry<Integer, FilterQuery> _iter20 : struct.filterQueryMap.entrySet()) {
oprot.writeI32(_iter20.getKey());
_iter20.getValue().write(oprot);
}
@@ -411,7 +431,6 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class FilterQueryMapTupleSchemeFactory implements SchemeFactory {
@@ -423,7 +442,8 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
private static class FilterQueryMapTupleScheme extends TupleScheme<FilterQueryMap> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, FilterQueryMap struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, FilterQueryMap struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetFilterQueryMap()) {
@@ -433,8 +453,7 @@ 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 (Map.Entry<Integer, FilterQuery> _iter21 : struct.filterQueryMap.entrySet()) {
oprot.writeI32(_iter21.getKey());
_iter21.getValue().write(oprot);
}
@@ -443,17 +462,19 @@ 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 {
+ 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);
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 HashMap<Integer, FilterQuery>(2 * _map22.size);
int _key23;
FilterQuery _val24;
- for (int _i25 = 0; _i25 < _map22.size; ++_i25)
- {
+ for (int _i25 = 0; _i25 < _map22.size; ++_i25) {
_key23 = iprot.readI32();
_val24 = new FilterQuery();
_val24.read(iprot);
@@ -464,6 +485,5 @@ public class FilterQueryMap implements org.apache.thrift.TBase<FilterQueryMap, F
}
}
}
-
}
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 134eb6b..b79d7e0 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
@@ -40,6 +40,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -48,13 +49,19 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-5-24")
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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new GroupByStandardSchemeFactory());
schemes.put(TupleScheme.class, new GroupByTupleSchemeFactory());
@@ -66,9 +73,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
/** 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>();
@@ -82,7 +87,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // COLUMNS
return COLUMNS;
case 2: // TOP_N
@@ -100,7 +105,9 @@ 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -131,18 +138,23 @@ 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};
+ private static final _Fields optionals[] = {_Fields.COLUMNS, _Fields.TOP_N, _Fields.EXPRESSIONS};
public static final 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))));
+ 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);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(GroupBy.class, metaDataMap);
}
@@ -278,44 +290,42 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case COLUMNS:
- if (value == null) {
- unsetColumns();
- } else {
- setColumns((List<String>)value);
- }
- break;
-
- case TOP_N:
- if (value == null) {
- unsetTopN();
- } else {
- setTopN((Long)value);
- }
- break;
+ case COLUMNS:
+ if (value == null) {
+ unsetColumns();
+ } else {
+ setColumns((List<String>) value);
+ }
+ break;
- case EXPRESSIONS:
- if (value == null) {
- unsetExpressions();
- } else {
- setExpressions((List<String>)value);
- }
- break;
+ case TOP_N:
+ if (value == null) {
+ unsetTopN();
+ } else {
+ setTopN((Long) value);
+ }
+ break;
+ case EXPRESSIONS:
+ if (value == null) {
+ unsetExpressions();
+ } else {
+ setExpressions((List<String>) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case COLUMNS:
- return getColumns();
+ case COLUMNS:
+ return getColumns();
- case TOP_N:
- return Long.valueOf(getTopN());
-
- case EXPRESSIONS:
- return getExpressions();
+ case TOP_N:
+ return Long.valueOf(getTopN());
+ case EXPRESSIONS:
+ return getExpressions();
}
throw new IllegalStateException();
}
@@ -327,54 +337,63 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
}
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();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ 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;
+ }
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;
@@ -386,18 +405,21 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
boolean present_columns = true && (isSetColumns());
list.add(present_columns);
- if (present_columns)
+ if (present_columns) {
list.add(columns);
+ }
boolean present_topN = true && (isSetTopN());
list.add(present_topN);
- if (present_topN)
+ if (present_topN) {
list.add(topN);
+ }
boolean present_expressions = true && (isSetExpressions());
list.add(present_expressions);
- if (present_expressions)
+ if (present_expressions) {
list.add(expressions);
+ }
return list.hashCode();
}
@@ -447,11 +469,13 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -470,13 +494,17 @@ 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");
@@ -489,12 +517,14 @@ 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) {
@@ -502,7 +532,8 @@ 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, 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;
@@ -520,11 +551,11 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
private static class GroupByStandardScheme extends 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) {
break;
@@ -536,8 +567,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
org.apache.thrift.protocol.TList _list36 = iprot.readListBegin();
struct.columns = new ArrayList<String>(_list36.size);
String _elem37;
- for (int _i38 = 0; _i38 < _list36.size; ++_i38)
- {
+ for (int _i38 = 0; _i38 < _list36.size; ++_i38) {
_elem37 = iprot.readString();
struct.columns.add(_elem37);
}
@@ -562,8 +592,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
org.apache.thrift.protocol.TList _list39 = iprot.readListBegin();
struct.expressions = new ArrayList<String>(_list39.size);
String _elem40;
- for (int _i41 = 0; _i41 < _list39.size; ++_i41)
- {
+ for (int _i41 = 0; _i41 < _list39.size; ++_i41) {
_elem40 = iprot.readString();
struct.expressions.add(_elem40);
}
@@ -583,7 +612,8 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
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);
@@ -591,9 +621,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 _iter42 : struct.columns)
- {
+ oprot.writeListBegin(
+ new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.columns.size()));
+ for (String _iter42 : struct.columns) {
oprot.writeString(_iter42);
}
oprot.writeListEnd();
@@ -610,9 +640,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 _iter43 : struct.expressions)
- {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
+ struct.expressions.size()));
+ for (String _iter43 : struct.expressions) {
oprot.writeString(_iter43);
}
oprot.writeListEnd();
@@ -623,7 +653,6 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class GroupByTupleSchemeFactory implements SchemeFactory {
@@ -635,7 +664,8 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
private static class GroupByTupleScheme extends TupleScheme<GroupBy> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, GroupBy struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, GroupBy struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetColumns()) {
@@ -651,8 +681,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
if (struct.isSetColumns()) {
{
oprot.writeI32(struct.columns.size());
- for (String _iter44 : struct.columns)
- {
+ for (String _iter44 : struct.columns) {
oprot.writeString(_iter44);
}
}
@@ -663,8 +692,7 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
if (struct.isSetExpressions()) {
{
oprot.writeI32(struct.expressions.size());
- for (String _iter45 : struct.expressions)
- {
+ for (String _iter45 : struct.expressions) {
oprot.writeString(_iter45);
}
}
@@ -672,16 +700,17 @@ 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 {
+ 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);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list46 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ org.apache.thrift.protocol.TList _list46 =
+ new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.columns = new ArrayList<String>(_list46.size);
String _elem47;
- for (int _i48 = 0; _i48 < _list46.size; ++_i48)
- {
+ for (int _i48 = 0; _i48 < _list46.size; ++_i48) {
_elem47 = iprot.readString();
struct.columns.add(_elem47);
}
@@ -694,11 +723,11 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list49 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ org.apache.thrift.protocol.TList _list49 =
+ new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.expressions = new ArrayList<String>(_list49.size);
String _elem50;
- for (int _i51 = 0; _i51 < _list49.size; ++_i51)
- {
+ for (int _i51 = 0; _i51 < _list49.size; ++_i51) {
_elem50 = iprot.readString();
struct.expressions.add(_elem50);
}
@@ -707,6 +736,5 @@ public class GroupBy implements org.apache.thrift.TBase<GroupBy, GroupBy._Fields
}
}
}
-
}
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 3ab0de9..de28536 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
@@ -40,6 +40,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -48,15 +49,23 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-8-24")
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 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new HavingFilterQueryStandardSchemeFactory());
schemes.put(TupleScheme.class, new HavingFilterQueryTupleSchemeFactory());
@@ -70,18 +79,16 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
/** 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>();
@@ -95,7 +102,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // ID
return ID;
case 2: // AGGREGATION_INFO
@@ -117,7 +124,9 @@ 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -148,20 +157,28 @@ 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};
+ private static final _Fields optionals[] = {_Fields.AGGREGATION_INFO, _Fields.OPERATOR};
public static final 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,
+ 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,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
@@ -171,11 +188,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
public HavingFilterQuery() {
}
- public HavingFilterQuery(
- int id,
- List<String> value,
- List<Integer> nestedFilterQueryIds)
- {
+ public HavingFilterQuery(int id, List<String> value, List<Integer> nestedFilterQueryIds) {
this();
this.id = id;
setIdIsSet(true);
@@ -379,66 +392,64 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case ID:
- if (value == null) {
- unsetId();
- } else {
- setId((Integer)value);
- }
- break;
-
- case AGGREGATION_INFO:
- if (value == null) {
- unsetAggregationInfo();
- } else {
- setAggregationInfo((AggregationInfo)value);
- }
- break;
+ case ID:
+ if (value == null) {
+ unsetId();
+ } else {
+ setId((Integer) value);
+ }
+ break;
- case VALUE:
- if (value == null) {
- unsetValue();
- } else {
- setValue((List<String>)value);
- }
- break;
+ case AGGREGATION_INFO:
+ if (value == null) {
+ unsetAggregationInfo();
+ } else {
+ setAggregationInfo((AggregationInfo) value);
+ }
+ break;
- case OPERATOR:
- if (value == null) {
- unsetOperator();
- } else {
- setOperator((FilterOperator)value);
- }
- break;
+ case VALUE:
+ if (value == null) {
+ unsetValue();
+ } else {
+ setValue((List<String>) value);
+ }
+ break;
- case NESTED_FILTER_QUERY_IDS:
- if (value == null) {
- unsetNestedFilterQueryIds();
- } else {
- setNestedFilterQueryIds((List<Integer>)value);
- }
- break;
+ case OPERATOR:
+ if (value == null) {
+ unsetOperator();
+ } else {
+ setOperator((FilterOperator) value);
+ }
+ break;
+ case NESTED_FILTER_QUERY_IDS:
+ if (value == null) {
+ unsetNestedFilterQueryIds();
+ } else {
+ setNestedFilterQueryIds((List<Integer>) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case ID:
- return Integer.valueOf(getId());
+ case ID:
+ return Integer.valueOf(getId());
- case AGGREGATION_INFO:
- return getAggregationInfo();
+ case AGGREGATION_INFO:
+ return getAggregationInfo();
- case VALUE:
- return getValue();
+ case VALUE:
+ return getValue();
- case OPERATOR:
- return getOperator();
-
- case NESTED_FILTER_QUERY_IDS:
- return getNestedFilterQueryIds();
+ case OPERATOR:
+ return getOperator();
+ case NESTED_FILTER_QUERY_IDS:
+ return getNestedFilterQueryIds();
}
throw new IllegalStateException();
}
@@ -450,76 +461,89 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
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();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ 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;
+ }
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;
@@ -531,28 +555,33 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
boolean present_id = true;
list.add(present_id);
- if (present_id)
+ if (present_id) {
list.add(id);
+ }
boolean present_aggregationInfo = true && (isSetAggregationInfo());
list.add(present_aggregationInfo);
- if (present_aggregationInfo)
+ if (present_aggregationInfo) {
list.add(aggregationInfo);
+ }
boolean present_value = true && (isSetValue());
list.add(present_value);
- if (present_value)
+ if (present_value) {
list.add(value);
+ }
boolean present_operator = true && (isSetOperator());
list.add(present_operator);
- if (present_operator)
+ if (present_operator) {
list.add(operator.getValue());
+ }
boolean present_nestedFilterQueryIds = true && (isSetNestedFilterQueryIds());
list.add(present_nestedFilterQueryIds);
- if (present_nestedFilterQueryIds)
+ if (present_nestedFilterQueryIds) {
list.add(nestedFilterQueryIds);
+ }
return list.hashCode();
}
@@ -622,11 +651,13 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -639,7 +670,9 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
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");
@@ -648,7 +681,9 @@ 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");
@@ -657,7 +692,9 @@ 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");
@@ -666,7 +703,9 @@ 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");
@@ -678,7 +717,8 @@ 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());
@@ -687,7 +727,8 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
// 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) {
@@ -695,7 +736,8 @@ 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, 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;
@@ -713,11 +755,11 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
private static class HavingFilterQueryStandardScheme extends 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) {
break;
@@ -746,8 +788,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
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)
- {
+ for (int _i28 = 0; _i28 < _list26.size; ++_i28) {
_elem27 = iprot.readString();
struct.value.add(_elem27);
}
@@ -772,8 +813,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
org.apache.thrift.protocol.TList _list29 = iprot.readListBegin();
struct.nestedFilterQueryIds = new ArrayList<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);
}
@@ -793,7 +833,8 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
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);
@@ -810,9 +851,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 (String _iter32 : struct.value) {
oprot.writeString(_iter32);
}
oprot.writeListEnd();
@@ -829,9 +870,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();
@@ -841,7 +882,6 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class HavingFilterQueryTupleSchemeFactory implements SchemeFactory {
@@ -853,7 +893,8 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
private static class HavingFilterQueryTupleScheme extends TupleScheme<HavingFilterQuery> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, HavingFilterQuery struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, HavingFilterQuery struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeI32(struct.id);
BitSet optionals = new BitSet();
@@ -876,8 +917,7 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
if (struct.isSetValue()) {
{
oprot.writeI32(struct.value.size());
- for (String _iter34 : struct.value)
- {
+ for (String _iter34 : struct.value) {
oprot.writeString(_iter34);
}
}
@@ -888,8 +928,7 @@ 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);
}
}
@@ -897,7 +936,8 @@ 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 {
+ public void read(org.apache.thrift.protocol.TProtocol prot, HavingFilterQuery struct)
+ throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.id = iprot.readI32();
struct.setIdIsSet(true);
@@ -909,11 +949,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());
+ 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)
- {
+ for (int _i38 = 0; _i38 < _list36.size; ++_i38) {
_elem37 = iprot.readString();
struct.value.add(_elem37);
}
@@ -926,11 +966,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());
+ 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);
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);
}
@@ -939,6 +979,5 @@ public class HavingFilterQuery implements org.apache.thrift.TBase<HavingFilterQu
}
}
}
-
}
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 bcc0c59..95dbca6 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
@@ -39,24 +39,29 @@ 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.2)", date = "2017-8-24")
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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new HavingFilterQueryMapStandardSchemeFactory());
schemes.put(TupleScheme.class, new HavingFilterQueryMapTupleSchemeFactory());
}
- private Map<Integer,HavingFilterQuery> filterQueryMap; // optional
+ private Map<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>();
@@ -70,7 +75,7 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // FILTER_QUERY_MAP
return FILTER_QUERY_MAP;
default:
@@ -84,7 +89,9 @@ 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -115,12 +122,16 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
// isset id assignments
private static final _Fields optionals[] = {_Fields.FILTER_QUERY_MAP};
public static final 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,
+ 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))));
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
+ HavingFilterQuery.class))));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(HavingFilterQueryMap.class, metaDataMap);
}
@@ -133,7 +144,8 @@ 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());
+ Map<Integer, HavingFilterQuery> __this__filterQueryMap =
+ new HashMap<Integer, HavingFilterQuery>(other.filterQueryMap.size());
for (Map.Entry<Integer, HavingFilterQuery> other_element : other.filterQueryMap.entrySet()) {
Integer other_element_key = other_element.getKey();
@@ -164,16 +176,16 @@ 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 HashMap<Integer, HavingFilterQuery>();
}
this.filterQueryMap.put(key, val);
}
- public Map<Integer,HavingFilterQuery> getFilterQueryMap() {
+ public Map<Integer, HavingFilterQuery> getFilterQueryMap() {
return this.filterQueryMap;
}
- public void setFilterQueryMap(Map<Integer,HavingFilterQuery> filterQueryMap) {
+ public void setFilterQueryMap(Map<Integer, HavingFilterQuery> filterQueryMap) {
this.filterQueryMap = filterQueryMap;
}
@@ -194,22 +206,20 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
public void setFieldValue(_Fields field, 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((Map<Integer, HavingFilterQuery>) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case FILTER_QUERY_MAP:
- return getFilterQueryMap();
-
+ case FILTER_QUERY_MAP:
+ return getFilterQueryMap();
}
throw new IllegalStateException();
}
@@ -221,32 +231,37 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
}
switch (field) {
- case FILTER_QUERY_MAP:
- return isSetFilterQueryMap();
+ case FILTER_QUERY_MAP:
+ return isSetFilterQueryMap();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ 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;
+ }
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;
@@ -258,8 +273,9 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
boolean present_filterQueryMap = true && (isSetFilterQueryMap());
list.add(present_filterQueryMap);
- if (present_filterQueryMap)
+ if (present_filterQueryMap) {
list.add(filterQueryMap);
+ }
return list.hashCode();
}
@@ -289,11 +305,13 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -315,12 +333,14 @@ 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) {
@@ -328,7 +348,8 @@ 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, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -344,11 +365,11 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
private static class HavingFilterQueryMapStandardScheme extends 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) {
break;
@@ -358,11 +379,10 @@ 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 HashMap<Integer, HavingFilterQuery>(2 * _map42.size);
int _key43;
HavingFilterQuery _val44;
- for (int _i45 = 0; _i45 < _map42.size; ++_i45)
- {
+ for (int _i45 = 0; _i45 < _map42.size; ++_i45) {
_key43 = iprot.readI32();
_val44 = new HavingFilterQuery();
_val44.read(iprot);
@@ -384,7 +404,8 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
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);
@@ -392,9 +413,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 (Map.Entry<Integer, HavingFilterQuery> _iter46 : struct.filterQueryMap.entrySet()) {
oprot.writeI32(_iter46.getKey());
_iter46.getValue().write(oprot);
}
@@ -406,7 +427,6 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class HavingFilterQueryMapTupleSchemeFactory implements SchemeFactory {
@@ -418,7 +438,8 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
private static class HavingFilterQueryMapTupleScheme extends TupleScheme<HavingFilterQueryMap> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, HavingFilterQueryMap struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, HavingFilterQueryMap struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetFilterQueryMap()) {
@@ -428,8 +449,7 @@ 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 (Map.Entry<Integer, HavingFilterQuery> _iter47 : struct.filterQueryMap.entrySet()) {
oprot.writeI32(_iter47.getKey());
_iter47.getValue().write(oprot);
}
@@ -438,17 +458,19 @@ 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 {
+ 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);
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 HashMap<Integer, HavingFilterQuery>(2 * _map48.size);
int _key49;
HavingFilterQuery _val50;
- for (int _i51 = 0; _i51 < _map48.size; ++_i51)
- {
+ for (int _i51 = 0; _i51 < _map48.size; ++_i51) {
_key49 = iprot.readI32();
_val50 = new HavingFilterQuery();
_val50.read(iprot);
@@ -459,6 +481,5 @@ public class HavingFilterQueryMap implements org.apache.thrift.TBase<HavingFilte
}
}
}
-
}
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 b0fd5fa..a182e3b 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
@@ -40,6 +40,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -48,15 +49,23 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-5-24")
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 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new InstanceRequestStandardSchemeFactory());
schemes.put(TupleScheme.class, new InstanceRequestTupleSchemeFactory());
@@ -70,11 +79,11 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
/** 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>();
@@ -88,7 +97,7 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // REQUEST_ID
return REQUEST_ID;
case 2: // QUERY
@@ -110,7 +119,9 @@ 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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -142,21 +153,29 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
private static final int __REQUESTID_ISSET_ID = 0;
private static final int __ENABLETRACE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.SEARCH_SEGMENTS,_Fields.ENABLE_TRACE,_Fields.BROKER_ID};
+ private static final _Fields optionals[] = {_Fields.SEARCH_SEGMENTS, _Fields.ENABLE_TRACE, _Fields.BROKER_ID};
public static final 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.REQUEST_ID, new org.apache.thrift.meta_data.FieldMetaData("requestId", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
- tmpMap.put(_Fields.QUERY, new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, BrokerRequest.class)));
- tmpMap.put(_Fields.SEARCH_SEGMENTS, new org.apache.thrift.meta_data.FieldMetaData("searchSegments", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
+ new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.REQUEST_ID,
+ new org.apache.thrift.meta_data.FieldMetaData("requestId", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I64)));
+ tmpMap.put(_Fields.QUERY,
+ new org.apache.thrift.meta_data.FieldMetaData("query", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT,
+ BrokerRequest.class)));
+ tmpMap.put(_Fields.SEARCH_SEGMENTS, new org.apache.thrift.meta_data.FieldMetaData("searchSegments",
+ 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.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.BROKER_ID, new org.apache.thrift.meta_data.FieldMetaData("brokerId", 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.BROKER_ID,
+ new org.apache.thrift.meta_data.FieldMetaData("brokerId", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(InstanceRequest.class, metaDataMap);
}
@@ -164,10 +183,7 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
public InstanceRequest() {
}
- public InstanceRequest(
- long requestId,
- BrokerRequest query)
- {
+ public InstanceRequest(long requestId, BrokerRequest query) {
this();
this.requestId = requestId;
setRequestIdIsSet(true);
@@ -338,66 +354,64 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case REQUEST_ID:
- if (value == null) {
- unsetRequestId();
- } else {
- setRequestId((Long)value);
- }
- break;
-
- case QUERY:
- if (value == null) {
- unsetQuery();
- } else {
- setQuery((BrokerRequest)value);
- }
- break;
+ case REQUEST_ID:
+ if (value == null) {
+ unsetRequestId();
+ } else {
+ setRequestId((Long) value);
+ }
+ break;
- case SEARCH_SEGMENTS:
- if (value == null) {
- unsetSearchSegments();
- } else {
- setSearchSegments((List<String>)value);
- }
- break;
+ case QUERY:
+ if (value == null) {
+ unsetQuery();
+ } else {
+ setQuery((BrokerRequest) value);
+ }
+ break;
- case ENABLE_TRACE:
- if (value == null) {
- unsetEnableTrace();
- } else {
- setEnableTrace((Boolean)value);
- }
- break;
+ case SEARCH_SEGMENTS:
+ if (value == null) {
+ unsetSearchSegments();
+ } else {
+ setSearchSegments((List<String>) value);
+ }
+ break;
- case BROKER_ID:
- if (value == null) {
- unsetBrokerId();
- } else {
- setBrokerId((String)value);
- }
- break;
+ case ENABLE_TRACE:
+ if (value == null) {
+ unsetEnableTrace();
+ } else {
+ setEnableTrace((Boolean) value);
+ }
+ break;
+ case BROKER_ID:
+ if (value == null) {
+ unsetBrokerId();
+ } else {
+ setBrokerId((String) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case REQUEST_ID:
- return Long.valueOf(getRequestId());
-
- case QUERY:
- return getQuery();
+ case REQUEST_ID:
+ return Long.valueOf(getRequestId());
- case SEARCH_SEGMENTS:
- return getSearchSegments();
+ case QUERY:
+ return getQuery();
- case ENABLE_TRACE:
- return Boolean.valueOf(isEnableTrace());
+ case SEARCH_SEGMENTS:
+ return getSearchSegments();
- case BROKER_ID:
- return getBrokerId();
+ case ENABLE_TRACE:
+ return Boolean.valueOf(isEnableTrace());
+ case BROKER_ID:
+ return getBrokerId();
}
throw new IllegalStateException();
}
@@ -409,76 +423,89 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
}
switch (field) {
- case REQUEST_ID:
- return isSetRequestId();
- case QUERY:
- return isSetQuery();
- case SEARCH_SEGMENTS:
- return isSetSearchSegments();
- case ENABLE_TRACE:
- return isSetEnableTrace();
- case BROKER_ID:
- return isSetBrokerId();
+ case REQUEST_ID:
+ return isSetRequestId();
+ case QUERY:
+ return isSetQuery();
+ case SEARCH_SEGMENTS:
+ return isSetSearchSegments();
+ case ENABLE_TRACE:
+ return isSetEnableTrace();
+ case BROKER_ID:
+ return isSetBrokerId();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ if (that == null) {
return false;
- if (that instanceof InstanceRequest)
- return this.equals((InstanceRequest)that);
+ }
+ if (that instanceof InstanceRequest) {
+ return this.equals((InstanceRequest) that);
+ }
return false;
}
public boolean equals(InstanceRequest that) {
- if (that == null)
+ if (that == null) {
return false;
+ }
boolean this_present_requestId = true;
boolean that_present_requestId = true;
if (this_present_requestId || that_present_requestId) {
- if (!(this_present_requestId && that_present_requestId))
+ if (!(this_present_requestId && that_present_requestId)) {
return false;
- if (this.requestId != that.requestId)
+ }
+ if (this.requestId != that.requestId) {
return false;
+ }
}
boolean this_present_query = true && this.isSetQuery();
boolean that_present_query = true && that.isSetQuery();
if (this_present_query || that_present_query) {
- if (!(this_present_query && that_present_query))
+ if (!(this_present_query && that_present_query)) {
return false;
- if (!this.query.equals(that.query))
+ }
+ if (!this.query.equals(that.query)) {
return false;
+ }
}
boolean this_present_searchSegments = true && this.isSetSearchSegments();
boolean that_present_searchSegments = true && that.isSetSearchSegments();
if (this_present_searchSegments || that_present_searchSegments) {
- if (!(this_present_searchSegments && that_present_searchSegments))
+ if (!(this_present_searchSegments && that_present_searchSegments)) {
return false;
- if (!this.searchSegments.equals(that.searchSegments))
+ }
+ if (!this.searchSegments.equals(that.searchSegments)) {
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_brokerId = true && this.isSetBrokerId();
boolean that_present_brokerId = true && that.isSetBrokerId();
if (this_present_brokerId || that_present_brokerId) {
- if (!(this_present_brokerId && that_present_brokerId))
+ if (!(this_present_brokerId && that_present_brokerId)) {
return false;
- if (!this.brokerId.equals(that.brokerId))
+ }
+ if (!this.brokerId.equals(that.brokerId)) {
return false;
+ }
}
return true;
@@ -490,28 +517,33 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
boolean present_requestId = true;
list.add(present_requestId);
- if (present_requestId)
+ if (present_requestId) {
list.add(requestId);
+ }
boolean present_query = true && (isSetQuery());
list.add(present_query);
- if (present_query)
+ if (present_query) {
list.add(query);
+ }
boolean present_searchSegments = true && (isSetSearchSegments());
list.add(present_searchSegments);
- if (present_searchSegments)
+ if (present_searchSegments) {
list.add(searchSegments);
+ }
boolean present_enableTrace = true && (isSetEnableTrace());
list.add(present_enableTrace);
- if (present_enableTrace)
+ if (present_enableTrace) {
list.add(enableTrace);
+ }
boolean present_brokerId = true && (isSetBrokerId());
list.add(present_brokerId);
- if (present_brokerId)
+ if (present_brokerId) {
list.add(brokerId);
+ }
return list.hashCode();
}
@@ -581,11 +613,13 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -597,7 +631,9 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
sb.append("requestId:");
sb.append(this.requestId);
first = false;
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("query:");
if (this.query == null) {
sb.append("null");
@@ -606,7 +642,9 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
}
first = false;
if (isSetSearchSegments()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("searchSegments:");
if (this.searchSegments == null) {
sb.append("null");
@@ -616,13 +654,17 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
first = false;
}
if (isSetEnableTrace()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("enableTrace:");
sb.append(this.enableTrace);
first = false;
}
if (isSetBrokerId()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("brokerId:");
if (this.brokerId == null) {
sb.append("null");
@@ -635,10 +677,12 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
return sb.toString();
}
- public void validate() throws org.apache.thrift.TException {
+ public void validate()
+ throws org.apache.thrift.TException {
// check for required fields
if (!isSetRequestId()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'requestId' is unset! Struct:" + toString());
+ throw new org.apache.thrift.protocol.TProtocolException(
+ "Required field 'requestId' is unset! Struct:" + toString());
}
if (!isSetQuery()) {
@@ -651,7 +695,8 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
}
}
- 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) {
@@ -659,7 +704,8 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws java.io.IOException, 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;
@@ -677,11 +723,11 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
private static class InstanceRequestStandardScheme extends StandardScheme<InstanceRequest> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, InstanceRequest struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, InstanceRequest 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) {
break;
@@ -710,8 +756,7 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
org.apache.thrift.protocol.TList _list96 = iprot.readListBegin();
struct.searchSegments = new ArrayList<String>(_list96.size);
String _elem97;
- for (int _i98 = 0; _i98 < _list96.size; ++_i98)
- {
+ for (int _i98 = 0; _i98 < _list96.size; ++_i98) {
_elem97 = iprot.readString();
struct.searchSegments.add(_elem97);
}
@@ -747,7 +792,8 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, InstanceRequest struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, InstanceRequest struct)
+ throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -763,9 +809,9 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
if (struct.isSetSearchSegments()) {
oprot.writeFieldBegin(SEARCH_SEGMENTS_FIELD_DESC);
{
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.searchSegments.size()));
- for (String _iter99 : struct.searchSegments)
- {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
+ struct.searchSegments.size()));
+ for (String _iter99 : struct.searchSegments) {
oprot.writeString(_iter99);
}
oprot.writeListEnd();
@@ -788,7 +834,6 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class InstanceRequestTupleSchemeFactory implements SchemeFactory {
@@ -800,7 +845,8 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
private static class InstanceRequestTupleScheme extends TupleScheme<InstanceRequest> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, InstanceRequest struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, InstanceRequest struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeI64(struct.requestId);
struct.query.write(oprot);
@@ -818,8 +864,7 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
if (struct.isSetSearchSegments()) {
{
oprot.writeI32(struct.searchSegments.size());
- for (String _iter100 : struct.searchSegments)
- {
+ for (String _iter100 : struct.searchSegments) {
oprot.writeString(_iter100);
}
}
@@ -833,7 +878,8 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, InstanceRequest struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, InstanceRequest struct)
+ throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.requestId = iprot.readI64();
struct.setRequestIdIsSet(true);
@@ -843,11 +889,11 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
BitSet incoming = iprot.readBitSet(3);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list101 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ org.apache.thrift.protocol.TList _list101 =
+ new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.searchSegments = new ArrayList<String>(_list101.size);
String _elem102;
- for (int _i103 = 0; _i103 < _list101.size; ++_i103)
- {
+ for (int _i103 = 0; _i103 < _list101.size; ++_i103) {
_elem102 = iprot.readString();
struct.searchSegments.add(_elem102);
}
@@ -864,6 +910,5 @@ public class InstanceRequest implements org.apache.thrift.TBase<InstanceRequest,
}
}
}
-
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/QuerySource.java b/pinot-common/src/main/java/org/apache/pinot/common/request/QuerySource.java
index b4d4e3b..ab4b6d4 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/QuerySource.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/QuerySource.java
@@ -39,6 +39,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -47,11 +48,15 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-5-24")
public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySource._Fields>, java.io.Serializable, Cloneable, Comparable<QuerySource> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("QuerySource");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
+ new org.apache.thrift.protocol.TStruct("QuerySource");
+
+ 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 Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new QuerySourceStandardSchemeFactory());
schemes.put(TupleScheme.class, new QuerySourceTupleSchemeFactory());
@@ -61,7 +66,7 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
/** 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>();
@@ -75,7 +80,7 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // TABLE_NAME
return TABLE_NAME;
default:
@@ -89,7 +94,9 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
*/
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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -120,10 +127,13 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
// isset id assignments
private static final _Fields optionals[] = {_Fields.TABLE_NAME};
public static final 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)));
+ 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);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(QuerySource.class, metaDataMap);
}
@@ -174,22 +184,20 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
public void setFieldValue(_Fields field, 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((String) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case TABLE_NAME:
- return getTableName();
-
+ case TABLE_NAME:
+ return getTableName();
}
throw new IllegalStateException();
}
@@ -201,32 +209,37 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
}
switch (field) {
- case TABLE_NAME:
- return isSetTableName();
+ case TABLE_NAME:
+ return isSetTableName();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ if (that == null) {
return false;
- if (that instanceof QuerySource)
- return this.equals((QuerySource)that);
+ }
+ if (that instanceof QuerySource) {
+ return this.equals((QuerySource) that);
+ }
return false;
}
public boolean equals(QuerySource that) {
- if (that == null)
+ if (that == null) {
return false;
+ }
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;
@@ -238,8 +251,9 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
boolean present_tableName = true && (isSetTableName());
list.add(present_tableName);
- if (present_tableName)
+ if (present_tableName) {
list.add(tableName);
+ }
return list.hashCode();
}
@@ -269,11 +283,13 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -295,12 +311,14 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
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) {
@@ -308,7 +326,8 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws java.io.IOException, ClassNotFoundException {
try {
read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in)));
} catch (org.apache.thrift.TException te) {
@@ -324,11 +343,11 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
private static class QuerySourceStandardScheme extends StandardScheme<QuerySource> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, QuerySource struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, QuerySource 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) {
break;
@@ -351,7 +370,8 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, QuerySource struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, QuerySource struct)
+ throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -365,7 +385,6 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class QuerySourceTupleSchemeFactory implements SchemeFactory {
@@ -377,7 +396,8 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
private static class QuerySourceTupleScheme extends TupleScheme<QuerySource> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, QuerySource struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, QuerySource struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetTableName()) {
@@ -390,7 +410,8 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, QuerySource struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, QuerySource struct)
+ throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
@@ -399,6 +420,5 @@ public class QuerySource implements org.apache.thrift.TBase<QuerySource, QuerySo
}
}
}
-
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/QueryType.java b/pinot-common/src/main/java/org/apache/pinot/common/request/QueryType.java
index d0b1208..b0521a2 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/QueryType.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/QueryType.java
@@ -40,6 +40,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -48,15 +49,23 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-8-24")
public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._Fields>, java.io.Serializable, Cloneable, Comparable<QueryType> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("QueryType");
-
- private static final org.apache.thrift.protocol.TField HAS_SELECTION_FIELD_DESC = new org.apache.thrift.protocol.TField("hasSelection", org.apache.thrift.protocol.TType.BOOL, (short)1);
- private static final org.apache.thrift.protocol.TField HAS_FILTER_FIELD_DESC = new org.apache.thrift.protocol.TField("hasFilter", org.apache.thrift.protocol.TType.BOOL, (short)2);
- private static final org.apache.thrift.protocol.TField HAS_AGGREGATION_FIELD_DESC = new org.apache.thrift.protocol.TField("hasAggregation", org.apache.thrift.protocol.TType.BOOL, (short)3);
- private static final org.apache.thrift.protocol.TField HAS_GROUP_BY_FIELD_DESC = new org.apache.thrift.protocol.TField("hasGroup_by", org.apache.thrift.protocol.TType.BOOL, (short)4);
- private static final org.apache.thrift.protocol.TField HAS_HAVING_FIELD_DESC = new org.apache.thrift.protocol.TField("hasHaving", org.apache.thrift.protocol.TType.BOOL, (short)5);
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
+ new org.apache.thrift.protocol.TStruct("QueryType");
+
+ private static final org.apache.thrift.protocol.TField HAS_SELECTION_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("hasSelection", org.apache.thrift.protocol.TType.BOOL, (short) 1);
+ private static final org.apache.thrift.protocol.TField HAS_FILTER_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("hasFilter", org.apache.thrift.protocol.TType.BOOL, (short) 2);
+ private static final org.apache.thrift.protocol.TField HAS_AGGREGATION_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("hasAggregation", org.apache.thrift.protocol.TType.BOOL, (short) 3);
+ private static final org.apache.thrift.protocol.TField HAS_GROUP_BY_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("hasGroup_by", org.apache.thrift.protocol.TType.BOOL, (short) 4);
+ private static final org.apache.thrift.protocol.TField HAS_HAVING_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("hasHaving", org.apache.thrift.protocol.TType.BOOL, (short) 5);
+
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
+ new HashMap<Class<? extends IScheme>, SchemeFactory>();
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new QueryTypeStandardSchemeFactory());
schemes.put(TupleScheme.class, new QueryTypeTupleSchemeFactory());
@@ -70,11 +79,11 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- HAS_SELECTION((short)1, "hasSelection"),
- HAS_FILTER((short)2, "hasFilter"),
- HAS_AGGREGATION((short)3, "hasAggregation"),
- HAS_GROUP_BY((short)4, "hasGroup_by"),
- HAS_HAVING((short)5, "hasHaving");
+ HAS_SELECTION((short) 1, "hasSelection"),
+ HAS_FILTER((short) 2, "hasFilter"),
+ HAS_AGGREGATION((short) 3, "hasAggregation"),
+ HAS_GROUP_BY((short) 4, "hasGroup_by"),
+ HAS_HAVING((short) 5, "hasHaving");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -88,7 +97,7 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // HAS_SELECTION
return HAS_SELECTION;
case 2: // HAS_FILTER
@@ -110,7 +119,9 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
*/
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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -145,20 +156,28 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
private static final int __HASGROUP_BY_ISSET_ID = 3;
private static final int __HASHAVING_ISSET_ID = 4;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.HAS_SELECTION,_Fields.HAS_FILTER,_Fields.HAS_AGGREGATION,_Fields.HAS_GROUP_BY,_Fields.HAS_HAVING};
+ private static final _Fields optionals[] =
+ {_Fields.HAS_SELECTION, _Fields.HAS_FILTER, _Fields.HAS_AGGREGATION, _Fields.HAS_GROUP_BY, _Fields.HAS_HAVING};
public static final 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.HAS_SELECTION, new org.apache.thrift.meta_data.FieldMetaData("hasSelection", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.HAS_FILTER, new org.apache.thrift.meta_data.FieldMetaData("hasFilter", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.HAS_AGGREGATION, new org.apache.thrift.meta_data.FieldMetaData("hasAggregation", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.HAS_GROUP_BY, new org.apache.thrift.meta_data.FieldMetaData("hasGroup_by", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
- tmpMap.put(_Fields.HAS_HAVING, new org.apache.thrift.meta_data.FieldMetaData("hasHaving", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
+ new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.HAS_SELECTION,
+ new org.apache.thrift.meta_data.FieldMetaData("hasSelection", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_FILTER,
+ new org.apache.thrift.meta_data.FieldMetaData("hasFilter", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_AGGREGATION, new org.apache.thrift.meta_data.FieldMetaData("hasAggregation",
+ org.apache.thrift.TFieldRequirementType.OPTIONAL,
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_GROUP_BY,
+ new org.apache.thrift.meta_data.FieldMetaData("hasGroup_by", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ tmpMap.put(_Fields.HAS_HAVING,
+ new org.apache.thrift.meta_data.FieldMetaData("hasHaving", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(QueryType.class, metaDataMap);
}
@@ -308,66 +327,64 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case HAS_SELECTION:
- if (value == null) {
- unsetHasSelection();
- } else {
- setHasSelection((Boolean)value);
- }
- break;
-
- case HAS_FILTER:
- if (value == null) {
- unsetHasFilter();
- } else {
- setHasFilter((Boolean)value);
- }
- break;
+ case HAS_SELECTION:
+ if (value == null) {
+ unsetHasSelection();
+ } else {
+ setHasSelection((Boolean) value);
+ }
+ break;
- case HAS_AGGREGATION:
- if (value == null) {
- unsetHasAggregation();
- } else {
- setHasAggregation((Boolean)value);
- }
- break;
+ case HAS_FILTER:
+ if (value == null) {
+ unsetHasFilter();
+ } else {
+ setHasFilter((Boolean) value);
+ }
+ break;
- case HAS_GROUP_BY:
- if (value == null) {
- unsetHasGroup_by();
- } else {
- setHasGroup_by((Boolean)value);
- }
- break;
+ case HAS_AGGREGATION:
+ if (value == null) {
+ unsetHasAggregation();
+ } else {
+ setHasAggregation((Boolean) value);
+ }
+ break;
- case HAS_HAVING:
- if (value == null) {
- unsetHasHaving();
- } else {
- setHasHaving((Boolean)value);
- }
- break;
+ case HAS_GROUP_BY:
+ if (value == null) {
+ unsetHasGroup_by();
+ } else {
+ setHasGroup_by((Boolean) value);
+ }
+ break;
+ case HAS_HAVING:
+ if (value == null) {
+ unsetHasHaving();
+ } else {
+ setHasHaving((Boolean) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case HAS_SELECTION:
- return Boolean.valueOf(isHasSelection());
-
- case HAS_FILTER:
- return Boolean.valueOf(isHasFilter());
+ case HAS_SELECTION:
+ return Boolean.valueOf(isHasSelection());
- case HAS_AGGREGATION:
- return Boolean.valueOf(isHasAggregation());
+ case HAS_FILTER:
+ return Boolean.valueOf(isHasFilter());
- case HAS_GROUP_BY:
- return Boolean.valueOf(isHasGroup_by());
+ case HAS_AGGREGATION:
+ return Boolean.valueOf(isHasAggregation());
- case HAS_HAVING:
- return Boolean.valueOf(isHasHaving());
+ case HAS_GROUP_BY:
+ return Boolean.valueOf(isHasGroup_by());
+ case HAS_HAVING:
+ return Boolean.valueOf(isHasHaving());
}
throw new IllegalStateException();
}
@@ -379,76 +396,89 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
}
switch (field) {
- case HAS_SELECTION:
- return isSetHasSelection();
- case HAS_FILTER:
- return isSetHasFilter();
- case HAS_AGGREGATION:
- return isSetHasAggregation();
- case HAS_GROUP_BY:
- return isSetHasGroup_by();
- case HAS_HAVING:
- return isSetHasHaving();
+ case HAS_SELECTION:
+ return isSetHasSelection();
+ case HAS_FILTER:
+ return isSetHasFilter();
+ case HAS_AGGREGATION:
+ return isSetHasAggregation();
+ case HAS_GROUP_BY:
+ return isSetHasGroup_by();
+ case HAS_HAVING:
+ return isSetHasHaving();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ if (that == null) {
return false;
- if (that instanceof QueryType)
- return this.equals((QueryType)that);
+ }
+ if (that instanceof QueryType) {
+ return this.equals((QueryType) that);
+ }
return false;
}
public boolean equals(QueryType that) {
- if (that == null)
+ if (that == null) {
return false;
+ }
boolean this_present_hasSelection = true && this.isSetHasSelection();
boolean that_present_hasSelection = true && that.isSetHasSelection();
if (this_present_hasSelection || that_present_hasSelection) {
- if (!(this_present_hasSelection && that_present_hasSelection))
+ if (!(this_present_hasSelection && that_present_hasSelection)) {
return false;
- if (this.hasSelection != that.hasSelection)
+ }
+ if (this.hasSelection != that.hasSelection) {
return false;
+ }
}
boolean this_present_hasFilter = true && this.isSetHasFilter();
boolean that_present_hasFilter = true && that.isSetHasFilter();
if (this_present_hasFilter || that_present_hasFilter) {
- if (!(this_present_hasFilter && that_present_hasFilter))
+ if (!(this_present_hasFilter && that_present_hasFilter)) {
return false;
- if (this.hasFilter != that.hasFilter)
+ }
+ if (this.hasFilter != that.hasFilter) {
return false;
+ }
}
boolean this_present_hasAggregation = true && this.isSetHasAggregation();
boolean that_present_hasAggregation = true && that.isSetHasAggregation();
if (this_present_hasAggregation || that_present_hasAggregation) {
- if (!(this_present_hasAggregation && that_present_hasAggregation))
+ if (!(this_present_hasAggregation && that_present_hasAggregation)) {
return false;
- if (this.hasAggregation != that.hasAggregation)
+ }
+ if (this.hasAggregation != that.hasAggregation) {
return false;
+ }
}
boolean this_present_hasGroup_by = true && this.isSetHasGroup_by();
boolean that_present_hasGroup_by = true && that.isSetHasGroup_by();
if (this_present_hasGroup_by || that_present_hasGroup_by) {
- if (!(this_present_hasGroup_by && that_present_hasGroup_by))
+ if (!(this_present_hasGroup_by && that_present_hasGroup_by)) {
return false;
- if (this.hasGroup_by != that.hasGroup_by)
+ }
+ if (this.hasGroup_by != that.hasGroup_by) {
return false;
+ }
}
boolean this_present_hasHaving = true && this.isSetHasHaving();
boolean that_present_hasHaving = true && that.isSetHasHaving();
if (this_present_hasHaving || that_present_hasHaving) {
- if (!(this_present_hasHaving && that_present_hasHaving))
+ if (!(this_present_hasHaving && that_present_hasHaving)) {
return false;
- if (this.hasHaving != that.hasHaving)
+ }
+ if (this.hasHaving != that.hasHaving) {
return false;
+ }
}
return true;
@@ -460,28 +490,33 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
boolean present_hasSelection = true && (isSetHasSelection());
list.add(present_hasSelection);
- if (present_hasSelection)
+ if (present_hasSelection) {
list.add(hasSelection);
+ }
boolean present_hasFilter = true && (isSetHasFilter());
list.add(present_hasFilter);
- if (present_hasFilter)
+ if (present_hasFilter) {
list.add(hasFilter);
+ }
boolean present_hasAggregation = true && (isSetHasAggregation());
list.add(present_hasAggregation);
- if (present_hasAggregation)
+ if (present_hasAggregation) {
list.add(hasAggregation);
+ }
boolean present_hasGroup_by = true && (isSetHasGroup_by());
list.add(present_hasGroup_by);
- if (present_hasGroup_by)
+ if (present_hasGroup_by) {
list.add(hasGroup_by);
+ }
boolean present_hasHaving = true && (isSetHasHaving());
list.add(present_hasHaving);
- if (present_hasHaving)
+ if (present_hasHaving) {
list.add(hasHaving);
+ }
return list.hashCode();
}
@@ -551,11 +586,13 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -570,25 +607,33 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
first = false;
}
if (isSetHasFilter()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("hasFilter:");
sb.append(this.hasFilter);
first = false;
}
if (isSetHasAggregation()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("hasAggregation:");
sb.append(this.hasAggregation);
first = false;
}
if (isSetHasGroup_by()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("hasGroup_by:");
sb.append(this.hasGroup_by);
first = false;
}
if (isSetHasHaving()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("hasHaving:");
sb.append(this.hasHaving);
first = false;
@@ -597,12 +642,14 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
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) {
@@ -610,7 +657,8 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws java.io.IOException, 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;
@@ -628,11 +676,11 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
private static class QueryTypeStandardScheme extends StandardScheme<QueryType> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, QueryType struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, QueryType 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) {
break;
@@ -687,7 +735,8 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, QueryType struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, QueryType struct)
+ throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -719,7 +768,6 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class QueryTypeTupleSchemeFactory implements SchemeFactory {
@@ -731,7 +779,8 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
private static class QueryTypeTupleScheme extends TupleScheme<QueryType> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, QueryType struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, QueryType struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetHasSelection()) {
@@ -768,7 +817,8 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, QueryType struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, QueryType struct)
+ throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(5);
if (incoming.get(0)) {
@@ -793,6 +843,5 @@ public class QueryType implements org.apache.thrift.TBase<QueryType, QueryType._
}
}
}
-
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/Selection.java b/pinot-common/src/main/java/org/apache/pinot/common/request/Selection.java
index 92a2b2c..35a6a1a 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/Selection.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/Selection.java
@@ -40,6 +40,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -48,14 +49,21 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-5-24")
public class Selection implements org.apache.thrift.TBase<Selection, Selection._Fields>, java.io.Serializable, Cloneable, Comparable<Selection> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Selection");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
+ new org.apache.thrift.protocol.TStruct("Selection");
+
+ private static final org.apache.thrift.protocol.TField SELECTION_COLUMNS_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("selectionColumns", org.apache.thrift.protocol.TType.LIST, (short) 1);
+ private static final org.apache.thrift.protocol.TField SELECTION_SORT_SEQUENCE_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("selectionSortSequence", org.apache.thrift.protocol.TType.LIST, (short) 2);
+ private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I32, (short) 3);
+ private static final org.apache.thrift.protocol.TField SIZE_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("size", org.apache.thrift.protocol.TType.I32, (short) 4);
- private static final org.apache.thrift.protocol.TField SELECTION_COLUMNS_FIELD_DESC = new org.apache.thrift.protocol.TField("selectionColumns", org.apache.thrift.protocol.TType.LIST, (short)1);
- private static final org.apache.thrift.protocol.TField SELECTION_SORT_SEQUENCE_FIELD_DESC = new org.apache.thrift.protocol.TField("selectionSortSequence", org.apache.thrift.protocol.TType.LIST, (short)2);
- private static final org.apache.thrift.protocol.TField OFFSET_FIELD_DESC = new org.apache.thrift.protocol.TField("offset", org.apache.thrift.protocol.TType.I32, (short)3);
- private static final org.apache.thrift.protocol.TField SIZE_FIELD_DESC = new org.apache.thrift.protocol.TField("size", org.apache.thrift.protocol.TType.I32, (short)4);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
+ new HashMap<Class<? extends IScheme>, SchemeFactory>();
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new SelectionStandardSchemeFactory());
schemes.put(TupleScheme.class, new SelectionTupleSchemeFactory());
@@ -68,10 +76,10 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- SELECTION_COLUMNS((short)1, "selectionColumns"),
- SELECTION_SORT_SEQUENCE((short)2, "selectionSortSequence"),
- OFFSET((short)3, "offset"),
- SIZE((short)4, "size");
+ SELECTION_COLUMNS((short) 1, "selectionColumns"),
+ SELECTION_SORT_SEQUENCE((short) 2, "selectionSortSequence"),
+ OFFSET((short) 3, "offset"),
+ SIZE((short) 4, "size");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -85,7 +93,7 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // SELECTION_COLUMNS
return SELECTION_COLUMNS;
case 2: // SELECTION_SORT_SEQUENCE
@@ -105,7 +113,9 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
*/
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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -137,20 +147,28 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
private static final int __OFFSET_ISSET_ID = 0;
private static final int __SIZE_ISSET_ID = 1;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.SELECTION_COLUMNS,_Fields.SELECTION_SORT_SEQUENCE,_Fields.OFFSET,_Fields.SIZE};
+ private static final _Fields optionals[] =
+ {_Fields.SELECTION_COLUMNS, _Fields.SELECTION_SORT_SEQUENCE, _Fields.OFFSET, _Fields.SIZE};
public static final 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.SELECTION_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("selectionColumns", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
+ new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.SELECTION_COLUMNS, new org.apache.thrift.meta_data.FieldMetaData("selectionColumns",
+ 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.SELECTION_SORT_SEQUENCE, new org.apache.thrift.meta_data.FieldMetaData("selectionSortSequence", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ tmpMap.put(_Fields.SELECTION_SORT_SEQUENCE, new org.apache.thrift.meta_data.FieldMetaData("selectionSortSequence",
+ 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))));
- tmpMap.put(_Fields.OFFSET, new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.SIZE, new org.apache.thrift.meta_data.FieldMetaData("size", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- 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,
+ SelectionSort.class))));
+ tmpMap.put(_Fields.OFFSET,
+ new org.apache.thrift.meta_data.FieldMetaData("offset", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.SIZE,
+ new org.apache.thrift.meta_data.FieldMetaData("size", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(Selection.class, metaDataMap);
}
@@ -159,7 +177,6 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
this.offset = 0;
this.size = 10;
-
}
/**
@@ -172,7 +189,8 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
this.selectionColumns = __this__selectionColumns;
}
if (other.isSetSelectionSortSequence()) {
- List<SelectionSort> __this__selectionSortSequence = new ArrayList<SelectionSort>(other.selectionSortSequence.size());
+ List<SelectionSort> __this__selectionSortSequence =
+ new ArrayList<SelectionSort>(other.selectionSortSequence.size());
for (SelectionSort other_element : other.selectionSortSequence) {
__this__selectionSortSequence.add(new SelectionSort(other_element));
}
@@ -193,7 +211,6 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
this.offset = 0;
this.size = 10;
-
}
public int getSelectionColumnsSize() {
@@ -318,55 +335,53 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case SELECTION_COLUMNS:
- if (value == null) {
- unsetSelectionColumns();
- } else {
- setSelectionColumns((List<String>)value);
- }
- break;
-
- case SELECTION_SORT_SEQUENCE:
- if (value == null) {
- unsetSelectionSortSequence();
- } else {
- setSelectionSortSequence((List<SelectionSort>)value);
- }
- break;
+ case SELECTION_COLUMNS:
+ if (value == null) {
+ unsetSelectionColumns();
+ } else {
+ setSelectionColumns((List<String>) value);
+ }
+ break;
- case OFFSET:
- if (value == null) {
- unsetOffset();
- } else {
- setOffset((Integer)value);
- }
- break;
+ case SELECTION_SORT_SEQUENCE:
+ if (value == null) {
+ unsetSelectionSortSequence();
+ } else {
+ setSelectionSortSequence((List<SelectionSort>) value);
+ }
+ break;
- case SIZE:
- if (value == null) {
- unsetSize();
- } else {
- setSize((Integer)value);
- }
- break;
+ case OFFSET:
+ if (value == null) {
+ unsetOffset();
+ } else {
+ setOffset((Integer) value);
+ }
+ break;
+ case SIZE:
+ if (value == null) {
+ unsetSize();
+ } else {
+ setSize((Integer) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case SELECTION_COLUMNS:
- return getSelectionColumns();
-
- case SELECTION_SORT_SEQUENCE:
- return getSelectionSortSequence();
+ case SELECTION_COLUMNS:
+ return getSelectionColumns();
- case OFFSET:
- return Integer.valueOf(getOffset());
+ case SELECTION_SORT_SEQUENCE:
+ return getSelectionSortSequence();
- case SIZE:
- return Integer.valueOf(getSize());
+ case OFFSET:
+ return Integer.valueOf(getOffset());
+ case SIZE:
+ return Integer.valueOf(getSize());
}
throw new IllegalStateException();
}
@@ -378,65 +393,76 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
}
switch (field) {
- case SELECTION_COLUMNS:
- return isSetSelectionColumns();
- case SELECTION_SORT_SEQUENCE:
- return isSetSelectionSortSequence();
- case OFFSET:
- return isSetOffset();
- case SIZE:
- return isSetSize();
+ case SELECTION_COLUMNS:
+ return isSetSelectionColumns();
+ case SELECTION_SORT_SEQUENCE:
+ return isSetSelectionSortSequence();
+ case OFFSET:
+ return isSetOffset();
+ case SIZE:
+ return isSetSize();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ if (that == null) {
return false;
- if (that instanceof Selection)
- return this.equals((Selection)that);
+ }
+ if (that instanceof Selection) {
+ return this.equals((Selection) that);
+ }
return false;
}
public boolean equals(Selection that) {
- if (that == null)
+ if (that == null) {
return false;
+ }
boolean this_present_selectionColumns = true && this.isSetSelectionColumns();
boolean that_present_selectionColumns = true && that.isSetSelectionColumns();
if (this_present_selectionColumns || that_present_selectionColumns) {
- if (!(this_present_selectionColumns && that_present_selectionColumns))
+ if (!(this_present_selectionColumns && that_present_selectionColumns)) {
return false;
- if (!this.selectionColumns.equals(that.selectionColumns))
+ }
+ if (!this.selectionColumns.equals(that.selectionColumns)) {
return false;
+ }
}
boolean this_present_selectionSortSequence = true && this.isSetSelectionSortSequence();
boolean that_present_selectionSortSequence = true && that.isSetSelectionSortSequence();
if (this_present_selectionSortSequence || that_present_selectionSortSequence) {
- if (!(this_present_selectionSortSequence && that_present_selectionSortSequence))
+ if (!(this_present_selectionSortSequence && that_present_selectionSortSequence)) {
return false;
- if (!this.selectionSortSequence.equals(that.selectionSortSequence))
+ }
+ if (!this.selectionSortSequence.equals(that.selectionSortSequence)) {
return false;
+ }
}
boolean this_present_offset = true && this.isSetOffset();
boolean that_present_offset = true && that.isSetOffset();
if (this_present_offset || that_present_offset) {
- if (!(this_present_offset && that_present_offset))
+ if (!(this_present_offset && that_present_offset)) {
return false;
- if (this.offset != that.offset)
+ }
+ if (this.offset != that.offset) {
return false;
+ }
}
boolean this_present_size = true && this.isSetSize();
boolean that_present_size = true && that.isSetSize();
if (this_present_size || that_present_size) {
- if (!(this_present_size && that_present_size))
+ if (!(this_present_size && that_present_size)) {
return false;
- if (this.size != that.size)
+ }
+ if (this.size != that.size) {
return false;
+ }
}
return true;
@@ -448,23 +474,27 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
boolean present_selectionColumns = true && (isSetSelectionColumns());
list.add(present_selectionColumns);
- if (present_selectionColumns)
+ if (present_selectionColumns) {
list.add(selectionColumns);
+ }
boolean present_selectionSortSequence = true && (isSetSelectionSortSequence());
list.add(present_selectionSortSequence);
- if (present_selectionSortSequence)
+ if (present_selectionSortSequence) {
list.add(selectionSortSequence);
+ }
boolean present_offset = true && (isSetOffset());
list.add(present_offset);
- if (present_offset)
+ if (present_offset) {
list.add(offset);
+ }
boolean present_size = true && (isSetSize());
list.add(present_size);
- if (present_size)
+ if (present_size) {
list.add(size);
+ }
return list.hashCode();
}
@@ -524,11 +554,13 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -547,7 +579,9 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
first = false;
}
if (isSetSelectionSortSequence()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("selectionSortSequence:");
if (this.selectionSortSequence == null) {
sb.append("null");
@@ -557,13 +591,17 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
first = false;
}
if (isSetOffset()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("offset:");
sb.append(this.offset);
first = false;
}
if (isSetSize()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("size:");
sb.append(this.size);
first = false;
@@ -572,12 +610,14 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
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) {
@@ -585,7 +625,8 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws java.io.IOException, 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;
@@ -603,11 +644,11 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
private static class SelectionStandardScheme extends StandardScheme<Selection> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, Selection struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, Selection 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) {
break;
@@ -619,8 +660,7 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
org.apache.thrift.protocol.TList _list52 = iprot.readListBegin();
struct.selectionColumns = new ArrayList<String>(_list52.size);
String _elem53;
- for (int _i54 = 0; _i54 < _list52.size; ++_i54)
- {
+ for (int _i54 = 0; _i54 < _list52.size; ++_i54) {
_elem53 = iprot.readString();
struct.selectionColumns.add(_elem53);
}
@@ -637,8 +677,7 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
org.apache.thrift.protocol.TList _list55 = iprot.readListBegin();
struct.selectionSortSequence = new ArrayList<SelectionSort>(_list55.size);
SelectionSort _elem56;
- for (int _i57 = 0; _i57 < _list55.size; ++_i57)
- {
+ for (int _i57 = 0; _i57 < _list55.size; ++_i57) {
_elem56 = new SelectionSort();
_elem56.read(iprot);
struct.selectionSortSequence.add(_elem56);
@@ -675,7 +714,8 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, Selection struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, Selection struct)
+ throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -683,9 +723,9 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
if (struct.isSetSelectionColumns()) {
oprot.writeFieldBegin(SELECTION_COLUMNS_FIELD_DESC);
{
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, struct.selectionColumns.size()));
- for (String _iter58 : struct.selectionColumns)
- {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING,
+ struct.selectionColumns.size()));
+ for (String _iter58 : struct.selectionColumns) {
oprot.writeString(_iter58);
}
oprot.writeListEnd();
@@ -697,9 +737,9 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
if (struct.isSetSelectionSortSequence()) {
oprot.writeFieldBegin(SELECTION_SORT_SEQUENCE_FIELD_DESC);
{
- oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.selectionSortSequence.size()));
- for (SelectionSort _iter59 : struct.selectionSortSequence)
- {
+ oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT,
+ struct.selectionSortSequence.size()));
+ for (SelectionSort _iter59 : struct.selectionSortSequence) {
_iter59.write(oprot);
}
oprot.writeListEnd();
@@ -720,7 +760,6 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class SelectionTupleSchemeFactory implements SchemeFactory {
@@ -732,7 +771,8 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
private static class SelectionTupleScheme extends TupleScheme<Selection> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, Selection struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, Selection struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetSelectionColumns()) {
@@ -751,8 +791,7 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
if (struct.isSetSelectionColumns()) {
{
oprot.writeI32(struct.selectionColumns.size());
- for (String _iter60 : struct.selectionColumns)
- {
+ for (String _iter60 : struct.selectionColumns) {
oprot.writeString(_iter60);
}
}
@@ -760,8 +799,7 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
if (struct.isSetSelectionSortSequence()) {
{
oprot.writeI32(struct.selectionSortSequence.size());
- for (SelectionSort _iter61 : struct.selectionSortSequence)
- {
+ for (SelectionSort _iter61 : struct.selectionSortSequence) {
_iter61.write(oprot);
}
}
@@ -775,16 +813,17 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, Selection struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, Selection struct)
+ throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(4);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list62 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
+ org.apache.thrift.protocol.TList _list62 =
+ new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, iprot.readI32());
struct.selectionColumns = new ArrayList<String>(_list62.size);
String _elem63;
- for (int _i64 = 0; _i64 < _list62.size; ++_i64)
- {
+ for (int _i64 = 0; _i64 < _list62.size; ++_i64) {
_elem63 = iprot.readString();
struct.selectionColumns.add(_elem63);
}
@@ -793,11 +832,11 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
}
if (incoming.get(1)) {
{
- org.apache.thrift.protocol.TList _list65 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
+ org.apache.thrift.protocol.TList _list65 =
+ new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
struct.selectionSortSequence = new ArrayList<SelectionSort>(_list65.size);
SelectionSort _elem66;
- for (int _i67 = 0; _i67 < _list65.size; ++_i67)
- {
+ for (int _i67 = 0; _i67 < _list65.size; ++_i67) {
_elem66 = new SelectionSort();
_elem66.read(iprot);
struct.selectionSortSequence.add(_elem66);
@@ -815,6 +854,5 @@ public class Selection implements org.apache.thrift.TBase<Selection, Selection._
}
}
}
-
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/SelectionSort.java b/pinot-common/src/main/java/org/apache/pinot/common/request/SelectionSort.java
index aef39a2..db74456 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/SelectionSort.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/SelectionSort.java
@@ -40,6 +40,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* AUTO GENERATED: DO NOT EDIT
@@ -49,12 +50,17 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-5-24")
public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, SelectionSort._Fields>, java.io.Serializable, Cloneable, Comparable<SelectionSort> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("SelectionSort");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
+ new org.apache.thrift.protocol.TStruct("SelectionSort");
+
+ 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) 1);
+ private static final org.apache.thrift.protocol.TField IS_ASC_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("isAsc", org.apache.thrift.protocol.TType.BOOL, (short) 2);
- 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)1);
- private static final org.apache.thrift.protocol.TField IS_ASC_FIELD_DESC = new org.apache.thrift.protocol.TField("isAsc", org.apache.thrift.protocol.TType.BOOL, (short)2);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
+ new HashMap<Class<? extends IScheme>, SchemeFactory>();
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new SelectionSortStandardSchemeFactory());
schemes.put(TupleScheme.class, new SelectionSortTupleSchemeFactory());
@@ -65,8 +71,7 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- COLUMN((short)1, "column"),
- IS_ASC((short)2, "isAsc");
+ COLUMN((short) 1, "column"), IS_ASC((short) 2, "isAsc");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -80,7 +85,7 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // COLUMN
return COLUMN;
case 2: // IS_ASC
@@ -96,7 +101,9 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
*/
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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -127,14 +134,18 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
// isset id assignments
private static final int __ISASC_ISSET_ID = 0;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.COLUMN,_Fields.IS_ASC};
+ private static final _Fields optionals[] = {_Fields.COLUMN, _Fields.IS_ASC};
public static final 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.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.IS_ASC, new org.apache.thrift.meta_data.FieldMetaData("isAsc", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
+ new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ 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.IS_ASC,
+ new org.apache.thrift.meta_data.FieldMetaData("isAsc", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.BOOL)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(SelectionSort.class, metaDataMap);
}
@@ -211,33 +222,31 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case COLUMN:
- if (value == null) {
- unsetColumn();
- } else {
- setColumn((String)value);
- }
- break;
-
- case IS_ASC:
- if (value == null) {
- unsetIsAsc();
- } else {
- setIsAsc((Boolean)value);
- }
- break;
+ case COLUMN:
+ if (value == null) {
+ unsetColumn();
+ } else {
+ setColumn((String) value);
+ }
+ break;
+ case IS_ASC:
+ if (value == null) {
+ unsetIsAsc();
+ } else {
+ setIsAsc((Boolean) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case COLUMN:
- return getColumn();
-
- case IS_ASC:
- return Boolean.valueOf(isIsAsc());
+ case COLUMN:
+ return getColumn();
+ case IS_ASC:
+ return Boolean.valueOf(isIsAsc());
}
throw new IllegalStateException();
}
@@ -249,43 +258,50 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
}
switch (field) {
- case COLUMN:
- return isSetColumn();
- case IS_ASC:
- return isSetIsAsc();
+ case COLUMN:
+ return isSetColumn();
+ case IS_ASC:
+ return isSetIsAsc();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ if (that == null) {
return false;
- if (that instanceof SelectionSort)
- return this.equals((SelectionSort)that);
+ }
+ if (that instanceof SelectionSort) {
+ return this.equals((SelectionSort) that);
+ }
return false;
}
public boolean equals(SelectionSort that) {
- if (that == null)
+ if (that == null) {
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_isAsc = true && this.isSetIsAsc();
boolean that_present_isAsc = true && that.isSetIsAsc();
if (this_present_isAsc || that_present_isAsc) {
- if (!(this_present_isAsc && that_present_isAsc))
+ if (!(this_present_isAsc && that_present_isAsc)) {
return false;
- if (this.isAsc != that.isAsc)
+ }
+ if (this.isAsc != that.isAsc) {
return false;
+ }
}
return true;
@@ -297,13 +313,15 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
boolean present_column = true && (isSetColumn());
list.add(present_column);
- if (present_column)
+ if (present_column) {
list.add(column);
+ }
boolean present_isAsc = true && (isSetIsAsc());
list.add(present_isAsc);
- if (present_isAsc)
+ if (present_isAsc) {
list.add(isAsc);
+ }
return list.hashCode();
}
@@ -343,11 +361,13 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -366,7 +386,9 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
first = false;
}
if (isSetIsAsc()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("isAsc:");
sb.append(this.isAsc);
first = false;
@@ -375,12 +397,14 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
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) {
@@ -388,7 +412,8 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws java.io.IOException, 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;
@@ -406,11 +431,11 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
private static class SelectionSortStandardScheme extends StandardScheme<SelectionSort> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, SelectionSort struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, SelectionSort 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) {
break;
@@ -441,7 +466,8 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, SelectionSort struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, SelectionSort struct)
+ throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -460,7 +486,6 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class SelectionSortTupleSchemeFactory implements SchemeFactory {
@@ -472,7 +497,8 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
private static class SelectionSortTupleScheme extends TupleScheme<SelectionSort> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, SelectionSort struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, SelectionSort struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
BitSet optionals = new BitSet();
if (struct.isSetColumn()) {
@@ -491,7 +517,8 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, SelectionSort struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, SelectionSort struct)
+ throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
BitSet incoming = iprot.readBitSet(2);
if (incoming.get(0)) {
@@ -504,6 +531,5 @@ public class SelectionSort implements org.apache.thrift.TBase<SelectionSort, Sel
}
}
}
-
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/response/ProcessingException.java b/pinot-common/src/main/java/org/apache/pinot/common/response/ProcessingException.java
index f0463ac..a0a8724 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/response/ProcessingException.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/response/ProcessingException.java
@@ -41,6 +41,7 @@ import org.apache.thrift.scheme.SchemeFactory;
import org.apache.thrift.scheme.StandardScheme;
import org.apache.thrift.scheme.TupleScheme;
+
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"})
/**
* Processing exception
@@ -48,12 +49,17 @@ import org.apache.thrift.scheme.TupleScheme;
*/
@Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2017-5-24")
public class ProcessingException extends TException implements org.apache.thrift.TBase<ProcessingException, ProcessingException._Fields>, java.io.Serializable, Cloneable, Comparable<ProcessingException> {
- private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessingException");
+ private static final org.apache.thrift.protocol.TStruct STRUCT_DESC =
+ new org.apache.thrift.protocol.TStruct("ProcessingException");
+
+ private static final org.apache.thrift.protocol.TField ERROR_CODE_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("errorCode", org.apache.thrift.protocol.TType.I32, (short) 1);
+ private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC =
+ new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short) 2);
- private static final org.apache.thrift.protocol.TField ERROR_CODE_FIELD_DESC = new org.apache.thrift.protocol.TField("errorCode", org.apache.thrift.protocol.TType.I32, (short)1);
- private static final org.apache.thrift.protocol.TField MESSAGE_FIELD_DESC = new org.apache.thrift.protocol.TField("message", org.apache.thrift.protocol.TType.STRING, (short)2);
+ private static final Map<Class<? extends IScheme>, SchemeFactory> schemes =
+ new HashMap<Class<? extends IScheme>, SchemeFactory>();
- private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>();
static {
schemes.put(StandardScheme.class, new ProcessingExceptionStandardSchemeFactory());
schemes.put(TupleScheme.class, new ProcessingExceptionTupleSchemeFactory());
@@ -64,8 +70,7 @@ public class ProcessingException extends TException implements org.apache.thrift
/** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */
public enum _Fields implements org.apache.thrift.TFieldIdEnum {
- ERROR_CODE((short)1, "errorCode"),
- MESSAGE((short)2, "message");
+ ERROR_CODE((short) 1, "errorCode"), MESSAGE((short) 2, "message");
private static final Map<String, _Fields> byName = new HashMap<String, _Fields>();
@@ -79,7 +84,7 @@ public class ProcessingException extends TException implements org.apache.thrift
* Find the _Fields constant that matches fieldId, or null if its not found.
*/
public static _Fields findByThriftId(int fieldId) {
- switch(fieldId) {
+ switch (fieldId) {
case 1: // ERROR_CODE
return ERROR_CODE;
case 2: // MESSAGE
@@ -95,7 +100,9 @@ public class ProcessingException extends TException implements org.apache.thrift
*/
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 IllegalArgumentException("Field " + fieldId + " doesn't exist!");
+ }
return fields;
}
@@ -128,12 +135,16 @@ public class ProcessingException extends TException implements org.apache.thrift
private byte __isset_bitfield = 0;
private static final _Fields optionals[] = {_Fields.MESSAGE};
public static final 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.ERROR_CODE, new org.apache.thrift.meta_data.FieldMetaData("errorCode", org.apache.thrift.TFieldRequirementType.REQUIRED,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
- tmpMap.put(_Fields.MESSAGE, new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.OPTIONAL,
- new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
+ Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap =
+ new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
+ tmpMap.put(_Fields.ERROR_CODE,
+ new org.apache.thrift.meta_data.FieldMetaData("errorCode", org.apache.thrift.TFieldRequirementType.REQUIRED,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
+ tmpMap.put(_Fields.MESSAGE,
+ new org.apache.thrift.meta_data.FieldMetaData("message", org.apache.thrift.TFieldRequirementType.OPTIONAL,
+ new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.STRING)));
metaDataMap = Collections.unmodifiableMap(tmpMap);
org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(ProcessingException.class, metaDataMap);
}
@@ -141,9 +152,7 @@ public class ProcessingException extends TException implements org.apache.thrift
public ProcessingException() {
}
- public ProcessingException(
- int errorCode)
- {
+ public ProcessingException(int errorCode) {
this();
this.errorCode = errorCode;
setErrorCodeIsSet(true);
@@ -218,33 +227,31 @@ public class ProcessingException extends TException implements org.apache.thrift
public void setFieldValue(_Fields field, Object value) {
switch (field) {
- case ERROR_CODE:
- if (value == null) {
- unsetErrorCode();
- } else {
- setErrorCode((Integer)value);
- }
- break;
-
- case MESSAGE:
- if (value == null) {
- unsetMessage();
- } else {
- setMessage((String)value);
- }
- break;
+ case ERROR_CODE:
+ if (value == null) {
+ unsetErrorCode();
+ } else {
+ setErrorCode((Integer) value);
+ }
+ break;
+ case MESSAGE:
+ if (value == null) {
+ unsetMessage();
+ } else {
+ setMessage((String) value);
+ }
+ break;
}
}
public Object getFieldValue(_Fields field) {
switch (field) {
- case ERROR_CODE:
- return Integer.valueOf(getErrorCode());
-
- case MESSAGE:
- return getMessage();
+ case ERROR_CODE:
+ return Integer.valueOf(getErrorCode());
+ case MESSAGE:
+ return getMessage();
}
throw new IllegalStateException();
}
@@ -256,43 +263,50 @@ public class ProcessingException extends TException implements org.apache.thrift
}
switch (field) {
- case ERROR_CODE:
- return isSetErrorCode();
- case MESSAGE:
- return isSetMessage();
+ case ERROR_CODE:
+ return isSetErrorCode();
+ case MESSAGE:
+ return isSetMessage();
}
throw new IllegalStateException();
}
@Override
public boolean equals(Object that) {
- if (that == null)
+ if (that == null) {
return false;
- if (that instanceof ProcessingException)
- return this.equals((ProcessingException)that);
+ }
+ if (that instanceof ProcessingException) {
+ return this.equals((ProcessingException) that);
+ }
return false;
}
public boolean equals(ProcessingException that) {
- if (that == null)
+ if (that == null) {
return false;
+ }
boolean this_present_errorCode = true;
boolean that_present_errorCode = true;
if (this_present_errorCode || that_present_errorCode) {
- if (!(this_present_errorCode && that_present_errorCode))
+ if (!(this_present_errorCode && that_present_errorCode)) {
return false;
- if (this.errorCode != that.errorCode)
+ }
+ if (this.errorCode != that.errorCode) {
return false;
+ }
}
boolean this_present_message = true && this.isSetMessage();
boolean that_present_message = true && that.isSetMessage();
if (this_present_message || that_present_message) {
- if (!(this_present_message && that_present_message))
+ if (!(this_present_message && that_present_message)) {
return false;
- if (!this.message.equals(that.message))
+ }
+ if (!this.message.equals(that.message)) {
return false;
+ }
}
return true;
@@ -304,13 +318,15 @@ public class ProcessingException extends TException implements org.apache.thrift
boolean present_errorCode = true;
list.add(present_errorCode);
- if (present_errorCode)
+ if (present_errorCode) {
list.add(errorCode);
+ }
boolean present_message = true && (isSetMessage());
list.add(present_message);
- if (present_message)
+ if (present_message) {
list.add(message);
+ }
return list.hashCode();
}
@@ -350,11 +366,13 @@ public class ProcessingException extends TException implements org.apache.thrift
return _Fields.findByThriftId(fieldId);
}
- public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot)
+ throws org.apache.thrift.TException {
schemes.get(iprot.getScheme()).getScheme().read(iprot, this);
}
- public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot)
+ throws org.apache.thrift.TException {
schemes.get(oprot.getScheme()).getScheme().write(oprot, this);
}
@@ -367,7 +385,9 @@ public class ProcessingException extends TException implements org.apache.thrift
sb.append(this.errorCode);
first = false;
if (isSetMessage()) {
- if (!first) sb.append(", ");
+ if (!first) {
+ sb.append(", ");
+ }
sb.append("message:");
if (this.message == null) {
sb.append("null");
@@ -380,16 +400,19 @@ public class ProcessingException extends TException implements org.apache.thrift
return sb.toString();
}
- public void validate() throws org.apache.thrift.TException {
+ public void validate()
+ throws org.apache.thrift.TException {
// check for required fields
if (!isSetErrorCode()) {
- throw new org.apache.thrift.protocol.TProtocolException("Required field 'errorCode' is unset! Struct:" + toString());
+ throw new org.apache.thrift.protocol.TProtocolException(
+ "Required field 'errorCode' is unset! 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) {
@@ -397,7 +420,8 @@ public class ProcessingException extends TException implements org.apache.thrift
}
}
- private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException {
+ private void readObject(java.io.ObjectInputStream in)
+ throws java.io.IOException, 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;
@@ -415,11 +439,11 @@ public class ProcessingException extends TException implements org.apache.thrift
private static class ProcessingExceptionStandardScheme extends StandardScheme<ProcessingException> {
- public void read(org.apache.thrift.protocol.TProtocol iprot, ProcessingException struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol iprot, ProcessingException 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) {
break;
@@ -450,7 +474,8 @@ public class ProcessingException extends TException implements org.apache.thrift
struct.validate();
}
- public void write(org.apache.thrift.protocol.TProtocol oprot, ProcessingException struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol oprot, ProcessingException struct)
+ throws org.apache.thrift.TException {
struct.validate();
oprot.writeStructBegin(STRUCT_DESC);
@@ -467,7 +492,6 @@ public class ProcessingException extends TException implements org.apache.thrift
oprot.writeFieldStop();
oprot.writeStructEnd();
}
-
}
private static class ProcessingExceptionTupleSchemeFactory implements SchemeFactory {
@@ -479,7 +503,8 @@ public class ProcessingException extends TException implements org.apache.thrift
private static class ProcessingExceptionTupleScheme extends TupleScheme<ProcessingException> {
@Override
- public void write(org.apache.thrift.protocol.TProtocol prot, ProcessingException struct) throws org.apache.thrift.TException {
+ public void write(org.apache.thrift.protocol.TProtocol prot, ProcessingException struct)
+ throws org.apache.thrift.TException {
TTupleProtocol oprot = (TTupleProtocol) prot;
oprot.writeI32(struct.errorCode);
BitSet optionals = new BitSet();
@@ -493,7 +518,8 @@ public class ProcessingException extends TException implements org.apache.thrift
}
@Override
- public void read(org.apache.thrift.protocol.TProtocol prot, ProcessingException struct) throws org.apache.thrift.TException {
+ public void read(org.apache.thrift.protocol.TProtocol prot, ProcessingException struct)
+ throws org.apache.thrift.TException {
TTupleProtocol iprot = (TTupleProtocol) prot;
struct.errorCode = iprot.readI32();
struct.setErrorCodeIsSet(true);
@@ -504,6 +530,5 @@ public class ProcessingException extends TException implements org.apache.thrift
}
}
}
-
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java b/pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
index 9cf0e21..6f00981 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/utils/ServiceStatus.java
@@ -18,15 +18,12 @@
*/
package org.apache.pinot.common.utils;
-import com.google.common.collect.Lists;
-import java.util.ArrayList;
import java.util.HashMap;
import java.util.HashSet;
import java.util.Iterator;
import java.util.List;
import java.util.Map;
import java.util.Set;
-import java.util.concurrent.TimeUnit;
import org.apache.helix.HelixAdmin;
import org.apache.helix.HelixDataAccessor;
import org.apache.helix.HelixManager;
@@ -36,7 +33,6 @@ import org.apache.helix.model.CurrentState;
import org.apache.helix.model.ExternalView;
import org.apache.helix.model.IdealState;
import org.apache.helix.model.LiveInstance;
-import org.apache.pinot.common.config.TableNameBuilder;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -183,8 +179,7 @@ public class ServiceStatus {
* Service status callback that compares ideal state with another Helix state. Used to share most of the logic between
* the ideal state/external view comparison and ideal state/current state comparison.
*/
- private static abstract class IdealStateMatchServiceStatusCallback<T extends HelixProperty>
- implements ServiceStatusCallback {
+ private static abstract class IdealStateMatchServiceStatusCallback<T extends HelixProperty> implements ServiceStatusCallback {
final String _clusterName;
final String _instanceName;
@@ -341,8 +336,8 @@ public class ServiceStatus {
} else {
HelixProperty.Stat stat = helixState.getStat();
String description = String
- .format("partition=%s, expected=%s, found=%s, creationTime=%d, modifiedTime=%d, version=%d", partitionName,
- idealStateStatus, currentStateStatus, stat != null ? stat.getCreationTime() : -1,
+ .format("partition=%s, expected=%s, found=%s, creationTime=%d, modifiedTime=%d, version=%d",
+ partitionName, idealStateStatus, currentStateStatus, stat != null ? stat.getCreationTime() : -1,
stat != null ? stat.getModifiedTime() : -1, stat != null ? stat.getVersion() : -1);
return new StatusDescriptionPair(Status.STARTING, description);
}
diff --git a/pinot-common/src/main/resources/log4j2-fatal-only.xml b/pinot-common/src/main/resources/log4j2-fatal-only.xml
index e5bf0a0..b11d696 100644
--- a/pinot-common/src/main/resources/log4j2-fatal-only.xml
+++ b/pinot-common/src/main/resources/log4j2-fatal-only.xml
@@ -29,7 +29,7 @@
</Appenders>
<Loggers>
<AsyncRoot level="fatal" additivity="false">
- <AppenderRef ref="console" />
+ <AppenderRef ref="console"/>
</AsyncRoot>
</Loggers>
</Configuration>
diff --git a/pinot-common/src/main/resources/logging-severe-only.properties b/pinot-common/src/main/resources/logging-severe-only.properties
index d5fdb18..c5bfc0a 100644
--- a/pinot-common/src/main/resources/logging-severe-only.properties
+++ b/pinot-common/src/main/resources/logging-severe-only.properties
@@ -16,5 +16,4 @@
# specific language governing permissions and limitations
# under the License.
#
-
-.level = SEVERE
+.level=SEVERE
diff --git a/pinot-common/src/main/resources/swagger-ui/index.html b/pinot-common/src/main/resources/swagger-ui/index.html
index 04dd1b5..26b29fe 100644
--- a/pinot-common/src/main/resources/swagger-ui/index.html
+++ b/pinot-common/src/main/resources/swagger-ui/index.html
@@ -25,8 +25,8 @@
<head>
<meta charset="UTF-8">
<title>Swagger UI</title>
- <link rel="icon" type="image/png" href="../swaggerui-dist/images/favicon-32x32.png" sizes="32x32" />
- <link rel="icon" type="image/png" href="../swaggerui-dist/images/favicon-16x16.png" sizes="16x16" />
+ <link rel="icon" type="image/png" href="../swaggerui-dist/images/favicon-32x32.png" sizes="32x32"/>
+ <link rel="icon" type="image/png" href="../swaggerui-dist/images/favicon-16x16.png" sizes="16x16"/>
<link href='../swaggerui-dist/css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='../swaggerui-dist/css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
<link href='../swaggerui-dist/css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
@@ -67,15 +67,15 @@
});
// Pre load translate...
- if(window.SwaggerTranslator) {
+ if (window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
window.swaggerUi = new SwaggerUi({
url: url,
dom_id: "swagger-ui-container",
supportedSubmitMethods: ['get', 'post', 'put', 'delete', 'patch'],
- onComplete: function(swaggerApi, swaggerUi){
- if(typeof initOAuth == "function") {
+ onComplete: function (swaggerApi, swaggerUi) {
+ if (typeof initOAuth == "function") {
initOAuth({
clientId: "your-client-id",
clientSecret: "your-client-secret-if-required",
@@ -86,11 +86,11 @@
});
}
- if(window.SwaggerTranslator) {
+ if (window.SwaggerTranslator) {
window.SwaggerTranslator.translate();
}
},
- onFailure: function(data) {
+ onFailure: function (data) {
log("Unable to Load SwaggerUI");
},
docExpansion: "none",
@@ -106,16 +106,18 @@
console.log.apply(console, arguments);
}
}
- });
+ });
</script>
</head>
<body class="swagger-section">
<div id='header'>
<div class="swagger-ui-wrap">
- <a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30" src="../swaggerui-dist/images/logo_small.png" /><span class="logo__title">swagger</span></a>
+ <a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30"
+ src="../swaggerui-dist/images/logo_small.png"/><span class="logo__title">swagger</span></a>
<form id='api_selector'>
- <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div>
+ <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/>
+ </div>
<div id='auth_container'></div>
<div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div>
</form>
diff --git a/pinot-common/src/test/java/org/apache/pinot/common/partition/ReplicaGroupBasedStreamPartitionAssignmentTest.java b/pinot-common/src/test/java/org/apache/pinot/common/partition/ReplicaGroupBasedStreamPartitionAssignmentTest.java
index aa4c7ec..5ebd3b1 100644
--- a/pinot-common/src/test/java/org/apache/pinot/common/partition/ReplicaGroupBasedStreamPartitionAssignmentTest.java
+++ b/pinot-common/src/test/java/org/apache/pinot/common/partition/ReplicaGroupBasedStreamPartitionAssignmentTest.java
@@ -34,7 +34,8 @@ import org.testng.annotations.Test;
public class ReplicaGroupBasedStreamPartitionAssignmentTest {
@Test
- public void testReplicaGroupBasedStreamPartitionAssignmentStrategy() throws InvalidConfigException {
+ public void testReplicaGroupBasedStreamPartitionAssignmentStrategy()
+ throws InvalidConfigException {
MockReplicaGroupBasedStreamPartitionAssignmentStrategy mockStreamPartitionAssignmentStrategy =
new MockReplicaGroupBasedStreamPartitionAssignmentStrategy();
@@ -43,23 +44,22 @@ public class ReplicaGroupBasedStreamPartitionAssignmentTest {
String tableNameWithType = "tableName_REALTIME";
List<String> partitions = Lists.newArrayList("0", "1", "2", "3", "4", "5");
int numReplicas = 2;
- List<String> allTaggedInstances =
- Lists.newArrayList("server_1", "server_2", "server_3", "server_4", "server_5", "server_6", "server_7",
- "server_8");
+ List<String> allTaggedInstances = Lists
+ .newArrayList("server_1", "server_2", "server_3", "server_4", "server_5", "server_6", "server_7", "server_8");
ReplicaGroupPartitionAssignment replicaGroupPartitionAssignment =
new ReplicaGroupPartitionAssignment(tableNameWithType);
- replicaGroupPartitionAssignment.setInstancesToReplicaGroup(0, 0,
- Lists.newArrayList("server_1", "server_2", "server_3", "server_4"));
- replicaGroupPartitionAssignment.setInstancesToReplicaGroup(0, 1,
- Lists.newArrayList("server_5", "server_6", "server_7", "server_8"));
+ replicaGroupPartitionAssignment
+ .setInstancesToReplicaGroup(0, 0, Lists.newArrayList("server_1", "server_2", "server_3", "server_4"));
+ replicaGroupPartitionAssignment
+ .setInstancesToReplicaGroup(0, 1, Lists.newArrayList("server_5", "server_6", "server_7", "server_8"));
// null replica group partition assignment
mockStreamPartitionAssignmentStrategy.setReplicaGroupPartitionAssignment(null);
boolean exception = false;
try {
- mockStreamPartitionAssignmentStrategy.getStreamPartitionAssignment(null, tableNameWithType, partitions,
- numReplicas, allTaggedInstances);
+ mockStreamPartitionAssignmentStrategy
+ .getStreamPartitionAssignment(null, tableNameWithType, partitions, numReplicas, allTaggedInstances);
} catch (InvalidConfigException e) {
exception = true;
}
@@ -67,9 +67,8 @@ public class ReplicaGroupBasedStreamPartitionAssignmentTest {
// mismatch between numReplicas and numReplicaGroups - follow the replica group assignment
mockStreamPartitionAssignmentStrategy.setReplicaGroupPartitionAssignment(replicaGroupPartitionAssignment);
- PartitionAssignment streamPartitionAssignment =
- mockStreamPartitionAssignmentStrategy.getStreamPartitionAssignment(null, tableNameWithType, partitions, 5,
- allTaggedInstances);
+ PartitionAssignment streamPartitionAssignment = mockStreamPartitionAssignmentStrategy
+ .getStreamPartitionAssignment(null, tableNameWithType, partitions, 5, allTaggedInstances);
Assert.assertEquals(streamPartitionAssignment.getInstancesListForPartition("0"),
Lists.newArrayList("server_1", "server_5"));
Assert.assertEquals(streamPartitionAssignment.getInstancesListForPartition("1"),
@@ -85,9 +84,8 @@ public class ReplicaGroupBasedStreamPartitionAssignmentTest {
// happy path - correctly generated partition assignment
mockStreamPartitionAssignmentStrategy.setReplicaGroupPartitionAssignment(replicaGroupPartitionAssignment);
- streamPartitionAssignment =
- mockStreamPartitionAssignmentStrategy.getStreamPartitionAssignment(null, tableNameWithType, partitions,
- numReplicas, allTaggedInstances);
+ streamPartitionAssignment = mockStreamPartitionAssignmentStrategy
+ .getStreamPartitionAssignment(null, tableNameWithType, partitions, numReplicas, allTaggedInstances);
Assert.assertEquals(streamPartitionAssignment.getInstancesListForPartition("0"),
Lists.newArrayList("server_1", "server_5"));
Assert.assertEquals(streamPartitionAssignment.getInstancesListForPartition("1"),
@@ -102,18 +100,17 @@ public class ReplicaGroupBasedStreamPartitionAssignmentTest {
Lists.newArrayList("server_2", "server_6"));
// 0 partitions
- streamPartitionAssignment =
- mockStreamPartitionAssignmentStrategy.getStreamPartitionAssignment(null, tableNameWithType,
- Collections.emptyList(), numReplicas, allTaggedInstances);
+ streamPartitionAssignment = mockStreamPartitionAssignmentStrategy
+ .getStreamPartitionAssignment(null, tableNameWithType, Collections.emptyList(), numReplicas,
+ allTaggedInstances);
Assert.assertEquals(streamPartitionAssignment.getNumPartitions(), 0);
// only 1 instance per replica group
replicaGroupPartitionAssignment.setInstancesToReplicaGroup(0, 0, Lists.newArrayList("server_1"));
replicaGroupPartitionAssignment.setInstancesToReplicaGroup(0, 1, Lists.newArrayList("server_2"));
mockStreamPartitionAssignmentStrategy.setReplicaGroupPartitionAssignment(replicaGroupPartitionAssignment);
- streamPartitionAssignment =
- mockStreamPartitionAssignmentStrategy.getStreamPartitionAssignment(null, tableNameWithType, partitions,
- numReplicas, allTaggedInstances);
+ streamPartitionAssignment = mockStreamPartitionAssignmentStrategy
+ .getStreamPartitionAssignment(null, tableNameWithType, partitions, numReplicas, allTaggedInstances);
ArrayList<String> verticalSlice = Lists.newArrayList("server_1", "server_2");
Assert.assertEquals(streamPartitionAssignment.getInstancesListForPartition("0"), verticalSlice);
Assert.assertEquals(streamPartitionAssignment.getInstancesListForPartition("1"), verticalSlice);
@@ -123,8 +120,7 @@ public class ReplicaGroupBasedStreamPartitionAssignmentTest {
Assert.assertEquals(streamPartitionAssignment.getInstancesListForPartition("5"), verticalSlice);
}
- private class MockReplicaGroupBasedStreamPartitionAssignmentStrategy
- extends ReplicaGroupBasedStreamPartitionAssignmentStrategy {
+ private class MockReplicaGroupBasedStreamPartitionAssignmentStrategy extends ReplicaGroupBasedStreamPartitionAssignmentStrategy {
private ReplicaGroupPartitionAssignment _replicaGroupPartitionAssignment;
@Override
diff --git a/pinot-common/src/test/java/org/apache/pinot/common/partition/StreamPartitionAssignmentGeneratorTest.java b/pinot-common/src/test/java/org/apache/pinot/common/partition/StreamPartitionAssignmentGeneratorTest.java
index 4562418..30272e3 100644
--- a/pinot-common/src/test/java/org/apache/pinot/common/partition/StreamPartitionAssignmentGeneratorTest.java
+++ b/pinot-common/src/test/java/org/apache/pinot/common/partition/StreamPartitionAssignmentGeneratorTest.java
@@ -98,7 +98,8 @@ public class StreamPartitionAssignmentGeneratorTest {
// ReplicaGroup
when(mockValidationConfig.getSegmentAssignmentStrategy()).thenReturn(
- CommonConstants.Helix.DataSource.SegmentAssignmentStrategyType.ReplicaGroupSegmentAssignmentStrategy.toString());
+ CommonConstants.Helix.DataSource.SegmentAssignmentStrategyType.ReplicaGroupSegmentAssignmentStrategy
+ .toString());
when(tableConfig.getValidationConfig()).thenReturn(mockValidationConfig);
streamPartitionAssignmentStrategy =
StreamPartitionAssignmentStrategyFactory.getStreamPartitionAssignmentStrategy(tableConfig);
diff --git a/pinot-common/src/test/java/org/apache/pinot/common/partition/UniformStreamPartitionAssignmentTest.java b/pinot-common/src/test/java/org/apache/pinot/common/partition/UniformStreamPartitionAssignmentTest.java
index 5bb3da6..64347c8 100644
--- a/pinot-common/src/test/java/org/apache/pinot/common/partition/UniformStreamPartitionAssignmentTest.java
+++ b/pinot-common/src/test/java/org/apache/pinot/common/partition/UniformStreamPartitionAssignmentTest.java
@@ -37,37 +37,36 @@ public class UniformStreamPartitionAssignmentTest {
* @throws InvalidConfigException
*/
@Test
- public void testUniformStreamPartitionAssignmentStrategy() throws InvalidConfigException {
+ public void testUniformStreamPartitionAssignmentStrategy()
+ throws InvalidConfigException {
UniformStreamPartitionAssignmentStrategy uniformStreamPartitionAssignmentStrategy =
new UniformStreamPartitionAssignmentStrategy();
String tableNameWithType = "tableName_REALTIME";
List<String> partitions = Lists.newArrayList("0", "1", "2", "3", "4", "5");
int numReplicas = 3;
- List<String> allTaggedInstances =
- Lists.newArrayList("server_1", "server_2", "server_3", "server_4", "server_5", "server_6", "server_7",
- "server_8");
+ List<String> allTaggedInstances = Lists
+ .newArrayList("server_1", "server_2", "server_3", "server_4", "server_5", "server_6", "server_7", "server_8");
// num replicas more than tagged instances
boolean exception = false;
try {
- uniformStreamPartitionAssignmentStrategy.getStreamPartitionAssignment(null, tableNameWithType, partitions, 10,
- allTaggedInstances);
+ uniformStreamPartitionAssignmentStrategy
+ .getStreamPartitionAssignment(null, tableNameWithType, partitions, 10, allTaggedInstances);
} catch (InvalidConfigException e) {
exception = true;
}
Assert.assertTrue(exception);
// 0 partitions
- PartitionAssignment uniformPartitionAssignment =
- uniformStreamPartitionAssignmentStrategy.getStreamPartitionAssignment(null, tableNameWithType,
- Collections.emptyList(), numReplicas, allTaggedInstances);
+ PartitionAssignment uniformPartitionAssignment = uniformStreamPartitionAssignmentStrategy
+ .getStreamPartitionAssignment(null, tableNameWithType, Collections.emptyList(), numReplicas,
+ allTaggedInstances);
Assert.assertEquals(uniformPartitionAssignment.getNumPartitions(), 0);
// verify sticky uniform assignment
- uniformPartitionAssignment =
- uniformStreamPartitionAssignmentStrategy.getStreamPartitionAssignment(null, tableNameWithType, partitions,
- numReplicas, allTaggedInstances);
+ uniformPartitionAssignment = uniformStreamPartitionAssignmentStrategy
+ .getStreamPartitionAssignment(null, tableNameWithType, partitions, numReplicas, allTaggedInstances);
List<String> instancesUsed = new ArrayList<>();
for (int p = 0; p < uniformPartitionAssignment.getNumPartitions(); p++) {
diff --git a/pinot-common/src/test/java/org/apache/pinot/common/utils/ServiceStatusTest.java b/pinot-common/src/test/java/org/apache/pinot/common/utils/ServiceStatusTest.java
index 019071e..eb657cb 100644
--- a/pinot-common/src/test/java/org/apache/pinot/common/utils/ServiceStatusTest.java
+++ b/pinot-common/src/test/java/org/apache/pinot/common/utils/ServiceStatusTest.java
@@ -79,7 +79,8 @@ public class ServiceStatusTest {
public static final String TABLE_NAME = "myTable_OFFLINE";
public static final String INSTANCE_NAME = "Server_1.2.3.4_1234";
- private static final String CHARS_IN_RANDOM_TABLE_NAME = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
+ private static final String CHARS_IN_RANDOM_TABLE_NAME =
+ "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789";
private static Random random;
@BeforeClass
@@ -217,7 +218,8 @@ public class ServiceStatusTest {
// Create a ServiceStatus object that monitors about 2500 tables
// and returns
@Test
- public void testMultipleResourcesAndPercent() throws Exception {
+ public void testMultipleResourcesAndPercent()
+ throws Exception {
testMultipleResourcesAndPercent(98.6);
testMultipleResourcesAndPercent(99.3);
testMultipleResourcesAndPercent(99.5);
@@ -240,7 +242,7 @@ public class ServiceStatusTest {
tables.add(tableName);
final String segmentName = "segment1";
String evState;
- if (random.nextDouble() *100 < percentReady) {
+ if (random.nextDouble() * 100 < percentReady) {
evState = "ONLINE";
readyTables++;
} else {
@@ -255,16 +257,16 @@ public class ServiceStatusTest {
externalViews.put(tableName, externalView);
}
- final double actualReadyPercent = (double)readyTables * 100 / tableCount;
+ final double actualReadyPercent = (double) readyTables * 100 / tableCount;
double lowestReadyPercent = (int) Math.round(actualReadyPercent);
- lowestReadyPercent = lowestReadyPercent > 2 ? lowestReadyPercent - 2: 1; // Should be 2 below percentReady
+ lowestReadyPercent = lowestReadyPercent > 2 ? lowestReadyPercent - 2 : 1; // Should be 2 below percentReady
// Create ServiceCallback objects with minReadyPercent set to values between lowestReadyPercent and 100.
// Call getServiceStatus() enough number of times so that we are only left with the tables
// that are not ready yet. We need to call getServiceStatus() at most tableCount times.
for (double minReadyPercent = lowestReadyPercent; minReadyPercent <= 100; minReadyPercent += 0.1) {
- TestMultiResourceISAndEVMatchCB callback = new TestMultiResourceISAndEVMatchCB(clusterName, INSTANCE_NAME, tables,
- minReadyPercent);
+ TestMultiResourceISAndEVMatchCB callback =
+ new TestMultiResourceISAndEVMatchCB(clusterName, INSTANCE_NAME, tables, minReadyPercent);
callback.setIdealStates(idealStates);
callback.setExternalViews(externalViews);
@@ -277,17 +279,17 @@ public class ServiceStatusTest {
status = callback.getServiceStatus();
}
- ServiceStatus.Status expected = minReadyPercent > actualReadyPercent ?
- ServiceStatus.Status.STARTING : ServiceStatus.Status.GOOD;
- String errorMsg = "Mismatch at " + minReadyPercent + "%, tableCount=" + tableCount +
- ", percentTablesReady=" + actualReadyPercent + ":" + callback.getStatusDescription();
+ ServiceStatus.Status expected =
+ minReadyPercent > actualReadyPercent ? ServiceStatus.Status.STARTING : ServiceStatus.Status.GOOD;
+ String errorMsg = "Mismatch at " + minReadyPercent + "%, tableCount=" + tableCount + ", percentTablesReady="
+ + actualReadyPercent + ":" + callback.getStatusDescription();
Assert.assertEquals(status, expected, errorMsg);
// The status should never change going forward from here.
for (int i = nBadTables + 1; i < tableCount; i++) {
ServiceStatus.Status laterStatus = callback.getServiceStatus();
- String msg = "Mismatch at " + minReadyPercent + "%, tableCount=" + tableCount +
- ", percentTablesReady=" + actualReadyPercent + ", i=" + i + ":" + callback.getStatusDescription();
+ String msg = "Mismatch at " + minReadyPercent + "%, tableCount=" + tableCount + ", percentTablesReady="
+ + actualReadyPercent + ", i=" + i + ":" + callback.getStatusDescription();
Assert.assertEquals(laterStatus, status, msg);
}
}
@@ -325,8 +327,8 @@ public class ServiceStatusTest {
public Map<String, IdealState> _idealStates = new HashMap<>();
public Map<String, ExternalView> _externalViews = new HashMap<>();
- public TestMultiResourceISAndEVMatchCB(String clusterName, String instanceName,
- List<String> resourcesToMonitor, double minResourcesPercent) {
+ public TestMultiResourceISAndEVMatchCB(String clusterName, String instanceName, List<String> resourcesToMonitor,
+ double minResourcesPercent) {
super(Mockito.mock(HelixManager.class), clusterName, instanceName, resourcesToMonitor, minResourcesPercent);
}
diff --git a/pinot-common/src/test/resources/log4j2.xml b/pinot-common/src/test/resources/log4j2.xml
index 353a551..b2f3cb1 100644
--- a/pinot-common/src/test/resources/log4j2.xml
+++ b/pinot-common/src/test/resources/log4j2.xml
@@ -29,7 +29,7 @@
</Appenders>
<Loggers>
<AsyncRoot level="warn" additivity="false">
- <AppenderRef ref="console" />
+ <AppenderRef ref="console"/>
</AsyncRoot>
</Loggers>
</Configuration>
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org