blob: f983e13e4bc3e6701c38cc3d6de7ef3bebe96ae1 [file] [log] [blame]
/**
* Copyright (C) 2014-2016 LinkedIn Corp. (pinot-core@linkedin.com)
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
namespace java com.linkedin.pinot.common.request
/**
* AUTO GENERATED: DO NOT EDIT
* Filter Operator
**/
enum FilterOperator {
AND,
OR,
EQUALITY,
NOT,
RANGE,
REGEXP_LIKE,
NOT_IN,
IN
}
/**
* AUTO GENERATED: DO NOT EDIT
* Query type
**/
struct QueryType {
1: optional bool hasSelection;
2: optional bool hasFilter;
3: optional bool hasAggregation;
4: optional bool hasGroup_by;
}
/**
* AUTO GENERATED: DO NOT EDIT
* Query source
**/
struct QuerySource {
1: optional string tableName;
}
/**
* AUTO GENERATED: DO NOT EDIT
* Filter query
**/
struct FilterQuery {
1: required i32 id; /** This should be unique within a single request **/
2: optional string column;
3: list<string> value;
4: optional FilterOperator operator;
5: list<i32> nestedFilterQueryIds;
}
/**
* AUTO GENERATED: DO NOT EDIT
* Filter Query is nested but thrift stable version does not support yet (The support is there in top of the trunk but no released jars. Two concerns : stability and onus of maintaining a stable point. Also, its pretty difficult to compile thrift in Linkedin software development environment which is not geared towards c++ dev. Hence, the )
**/
struct FilterQueryMap {
1: optional map<i32,FilterQuery> filterQueryMap;
}
/**
* AUTO GENERATED: DO NOT EDIT
* Aggregation
**/
struct AggregationInfo {
1: optional string aggregationType;
2: optional map<string,string> aggregationParams;
}
/**
* AUTO GENERATED: DO NOT EDIT
* GroupBy
**/
struct GroupBy {
1: optional list<string> columns;
2: optional i64 topN;
3: optional list<string> expressions;
}
/**
* AUTO GENERATED: DO NOT EDIT
* selection-sort : specifies how the search results should be sorted.
* The results can be sorted based on one or multiple columns
**/
struct SelectionSort {
1: optional string column;
2: optional bool isAsc;
}
/**
* AUTO GENERATED: DO NOT EDIT
* Selection
**/
struct Selection {
1: optional list<string> selectionColumns;
2: optional list<SelectionSort> selectionSortSequence;
3: optional i32 offset = 0;
4: optional i32 size = 10;
}
/**
* AUTO GENERATED: DO NOT EDIT
* Broker Query
**/
struct BrokerRequest {
1: optional QueryType queryType;
2: optional QuerySource querySource;
3: optional string timeInterval;
4: optional string duration;
5: optional FilterQuery filterQuery;
6: optional list<AggregationInfo> aggregationsInfo;
7: optional GroupBy groupBy;
8: optional Selection selections;
9: optional FilterQueryMap filterSubQueryMap;
10: optional string bucketHashKey;
11: optional bool enableTrace;
12: optional string responseFormat;
13: optional map<string, string> debugOptions;
14: optional map<string, string> queryOptions;
}
/**
* AUTO GENERATED: DO NOT EDIT
* Instance Request
**/
struct InstanceRequest {
1: required i64 requestId;
2: required BrokerRequest query;
3: optional list<string> searchSegments;
4: optional bool enableTrace;
5: optional string brokerId;
}