in pinot-common/src/main/java/org/apache/pinot/common/request/PinotQuery.java [1305:1480]
public void read(org.apache.thrift.protocol.TProtocol iprot, PinotQuery struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TField schemeField;
iprot.readStructBegin();
while (true)
{
schemeField = iprot.readFieldBegin();
if (schemeField.type == org.apache.thrift.protocol.TType.STOP) {
break;
}
switch (schemeField.id) {
case 1: // VERSION
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.version = iprot.readI32();
struct.setVersionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 2: // DATA_SOURCE
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.dataSource = new DataSource();
struct.dataSource.read(iprot);
struct.setDataSourceIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 3: // SELECT_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list0 = iprot.readListBegin();
struct.selectList = new java.util.ArrayList<Expression>(_list0.size);
@org.apache.thrift.annotation.Nullable Expression _elem1;
for (int _i2 = 0; _i2 < _list0.size; ++_i2)
{
_elem1 = new Expression();
_elem1.read(iprot);
struct.selectList.add(_elem1);
}
iprot.readListEnd();
}
struct.setSelectListIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 4: // FILTER_EXPRESSION
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.filterExpression = new Expression();
struct.filterExpression.read(iprot);
struct.setFilterExpressionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 5: // GROUP_BY_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list3 = iprot.readListBegin();
struct.groupByList = new java.util.ArrayList<Expression>(_list3.size);
@org.apache.thrift.annotation.Nullable Expression _elem4;
for (int _i5 = 0; _i5 < _list3.size; ++_i5)
{
_elem4 = new Expression();
_elem4.read(iprot);
struct.groupByList.add(_elem4);
}
iprot.readListEnd();
}
struct.setGroupByListIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 6: // ORDER_BY_LIST
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
org.apache.thrift.protocol.TList _list6 = iprot.readListBegin();
struct.orderByList = new java.util.ArrayList<Expression>(_list6.size);
@org.apache.thrift.annotation.Nullable Expression _elem7;
for (int _i8 = 0; _i8 < _list6.size; ++_i8)
{
_elem7 = new Expression();
_elem7.read(iprot);
struct.orderByList.add(_elem7);
}
iprot.readListEnd();
}
struct.setOrderByListIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 7: // HAVING_EXPRESSION
if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) {
struct.havingExpression = new Expression();
struct.havingExpression.read(iprot);
struct.setHavingExpressionIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 8: // LIMIT
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.limit = iprot.readI32();
struct.setLimitIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 9: // OFFSET
if (schemeField.type == org.apache.thrift.protocol.TType.I32) {
struct.offset = iprot.readI32();
struct.setOffsetIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 11: // QUERY_OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map9 = iprot.readMapBegin();
struct.queryOptions = new java.util.HashMap<java.lang.String,java.lang.String>(2*_map9.size);
@org.apache.thrift.annotation.Nullable java.lang.String _key10;
@org.apache.thrift.annotation.Nullable java.lang.String _val11;
for (int _i12 = 0; _i12 < _map9.size; ++_i12)
{
_key10 = iprot.readString();
_val11 = iprot.readString();
struct.queryOptions.put(_key10, _val11);
}
iprot.readMapEnd();
}
struct.setQueryOptionsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 12: // EXPLAIN
if (schemeField.type == org.apache.thrift.protocol.TType.BOOL) {
struct.explain = iprot.readBool();
struct.setExplainIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
case 13: // EXPRESSION_OVERRIDE_HINTS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map13 = iprot.readMapBegin();
struct.expressionOverrideHints = new java.util.HashMap<Expression,Expression>(2*_map13.size);
@org.apache.thrift.annotation.Nullable Expression _key14;
@org.apache.thrift.annotation.Nullable Expression _val15;
for (int _i16 = 0; _i16 < _map13.size; ++_i16)
{
_key14 = new Expression();
_key14.read(iprot);
_val15 = new Expression();
_val15.read(iprot);
struct.expressionOverrideHints.put(_key14, _val15);
}
iprot.readMapEnd();
}
struct.setExpressionOverrideHintsIsSet(true);
} else {
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
default:
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
iprot.readFieldEnd();
}
iprot.readStructEnd();
struct.validate();
}