From 076cd404c458a454939c07adeec4b2eaa382c01a Mon Sep 17 00:00:00 2001
From: "Xiaotian (Jackie) Jiang"
<17555551+Jackie-Jiang@users.noreply.github.com>
Date: Wed, 1 May 2024 16:03:27 -0700
Subject: [PATCH] Cleanup deprecated query options (#13040)
---
.../api/resources/PinotClientRequest.java | 4 -
.../BaseBrokerRequestHandler.java | 18 +-
.../BrokerRequestHandlerDelegate.java | 19 +-
.../MultiStageBrokerRequestHandler.java | 27 +-
.../BrokerRequestOptionsTest.java | 75 +---
pinot-common/pom.xml | 9 +-
.../pinot/common/request/BrokerRequest.java | 2 +-
.../pinot/common/request/DataSource.java | 2 +-
.../pinot/common/request/Expression.java | 2 +-
.../pinot/common/request/ExpressionType.java | 2 +-
.../apache/pinot/common/request/Function.java | 38 +-
.../pinot/common/request/Identifier.java | 2 +-
.../pinot/common/request/InstanceRequest.java | 2 +-
.../org/apache/pinot/common/request/Join.java | 2 +-
.../apache/pinot/common/request/JoinType.java | 2 +-
.../apache/pinot/common/request/Literal.java | 162 ++++-----
.../pinot/common/request/PinotQuery.java | 328 +++++-------------
.../pinot/common/request/QuerySource.java | 2 +-
.../common/response/ProcessingException.java | 2 +-
.../common/utils/request/RequestUtils.java | 32 +-
.../pinot/sql/parsers/CalciteSqlParser.java | 10 +-
.../sql/parsers/CalciteSqlCompilerTest.java | 19 +-
pinot-common/src/thrift/query.thrift | 2 +-
.../query/request/context/QueryContext.java | 1 -
.../apache/pinot/core/util/GapfillUtils.java | 4 +-
.../pinot/spi/utils/CommonConstants.java | 9 -
26 files changed, 277 insertions(+), 500 deletions(-)
diff --git a/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java b/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java
index 0bdec44a090..a6b599cbb49 100644
--- a/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java
+++ b/pinot-broker/src/main/java/org/apache/pinot/broker/api/resources/PinotClientRequest.java
@@ -114,7 +114,6 @@ public class PinotClientRequest {
@ManualAuthorization
public void processSqlQueryGet(@ApiParam(value = "Query", required = true) @QueryParam("sql") String query,
@ApiParam(value = "Trace enabled") @QueryParam(Request.TRACE) String traceEnabled,
- @ApiParam(value = "Debug options") @QueryParam(Request.DEBUG_OPTIONS) String debugOptions,
@Suspended AsyncResponse asyncResponse, @Context org.glassfish.grizzly.http.server.Request requestContext,
@Context HttpHeaders httpHeaders) {
try {
@@ -123,9 +122,6 @@ public void processSqlQueryGet(@ApiParam(value = "Query", required = true) @Quer
if (traceEnabled != null) {
requestJson.put(Request.TRACE, traceEnabled);
}
- if (debugOptions != null) {
- requestJson.put(Request.DEBUG_OPTIONS, debugOptions);
- }
BrokerResponse brokerResponse = executeSqlQuery(requestJson, makeHttpIdentity(requestContext), true, httpHeaders);
asyncResponse.resume(getPinotQueryResponse(brokerResponse));
} catch (WebApplicationException wae) {
diff --git a/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java b/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
index 2fdc36e1ea3..bfe63b18822 100644
--- a/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
+++ b/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
@@ -314,13 +314,21 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S
Tracing.ThreadAccountantOps.setupRunner(String.valueOf(requestId));
try {
- long compilationStartTimeNs;
+ // Parse the query if needed
+ if (sqlNodeAndOptions == null) {
+ try {
+ sqlNodeAndOptions = RequestUtils.parseQuery(query, request);
+ } catch (Exception e) {
+ // Do not log or emit metric here because it is pure user error
+ requestContext.setErrorCode(QueryException.SQL_PARSING_ERROR_CODE);
+ return new BrokerResponseNative(QueryException.getException(QueryException.SQL_PARSING_ERROR, e));
+ }
+ }
+
+ // Compile the request into PinotQuery
+ long compilationStartTimeNs = System.nanoTime();
PinotQuery pinotQuery;
try {
- // Parse the request
- sqlNodeAndOptions = sqlNodeAndOptions != null ? sqlNodeAndOptions : RequestUtils.parseQuery(query, request);
- // Compile the request into PinotQuery
- compilationStartTimeNs = System.nanoTime();
pinotQuery = CalciteSqlParser.compileToPinotQuery(sqlNodeAndOptions);
} catch (Exception e) {
LOGGER.info("Caught exception while compiling SQL request {}: {}, {}", requestId, query, e.getMessage());
diff --git a/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BrokerRequestHandlerDelegate.java b/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BrokerRequestHandlerDelegate.java
index 0da84e6eadc..23207005420 100644
--- a/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BrokerRequestHandlerDelegate.java
+++ b/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BrokerRequestHandlerDelegate.java
@@ -26,13 +26,12 @@
import org.apache.http.conn.HttpClientConnectionManager;
import org.apache.pinot.broker.api.RequesterIdentity;
import org.apache.pinot.common.exception.QueryException;
-import org.apache.pinot.common.metrics.BrokerMeter;
import org.apache.pinot.common.metrics.BrokerMetrics;
import org.apache.pinot.common.response.BrokerResponse;
import org.apache.pinot.common.response.broker.BrokerResponseNative;
import org.apache.pinot.common.utils.request.RequestUtils;
import org.apache.pinot.spi.trace.RequestContext;
-import org.apache.pinot.spi.utils.CommonConstants;
+import org.apache.pinot.spi.utils.CommonConstants.Broker.Request;
import org.apache.pinot.sql.parsers.SqlNodeAndOptions;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -85,24 +84,22 @@ public BrokerResponse handleRequest(JsonNode request, @Nullable SqlNodeAndOption
@Nullable RequesterIdentity requesterIdentity, RequestContext requestContext, @Nullable HttpHeaders httpHeaders)
throws Exception {
requestContext.setBrokerId(_brokerId);
+
+ // Parse the query if needed
if (sqlNodeAndOptions == null) {
try {
- sqlNodeAndOptions = RequestUtils.parseQuery(request.get(CommonConstants.Broker.Request.SQL).asText(), request);
+ sqlNodeAndOptions = RequestUtils.parseQuery(request.get(Request.SQL).asText(), request);
} catch (Exception e) {
- LOGGER.info("Caught exception while compiling SQL: {}, {}", request, e.getMessage());
- _brokerMetrics.addMeteredGlobalValue(BrokerMeter.REQUEST_COMPILATION_EXCEPTIONS, 1);
+ // Do not log or emit metric here because it is pure user error
requestContext.setErrorCode(QueryException.SQL_PARSING_ERROR_CODE);
return new BrokerResponseNative(QueryException.getException(QueryException.SQL_PARSING_ERROR, e));
}
}
- if (request.has(CommonConstants.Broker.Request.QUERY_OPTIONS)) {
- sqlNodeAndOptions.setExtraOptions(
- RequestUtils.getOptionsFromJson(request, CommonConstants.Broker.Request.QUERY_OPTIONS));
- }
if (_multiStageBrokerRequestHandler != null && Boolean.parseBoolean(
- sqlNodeAndOptions.getOptions().get(CommonConstants.Broker.Request.QueryOptionKey.USE_MULTISTAGE_ENGINE))) {
- return _multiStageBrokerRequestHandler.handleRequest(request, requesterIdentity, requestContext, httpHeaders);
+ sqlNodeAndOptions.getOptions().get(Request.QueryOptionKey.USE_MULTISTAGE_ENGINE))) {
+ return _multiStageBrokerRequestHandler.handleRequest(request, sqlNodeAndOptions, requesterIdentity,
+ requestContext, httpHeaders);
} else {
return _singleStageBrokerRequestHandler.handleRequest(request, sqlNodeAndOptions, requesterIdentity,
requestContext, httpHeaders);
diff --git a/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java b/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java
index 01bfe456b5b..e1dc00a4065 100644
--- a/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java
+++ b/pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/MultiStageBrokerRequestHandler.java
@@ -109,26 +109,25 @@ protected BrokerResponse handleRequest(long requestId, String query, @Nullable S
HttpHeaders httpHeaders) {
LOGGER.debug("SQL query for request {}: {}", requestId, query);
- long compilationStartTimeNs;
+ // Parse the query if needed
+ if (sqlNodeAndOptions == null) {
+ try {
+ sqlNodeAndOptions = RequestUtils.parseQuery(query, request);
+ } catch (Exception e) {
+ // Do not log or emit metric here because it is pure user error
+ requestContext.setErrorCode(QueryException.SQL_PARSING_ERROR_CODE);
+ return new BrokerResponseNative(QueryException.getException(QueryException.SQL_PARSING_ERROR, e));
+ }
+ }
+
+ // Compile the request
+ long compilationStartTimeNs = System.nanoTime();
long queryTimeoutMs;
QueryEnvironment.QueryPlannerResult queryPlanResult;
- try {
- // Parse the request
- sqlNodeAndOptions = sqlNodeAndOptions != null ? sqlNodeAndOptions : RequestUtils.parseQuery(query, request);
- } catch (RuntimeException e) {
- String consolidatedMessage = ExceptionUtils.consolidateExceptionMessages(e);
- LOGGER.info("Caught exception parsing request {}: {}, {}", requestId, query, consolidatedMessage);
- _brokerMetrics.addMeteredGlobalValue(BrokerMeter.REQUEST_COMPILATION_EXCEPTIONS, 1);
- requestContext.setErrorCode(QueryException.SQL_PARSING_ERROR_CODE);
- return new BrokerResponseNative(
- QueryException.getException(QueryException.SQL_PARSING_ERROR, consolidatedMessage));
- }
try {
Long timeoutMsFromQueryOption = QueryOptionsUtils.getTimeoutMs(sqlNodeAndOptions.getOptions());
queryTimeoutMs = timeoutMsFromQueryOption == null ? _brokerTimeoutMs : timeoutMsFromQueryOption;
String database = DatabaseUtils.extractDatabaseFromQueryRequest(sqlNodeAndOptions.getOptions(), httpHeaders);
- // Compile the request
- compilationStartTimeNs = System.nanoTime();
QueryEnvironment queryEnvironment = new QueryEnvironment(new TypeFactory(new TypeSystem()),
CalciteSchemaBuilder.asRootSchema(new PinotCatalog(database, _tableCache), database), _workerManager,
_tableCache);
diff --git a/pinot-broker/src/test/java/org/apache/pinot/broker/requesthandler/BrokerRequestOptionsTest.java b/pinot-broker/src/test/java/org/apache/pinot/broker/requesthandler/BrokerRequestOptionsTest.java
index 14d1d39bdba..e6ebccd1664 100644
--- a/pinot-broker/src/test/java/org/apache/pinot/broker/requesthandler/BrokerRequestOptionsTest.java
+++ b/pinot-broker/src/test/java/org/apache/pinot/broker/requesthandler/BrokerRequestOptionsTest.java
@@ -26,68 +26,40 @@
import org.apache.pinot.spi.utils.JsonUtils;
import org.apache.pinot.sql.parsers.CalciteSqlParser;
import org.apache.pinot.sql.parsers.SqlNodeAndOptions;
-import org.testng.Assert;
import org.testng.annotations.Test;
+import static org.testng.Assert.assertEquals;
+import static org.testng.Assert.assertTrue;
+
/**
* Tests the various options set in the broker request
*/
public class BrokerRequestOptionsTest {
- // TODO: remove this legacy option size checker after 0.11 release cut.
- private static final int LEGACY_PQL_QUERY_OPTION_SIZE = 2;
@Test
public void testSetOptions() {
- long requestId = 1;
String query = "select * from testTable";
// None of the options
ObjectNode jsonRequest = JsonUtils.newObjectNode();
- SqlNodeAndOptions sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions(query);;
+ SqlNodeAndOptions sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions(query);
RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 0 + LEGACY_PQL_QUERY_OPTION_SIZE);
+ assertTrue(sqlNodeAndOptions.getOptions().isEmpty());
// TRACE
// Has trace false
jsonRequest.put(Request.TRACE, false);
sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions(query);
RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 0 + LEGACY_PQL_QUERY_OPTION_SIZE);
+ assertTrue(sqlNodeAndOptions.getOptions().isEmpty());
// Has trace true
jsonRequest.put(Request.TRACE, true);
sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions(query);
RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 1 + LEGACY_PQL_QUERY_OPTION_SIZE);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get(Request.TRACE), "true");
-
- // DEBUG_OPTIONS (debug options will also be included as query options)
- // Has debugOptions
- jsonRequest = JsonUtils.newObjectNode();
- jsonRequest.put(Request.DEBUG_OPTIONS, "debugOption1=foo");
- sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions(query);
- RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 1 + LEGACY_PQL_QUERY_OPTION_SIZE);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("debugOption1"), "foo");
-
- // Has multiple debugOptions
- jsonRequest.put(Request.DEBUG_OPTIONS, "debugOption1=foo;debugOption2=bar");
- sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions(query);
- RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 2 + LEGACY_PQL_QUERY_OPTION_SIZE);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("debugOption1"), "foo");
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("debugOption2"), "bar");
-
- // Invalid debug options
- jsonRequest.put(Request.DEBUG_OPTIONS, "debugOption1");
- sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions(query);
- try {
- RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.fail();
- } catch (Exception e) {
- // Expected
- }
+ assertEquals(sqlNodeAndOptions.getOptions().size(), 1);
+ assertEquals(sqlNodeAndOptions.getOptions().get(Request.TRACE), "true");
// QUERY_OPTIONS
jsonRequest = JsonUtils.newObjectNode();
@@ -97,41 +69,28 @@ public void testSetOptions() {
queryOptions.put("queryOption1", "foo");
sqlNodeAndOptions.getOptions().putAll(queryOptions);
RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 1 + LEGACY_PQL_QUERY_OPTION_SIZE);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("queryOption1"), "foo");
+ assertEquals(sqlNodeAndOptions.getOptions().size(), 1);
+ assertEquals(sqlNodeAndOptions.getOptions().get("queryOption1"), "foo");
// Has queryOptions in query
sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions("SET queryOption1='foo'; select * from testTable");
RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 1 + LEGACY_PQL_QUERY_OPTION_SIZE);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("queryOption1"), "foo");
+ assertEquals(sqlNodeAndOptions.getOptions().size(), 1);
+ assertEquals(sqlNodeAndOptions.getOptions().get("queryOption1"), "foo");
// Has query options in json payload
jsonRequest.put(Request.QUERY_OPTIONS, "queryOption1=foo");
sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions(query);
RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 1 + LEGACY_PQL_QUERY_OPTION_SIZE);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("queryOption1"), "foo");
+ assertEquals(sqlNodeAndOptions.getOptions().size(), 1);
+ assertEquals(sqlNodeAndOptions.getOptions().get("queryOption1"), "foo");
// Has query options in both json payload and sqlNodeAndOptions, sqlNodeAndOptions takes priority
jsonRequest.put(Request.QUERY_OPTIONS, "queryOption1=bar;queryOption2=moo");
sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions("SET queryOption1='foo'; select * from testTable;");
RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 2 + LEGACY_PQL_QUERY_OPTION_SIZE);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("queryOption1"), "foo");
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("queryOption2"), "moo");
-
- // Has all 3
- jsonRequest = JsonUtils.newObjectNode();
- jsonRequest.put(Request.TRACE, true);
- jsonRequest.put(Request.DEBUG_OPTIONS, "debugOption1=foo");
- jsonRequest.put(Request.QUERY_OPTIONS, "queryOption1=bar;queryOption2=moo");
- sqlNodeAndOptions = CalciteSqlParser.compileToSqlNodeAndOptions(query);
- RequestUtils.setOptions(sqlNodeAndOptions, jsonRequest);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().size(), 4 + LEGACY_PQL_QUERY_OPTION_SIZE);
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("queryOption1"), "bar");
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("queryOption2"), "moo");
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get(Request.TRACE), "true");
- Assert.assertEquals(sqlNodeAndOptions.getOptions().get("debugOption1"), "foo");
+ assertEquals(sqlNodeAndOptions.getOptions().size(), 2);
+ assertEquals(sqlNodeAndOptions.getOptions().get("queryOption1"), "foo");
+ assertEquals(sqlNodeAndOptions.getOptions().get("queryOption2"), "moo");
}
}
diff --git a/pinot-common/pom.xml b/pinot-common/pom.xml
index 32cd2eb9dbc..4db50fc89cc 100644
--- a/pinot-common/pom.xml
+++ b/pinot-common/pom.xml
@@ -363,7 +363,7 @@
generate-sources
generate-sources
-
+
@@ -387,10 +387,11 @@
-
+
-
-
+
+
+
run
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 e7ba3c58aa8..43bc4776ff0 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
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class BrokerRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("BrokerRequest");
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/DataSource.java b/pinot-common/src/main/java/org/apache/pinot/common/request/DataSource.java
index 72cf69b401d..7c9d11a842e 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/DataSource.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/DataSource.java
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class DataSource implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DataSource");
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/Expression.java b/pinot-common/src/main/java/org/apache/pinot/common/request/Expression.java
index 4a75908a6dc..f5c8226e965 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/Expression.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/Expression.java
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class Expression implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Expression");
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/ExpressionType.java b/pinot-common/src/main/java/org/apache/pinot/common/request/ExpressionType.java
index 5ac86ce9c54..f3b9651250a 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/ExpressionType.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/ExpressionType.java
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public enum ExpressionType implements org.apache.thrift.TEnum {
LITERAL(0),
IDENTIFIER(1),
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/Function.java b/pinot-common/src/main/java/org/apache/pinot/common/request/Function.java
index 197843b7f07..1a186ec272a 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/Function.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/Function.java
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class Function implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Function");
@@ -437,14 +437,14 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, Function struct) th
case 2: // OPERANDS
if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
{
- org.apache.thrift.protocol.TList _list94 = iprot.readListBegin();
- struct.operands = new java.util.ArrayList(_list94.size);
- @org.apache.thrift.annotation.Nullable Expression _elem95;
- for (int _i96 = 0; _i96 < _list94.size; ++_i96)
+ org.apache.thrift.protocol.TList _list84 = iprot.readListBegin();
+ struct.operands = new java.util.ArrayList(_list84.size);
+ @org.apache.thrift.annotation.Nullable Expression _elem85;
+ for (int _i86 = 0; _i86 < _list84.size; ++_i86)
{
- _elem95 = new Expression();
- _elem95.read(iprot);
- struct.operands.add(_elem95);
+ _elem85 = new Expression();
+ _elem85.read(iprot);
+ struct.operands.add(_elem85);
}
iprot.readListEnd();
}
@@ -476,9 +476,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, Function struct) t
oprot.writeFieldBegin(OPERANDS_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.operands.size()));
- for (Expression _iter97 : struct.operands)
+ for (Expression _iter87 : struct.operands)
{
- _iter97.write(oprot);
+ _iter87.write(oprot);
}
oprot.writeListEnd();
}
@@ -511,9 +511,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, Function struct) th
if (struct.isSetOperands()) {
{
oprot.writeI32(struct.operands.size());
- for (Expression _iter98 : struct.operands)
+ for (Expression _iter88 : struct.operands)
{
- _iter98.write(oprot);
+ _iter88.write(oprot);
}
}
}
@@ -527,14 +527,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, Function struct) thr
java.util.BitSet incoming = iprot.readBitSet(1);
if (incoming.get(0)) {
{
- org.apache.thrift.protocol.TList _list99 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
- struct.operands = new java.util.ArrayList(_list99.size);
- @org.apache.thrift.annotation.Nullable Expression _elem100;
- for (int _i101 = 0; _i101 < _list99.size; ++_i101)
+ org.apache.thrift.protocol.TList _list89 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.operands = new java.util.ArrayList(_list89.size);
+ @org.apache.thrift.annotation.Nullable Expression _elem90;
+ for (int _i91 = 0; _i91 < _list89.size; ++_i91)
{
- _elem100 = new Expression();
- _elem100.read(iprot);
- struct.operands.add(_elem100);
+ _elem90 = new Expression();
+ _elem90.read(iprot);
+ struct.operands.add(_elem90);
}
}
struct.setOperandsIsSet(true);
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/Identifier.java b/pinot-common/src/main/java/org/apache/pinot/common/request/Identifier.java
index a85ef75080a..78dcab1c6f6 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/Identifier.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/Identifier.java
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class Identifier implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Identifier");
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 28ec30fc46f..89124c41e27 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
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class InstanceRequest implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("InstanceRequest");
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/Join.java b/pinot-common/src/main/java/org/apache/pinot/common/request/Join.java
index 6479785cd76..bf0545f9b67 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/Join.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/Join.java
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class Join implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Join");
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/JoinType.java b/pinot-common/src/main/java/org/apache/pinot/common/request/JoinType.java
index 0b1e6aec500..a8ffdd3e890 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/JoinType.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/JoinType.java
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public enum JoinType implements org.apache.thrift.TEnum {
INNER(0),
LEFT(1),
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/Literal.java b/pinot-common/src/main/java/org/apache/pinot/common/request/Literal.java
index 2070e0fa68c..ec5b6ad766b 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/Literal.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/Literal.java
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class Literal extends org.apache.thrift.TUnion {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("Literal");
private static final org.apache.thrift.protocol.TField BOOL_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("boolValue", org.apache.thrift.protocol.TType.BOOL, (short)1);
@@ -514,13 +514,13 @@ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TP
if (field.type == INT_ARRAY_VALUE_FIELD_DESC.type) {
java.util.List intArrayValue;
{
- org.apache.thrift.protocol.TList _list54 = iprot.readListBegin();
- intArrayValue = new java.util.ArrayList(_list54.size);
- int _elem55;
- for (int _i56 = 0; _i56 < _list54.size; ++_i56)
+ org.apache.thrift.protocol.TList _list44 = iprot.readListBegin();
+ intArrayValue = new java.util.ArrayList(_list44.size);
+ int _elem45;
+ for (int _i46 = 0; _i46 < _list44.size; ++_i46)
{
- _elem55 = iprot.readI32();
- intArrayValue.add(_elem55);
+ _elem45 = iprot.readI32();
+ intArrayValue.add(_elem45);
}
iprot.readListEnd();
}
@@ -533,13 +533,13 @@ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TP
if (field.type == LONG_ARRAY_VALUE_FIELD_DESC.type) {
java.util.List longArrayValue;
{
- org.apache.thrift.protocol.TList _list57 = iprot.readListBegin();
- longArrayValue = new java.util.ArrayList(_list57.size);
- long _elem58;
- for (int _i59 = 0; _i59 < _list57.size; ++_i59)
+ org.apache.thrift.protocol.TList _list47 = iprot.readListBegin();
+ longArrayValue = new java.util.ArrayList(_list47.size);
+ long _elem48;
+ for (int _i49 = 0; _i49 < _list47.size; ++_i49)
{
- _elem58 = iprot.readI64();
- longArrayValue.add(_elem58);
+ _elem48 = iprot.readI64();
+ longArrayValue.add(_elem48);
}
iprot.readListEnd();
}
@@ -552,13 +552,13 @@ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TP
if (field.type == FLOAT_ARRAY_VALUE_FIELD_DESC.type) {
java.util.List floatArrayValue;
{
- org.apache.thrift.protocol.TList _list60 = iprot.readListBegin();
- floatArrayValue = new java.util.ArrayList(_list60.size);
- int _elem61;
- for (int _i62 = 0; _i62 < _list60.size; ++_i62)
+ org.apache.thrift.protocol.TList _list50 = iprot.readListBegin();
+ floatArrayValue = new java.util.ArrayList(_list50.size);
+ int _elem51;
+ for (int _i52 = 0; _i52 < _list50.size; ++_i52)
{
- _elem61 = iprot.readI32();
- floatArrayValue.add(_elem61);
+ _elem51 = iprot.readI32();
+ floatArrayValue.add(_elem51);
}
iprot.readListEnd();
}
@@ -571,13 +571,13 @@ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TP
if (field.type == DOUBLE_ARRAY_VALUE_FIELD_DESC.type) {
java.util.List doubleArrayValue;
{
- org.apache.thrift.protocol.TList _list63 = iprot.readListBegin();
- doubleArrayValue = new java.util.ArrayList(_list63.size);
- double _elem64;
- for (int _i65 = 0; _i65 < _list63.size; ++_i65)
+ org.apache.thrift.protocol.TList _list53 = iprot.readListBegin();
+ doubleArrayValue = new java.util.ArrayList(_list53.size);
+ double _elem54;
+ for (int _i55 = 0; _i55 < _list53.size; ++_i55)
{
- _elem64 = iprot.readDouble();
- doubleArrayValue.add(_elem64);
+ _elem54 = iprot.readDouble();
+ doubleArrayValue.add(_elem54);
}
iprot.readListEnd();
}
@@ -590,13 +590,13 @@ protected java.lang.Object standardSchemeReadValue(org.apache.thrift.protocol.TP
if (field.type == STRING_ARRAY_VALUE_FIELD_DESC.type) {
java.util.List stringArrayValue;
{
- org.apache.thrift.protocol.TList _list66 = iprot.readListBegin();
- stringArrayValue = new java.util.ArrayList(_list66.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _elem67;
- for (int _i68 = 0; _i68 < _list66.size; ++_i68)
+ org.apache.thrift.protocol.TList _list56 = iprot.readListBegin();
+ stringArrayValue = new java.util.ArrayList(_list56.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem57;
+ for (int _i58 = 0; _i58 < _list56.size; ++_i58)
{
- _elem67 = iprot.readString();
- stringArrayValue.add(_elem67);
+ _elem57 = iprot.readString();
+ stringArrayValue.add(_elem57);
}
iprot.readListEnd();
}
@@ -665,9 +665,9 @@ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol opr
java.util.List intArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, intArrayValue.size()));
- for (int _iter69 : intArrayValue)
+ for (int _iter59 : intArrayValue)
{
- oprot.writeI32(_iter69);
+ oprot.writeI32(_iter59);
}
oprot.writeListEnd();
}
@@ -676,9 +676,9 @@ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol opr
java.util.List longArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, longArrayValue.size()));
- for (long _iter70 : longArrayValue)
+ for (long _iter60 : longArrayValue)
{
- oprot.writeI64(_iter70);
+ oprot.writeI64(_iter60);
}
oprot.writeListEnd();
}
@@ -687,9 +687,9 @@ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol opr
java.util.List floatArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, floatArrayValue.size()));
- for (int _iter71 : floatArrayValue)
+ for (int _iter61 : floatArrayValue)
{
- oprot.writeI32(_iter71);
+ oprot.writeI32(_iter61);
}
oprot.writeListEnd();
}
@@ -698,9 +698,9 @@ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol opr
java.util.List doubleArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, doubleArrayValue.size()));
- for (double _iter72 : doubleArrayValue)
+ for (double _iter62 : doubleArrayValue)
{
- oprot.writeDouble(_iter72);
+ oprot.writeDouble(_iter62);
}
oprot.writeListEnd();
}
@@ -709,9 +709,9 @@ protected void standardSchemeWriteValue(org.apache.thrift.protocol.TProtocol opr
java.util.List stringArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, stringArrayValue.size()));
- for (java.lang.String _iter73 : stringArrayValue)
+ for (java.lang.String _iter63 : stringArrayValue)
{
- oprot.writeString(_iter73);
+ oprot.writeString(_iter63);
}
oprot.writeListEnd();
}
@@ -773,13 +773,13 @@ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProt
case INT_ARRAY_VALUE:
java.util.List intArrayValue;
{
- org.apache.thrift.protocol.TList _list74 = iprot.readListBegin();
- intArrayValue = new java.util.ArrayList(_list74.size);
- int _elem75;
- for (int _i76 = 0; _i76 < _list74.size; ++_i76)
+ org.apache.thrift.protocol.TList _list64 = iprot.readListBegin();
+ intArrayValue = new java.util.ArrayList(_list64.size);
+ int _elem65;
+ for (int _i66 = 0; _i66 < _list64.size; ++_i66)
{
- _elem75 = iprot.readI32();
- intArrayValue.add(_elem75);
+ _elem65 = iprot.readI32();
+ intArrayValue.add(_elem65);
}
iprot.readListEnd();
}
@@ -787,13 +787,13 @@ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProt
case LONG_ARRAY_VALUE:
java.util.List longArrayValue;
{
- org.apache.thrift.protocol.TList _list77 = iprot.readListBegin();
- longArrayValue = new java.util.ArrayList(_list77.size);
- long _elem78;
- for (int _i79 = 0; _i79 < _list77.size; ++_i79)
+ org.apache.thrift.protocol.TList _list67 = iprot.readListBegin();
+ longArrayValue = new java.util.ArrayList(_list67.size);
+ long _elem68;
+ for (int _i69 = 0; _i69 < _list67.size; ++_i69)
{
- _elem78 = iprot.readI64();
- longArrayValue.add(_elem78);
+ _elem68 = iprot.readI64();
+ longArrayValue.add(_elem68);
}
iprot.readListEnd();
}
@@ -801,13 +801,13 @@ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProt
case FLOAT_ARRAY_VALUE:
java.util.List floatArrayValue;
{
- org.apache.thrift.protocol.TList _list80 = iprot.readListBegin();
- floatArrayValue = new java.util.ArrayList(_list80.size);
- int _elem81;
- for (int _i82 = 0; _i82 < _list80.size; ++_i82)
+ org.apache.thrift.protocol.TList _list70 = iprot.readListBegin();
+ floatArrayValue = new java.util.ArrayList(_list70.size);
+ int _elem71;
+ for (int _i72 = 0; _i72 < _list70.size; ++_i72)
{
- _elem81 = iprot.readI32();
- floatArrayValue.add(_elem81);
+ _elem71 = iprot.readI32();
+ floatArrayValue.add(_elem71);
}
iprot.readListEnd();
}
@@ -815,13 +815,13 @@ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProt
case DOUBLE_ARRAY_VALUE:
java.util.List doubleArrayValue;
{
- org.apache.thrift.protocol.TList _list83 = iprot.readListBegin();
- doubleArrayValue = new java.util.ArrayList(_list83.size);
- double _elem84;
- for (int _i85 = 0; _i85 < _list83.size; ++_i85)
+ org.apache.thrift.protocol.TList _list73 = iprot.readListBegin();
+ doubleArrayValue = new java.util.ArrayList(_list73.size);
+ double _elem74;
+ for (int _i75 = 0; _i75 < _list73.size; ++_i75)
{
- _elem84 = iprot.readDouble();
- doubleArrayValue.add(_elem84);
+ _elem74 = iprot.readDouble();
+ doubleArrayValue.add(_elem74);
}
iprot.readListEnd();
}
@@ -829,13 +829,13 @@ protected java.lang.Object tupleSchemeReadValue(org.apache.thrift.protocol.TProt
case STRING_ARRAY_VALUE:
java.util.List stringArrayValue;
{
- org.apache.thrift.protocol.TList _list86 = iprot.readListBegin();
- stringArrayValue = new java.util.ArrayList(_list86.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _elem87;
- for (int _i88 = 0; _i88 < _list86.size; ++_i88)
+ org.apache.thrift.protocol.TList _list76 = iprot.readListBegin();
+ stringArrayValue = new java.util.ArrayList(_list76.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _elem77;
+ for (int _i78 = 0; _i78 < _list76.size; ++_i78)
{
- _elem87 = iprot.readString();
- stringArrayValue.add(_elem87);
+ _elem77 = iprot.readString();
+ stringArrayValue.add(_elem77);
}
iprot.readListEnd();
}
@@ -899,9 +899,9 @@ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot)
java.util.List intArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, intArrayValue.size()));
- for (int _iter89 : intArrayValue)
+ for (int _iter79 : intArrayValue)
{
- oprot.writeI32(_iter89);
+ oprot.writeI32(_iter79);
}
oprot.writeListEnd();
}
@@ -910,9 +910,9 @@ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot)
java.util.List longArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I64, longArrayValue.size()));
- for (long _iter90 : longArrayValue)
+ for (long _iter80 : longArrayValue)
{
- oprot.writeI64(_iter90);
+ oprot.writeI64(_iter80);
}
oprot.writeListEnd();
}
@@ -921,9 +921,9 @@ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot)
java.util.List floatArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.I32, floatArrayValue.size()));
- for (int _iter91 : floatArrayValue)
+ for (int _iter81 : floatArrayValue)
{
- oprot.writeI32(_iter91);
+ oprot.writeI32(_iter81);
}
oprot.writeListEnd();
}
@@ -932,9 +932,9 @@ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot)
java.util.List doubleArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, doubleArrayValue.size()));
- for (double _iter92 : doubleArrayValue)
+ for (double _iter82 : doubleArrayValue)
{
- oprot.writeDouble(_iter92);
+ oprot.writeDouble(_iter82);
}
oprot.writeListEnd();
}
@@ -943,9 +943,9 @@ protected void tupleSchemeWriteValue(org.apache.thrift.protocol.TProtocol oprot)
java.util.List stringArrayValue = (java.util.List)value_;
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRING, stringArrayValue.size()));
- for (java.lang.String _iter93 : stringArrayValue)
+ for (java.lang.String _iter83 : stringArrayValue)
{
- oprot.writeString(_iter93);
+ oprot.writeString(_iter83);
}
oprot.writeListEnd();
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/request/PinotQuery.java b/pinot-common/src/main/java/org/apache/pinot/common/request/PinotQuery.java
index 1ee367d30fc..2afb5abbf27 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/request/PinotQuery.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/request/PinotQuery.java
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class PinotQuery implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("PinotQuery");
@@ -38,7 +38,6 @@ public class PinotQuery implements org.apache.thrift.TBase debugOptions; // optional
private @org.apache.thrift.annotation.Nullable java.util.Map queryOptions; // optional
private boolean explain; // optional
private @org.apache.thrift.annotation.Nullable java.util.Map expressionOverrideHints; // optional
@@ -71,7 +69,6 @@ public enum _Fields implements org.apache.thrift.TFieldIdEnum {
HAVING_EXPRESSION((short)7, "havingExpression"),
LIMIT((short)8, "limit"),
OFFSET((short)9, "offset"),
- DEBUG_OPTIONS((short)10, "debugOptions"),
QUERY_OPTIONS((short)11, "queryOptions"),
EXPLAIN((short)12, "explain"),
EXPRESSION_OVERRIDE_HINTS((short)13, "expressionOverrideHints");
@@ -108,8 +105,6 @@ public static _Fields findByThriftId(int fieldId) {
return LIMIT;
case 9: // OFFSET
return OFFSET;
- case 10: // DEBUG_OPTIONS
- return DEBUG_OPTIONS;
case 11: // QUERY_OPTIONS
return QUERY_OPTIONS;
case 12: // EXPLAIN
@@ -162,7 +157,7 @@ public java.lang.String getFieldName() {
private static final int __OFFSET_ISSET_ID = 2;
private static final int __EXPLAIN_ISSET_ID = 3;
private byte __isset_bitfield = 0;
- private static final _Fields optionals[] = {_Fields.VERSION,_Fields.DATA_SOURCE,_Fields.SELECT_LIST,_Fields.FILTER_EXPRESSION,_Fields.GROUP_BY_LIST,_Fields.ORDER_BY_LIST,_Fields.HAVING_EXPRESSION,_Fields.LIMIT,_Fields.OFFSET,_Fields.DEBUG_OPTIONS,_Fields.QUERY_OPTIONS,_Fields.EXPLAIN,_Fields.EXPRESSION_OVERRIDE_HINTS};
+ private static final _Fields optionals[] = {_Fields.VERSION,_Fields.DATA_SOURCE,_Fields.SELECT_LIST,_Fields.FILTER_EXPRESSION,_Fields.GROUP_BY_LIST,_Fields.ORDER_BY_LIST,_Fields.HAVING_EXPRESSION,_Fields.LIMIT,_Fields.OFFSET,_Fields.QUERY_OPTIONS,_Fields.EXPLAIN,_Fields.EXPRESSION_OVERRIDE_HINTS};
public static final java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap;
static {
java.util.Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new java.util.EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class);
@@ -187,10 +182,6 @@ public java.lang.String getFieldName() {
new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.I32)));
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.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),
@@ -250,10 +241,6 @@ public PinotQuery(PinotQuery other) {
}
this.limit = other.limit;
this.offset = other.offset;
- if (other.isSetDebugOptions()) {
- java.util.Map __this__debugOptions = new java.util.HashMap(other.debugOptions);
- this.debugOptions = __this__debugOptions;
- }
if (other.isSetQueryOptions()) {
java.util.Map __this__queryOptions = new java.util.HashMap(other.queryOptions);
this.queryOptions = __this__queryOptions;
@@ -294,7 +281,6 @@ public void clear() {
this.offset = 0;
- this.debugOptions = null;
this.queryOptions = null;
setExplainIsSet(false);
this.explain = false;
@@ -559,41 +545,6 @@ public void setOffsetIsSet(boolean value) {
__isset_bitfield = org.apache.thrift.EncodingUtils.setBit(__isset_bitfield, __OFFSET_ISSET_ID, value);
}
- public int getDebugOptionsSize() {
- return (this.debugOptions == null) ? 0 : this.debugOptions.size();
- }
-
- public void putToDebugOptions(java.lang.String key, java.lang.String val) {
- if (this.debugOptions == null) {
- this.debugOptions = new java.util.HashMap();
- }
- this.debugOptions.put(key, val);
- }
-
- @org.apache.thrift.annotation.Nullable
- public java.util.Map getDebugOptions() {
- return this.debugOptions;
- }
-
- public void setDebugOptions(@org.apache.thrift.annotation.Nullable java.util.Map debugOptions) {
- this.debugOptions = debugOptions;
- }
-
- public void unsetDebugOptions() {
- this.debugOptions = null;
- }
-
- /** Returns true if field debugOptions is set (has been assigned a value) and false otherwise */
- public boolean isSetDebugOptions() {
- return this.debugOptions != null;
- }
-
- public void setDebugOptionsIsSet(boolean value) {
- if (!value) {
- this.debugOptions = null;
- }
- }
-
public int getQueryOptionsSize() {
return (this.queryOptions == null) ? 0 : this.queryOptions.size();
}
@@ -760,14 +711,6 @@ public void setFieldValue(_Fields field, @org.apache.thrift.annotation.Nullable
}
break;
- case DEBUG_OPTIONS:
- if (value == null) {
- unsetDebugOptions();
- } else {
- setDebugOptions((java.util.Map)value);
- }
- break;
-
case QUERY_OPTIONS:
if (value == null) {
unsetQueryOptions();
@@ -825,9 +768,6 @@ public java.lang.Object getFieldValue(_Fields field) {
case OFFSET:
return getOffset();
- case DEBUG_OPTIONS:
- return getDebugOptions();
-
case QUERY_OPTIONS:
return getQueryOptions();
@@ -866,8 +806,6 @@ public boolean isSet(_Fields field) {
return isSetLimit();
case OFFSET:
return isSetOffset();
- case DEBUG_OPTIONS:
- return isSetDebugOptions();
case QUERY_OPTIONS:
return isSetQueryOptions();
case EXPLAIN:
@@ -972,15 +910,6 @@ public boolean equals(PinotQuery that) {
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))
- return false;
- 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) {
@@ -1051,10 +980,6 @@ public int hashCode() {
if (isSetOffset())
hashCode = hashCode * 8191 + offset;
- hashCode = hashCode * 8191 + ((isSetDebugOptions()) ? 131071 : 524287);
- if (isSetDebugOptions())
- hashCode = hashCode * 8191 + debugOptions.hashCode();
-
hashCode = hashCode * 8191 + ((isSetQueryOptions()) ? 131071 : 524287);
if (isSetQueryOptions())
hashCode = hashCode * 8191 + queryOptions.hashCode();
@@ -1168,16 +1093,6 @@ public int compareTo(PinotQuery other) {
return lastComparison;
}
}
- lastComparison = java.lang.Boolean.compare(isSetDebugOptions(), other.isSetDebugOptions());
- if (lastComparison != 0) {
- return lastComparison;
- }
- if (isSetDebugOptions()) {
- lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.debugOptions, other.debugOptions);
- if (lastComparison != 0) {
- return lastComparison;
- }
- }
lastComparison = java.lang.Boolean.compare(isSetQueryOptions(), other.isSetQueryOptions());
if (lastComparison != 0) {
return lastComparison;
@@ -1306,16 +1221,6 @@ public java.lang.String toString() {
sb.append(this.offset);
first = false;
}
- if (isSetDebugOptions()) {
- if (!first) sb.append(", ");
- sb.append("debugOptions:");
- if (this.debugOptions == null) {
- sb.append("null");
- } else {
- sb.append(this.debugOptions);
- }
- first = false;
- }
if (isSetQueryOptions()) {
if (!first) sb.append(", ");
sb.append("queryOptions:");
@@ -1495,38 +1400,18 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PinotQuery struct)
org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type);
}
break;
- case 10: // DEBUG_OPTIONS
+ case 11: // QUERY_OPTIONS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
org.apache.thrift.protocol.TMap _map9 = iprot.readMapBegin();
- struct.debugOptions = new java.util.HashMap(2*_map9.size);
+ struct.queryOptions = new java.util.HashMap(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.debugOptions.put(_key10, _val11);
- }
- iprot.readMapEnd();
- }
- struct.setDebugOptionsIsSet(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 _map13 = iprot.readMapBegin();
- struct.queryOptions = new java.util.HashMap(2*_map13.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _key14;
- @org.apache.thrift.annotation.Nullable java.lang.String _val15;
- for (int _i16 = 0; _i16 < _map13.size; ++_i16)
- {
- _key14 = iprot.readString();
- _val15 = iprot.readString();
- struct.queryOptions.put(_key14, _val15);
+ struct.queryOptions.put(_key10, _val11);
}
iprot.readMapEnd();
}
@@ -1546,17 +1431,17 @@ public void read(org.apache.thrift.protocol.TProtocol iprot, PinotQuery struct)
case 13: // EXPRESSION_OVERRIDE_HINTS
if (schemeField.type == org.apache.thrift.protocol.TType.MAP) {
{
- org.apache.thrift.protocol.TMap _map17 = iprot.readMapBegin();
- struct.expressionOverrideHints = new java.util.HashMap(2*_map17.size);
- @org.apache.thrift.annotation.Nullable Expression _key18;
- @org.apache.thrift.annotation.Nullable Expression _val19;
- for (int _i20 = 0; _i20 < _map17.size; ++_i20)
+ org.apache.thrift.protocol.TMap _map13 = iprot.readMapBegin();
+ struct.expressionOverrideHints = new java.util.HashMap(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)
{
- _key18 = new Expression();
- _key18.read(iprot);
- _val19 = new Expression();
- _val19.read(iprot);
- struct.expressionOverrideHints.put(_key18, _val19);
+ _key14 = new Expression();
+ _key14.read(iprot);
+ _val15 = new Expression();
+ _val15.read(iprot);
+ struct.expressionOverrideHints.put(_key14, _val15);
}
iprot.readMapEnd();
}
@@ -1595,9 +1480,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, PinotQuery struct)
oprot.writeFieldBegin(SELECT_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.selectList.size()));
- for (Expression _iter21 : struct.selectList)
+ for (Expression _iter17 : struct.selectList)
{
- _iter21.write(oprot);
+ _iter17.write(oprot);
}
oprot.writeListEnd();
}
@@ -1616,9 +1501,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, PinotQuery struct)
oprot.writeFieldBegin(GROUP_BY_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.groupByList.size()));
- for (Expression _iter22 : struct.groupByList)
+ for (Expression _iter18 : struct.groupByList)
{
- _iter22.write(oprot);
+ _iter18.write(oprot);
}
oprot.writeListEnd();
}
@@ -1630,9 +1515,9 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, PinotQuery struct)
oprot.writeFieldBegin(ORDER_BY_LIST_FIELD_DESC);
{
oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.orderByList.size()));
- for (Expression _iter23 : struct.orderByList)
+ for (Expression _iter19 : struct.orderByList)
{
- _iter23.write(oprot);
+ _iter19.write(oprot);
}
oprot.writeListEnd();
}
@@ -1656,30 +1541,15 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, PinotQuery struct)
oprot.writeI32(struct.offset);
oprot.writeFieldEnd();
}
- if (struct.debugOptions != null) {
- 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 (java.util.Map.Entry _iter24 : struct.debugOptions.entrySet())
- {
- oprot.writeString(_iter24.getKey());
- oprot.writeString(_iter24.getValue());
- }
- oprot.writeMapEnd();
- }
- oprot.writeFieldEnd();
- }
- }
if (struct.queryOptions != null) {
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 (java.util.Map.Entry _iter25 : struct.queryOptions.entrySet())
+ for (java.util.Map.Entry _iter20 : struct.queryOptions.entrySet())
{
- oprot.writeString(_iter25.getKey());
- oprot.writeString(_iter25.getValue());
+ oprot.writeString(_iter20.getKey());
+ oprot.writeString(_iter20.getValue());
}
oprot.writeMapEnd();
}
@@ -1696,10 +1566,10 @@ public void write(org.apache.thrift.protocol.TProtocol oprot, PinotQuery struct)
oprot.writeFieldBegin(EXPRESSION_OVERRIDE_HINTS_FIELD_DESC);
{
oprot.writeMapBegin(new org.apache.thrift.protocol.TMap(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT, struct.expressionOverrideHints.size()));
- for (java.util.Map.Entry _iter26 : struct.expressionOverrideHints.entrySet())
+ for (java.util.Map.Entry _iter21 : struct.expressionOverrideHints.entrySet())
{
- _iter26.getKey().write(oprot);
- _iter26.getValue().write(oprot);
+ _iter21.getKey().write(oprot);
+ _iter21.getValue().write(oprot);
}
oprot.writeMapEnd();
}
@@ -1751,19 +1621,16 @@ public void write(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct)
if (struct.isSetOffset()) {
optionals.set(8);
}
- if (struct.isSetDebugOptions()) {
- optionals.set(9);
- }
if (struct.isSetQueryOptions()) {
- optionals.set(10);
+ optionals.set(9);
}
if (struct.isSetExplain()) {
- optionals.set(11);
+ optionals.set(10);
}
if (struct.isSetExpressionOverrideHints()) {
- optionals.set(12);
+ optionals.set(11);
}
- oprot.writeBitSet(optionals, 13);
+ oprot.writeBitSet(optionals, 12);
if (struct.isSetVersion()) {
oprot.writeI32(struct.version);
}
@@ -1773,9 +1640,9 @@ public void write(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct)
if (struct.isSetSelectList()) {
{
oprot.writeI32(struct.selectList.size());
- for (Expression _iter27 : struct.selectList)
+ for (Expression _iter22 : struct.selectList)
{
- _iter27.write(oprot);
+ _iter22.write(oprot);
}
}
}
@@ -1785,18 +1652,18 @@ public void write(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct)
if (struct.isSetGroupByList()) {
{
oprot.writeI32(struct.groupByList.size());
- for (Expression _iter28 : struct.groupByList)
+ for (Expression _iter23 : struct.groupByList)
{
- _iter28.write(oprot);
+ _iter23.write(oprot);
}
}
}
if (struct.isSetOrderByList()) {
{
oprot.writeI32(struct.orderByList.size());
- for (Expression _iter29 : struct.orderByList)
+ for (Expression _iter24 : struct.orderByList)
{
- _iter29.write(oprot);
+ _iter24.write(oprot);
}
}
}
@@ -1809,23 +1676,13 @@ public void write(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct)
if (struct.isSetOffset()) {
oprot.writeI32(struct.offset);
}
- if (struct.isSetDebugOptions()) {
- {
- oprot.writeI32(struct.debugOptions.size());
- for (java.util.Map.Entry _iter30 : struct.debugOptions.entrySet())
- {
- oprot.writeString(_iter30.getKey());
- oprot.writeString(_iter30.getValue());
- }
- }
- }
if (struct.isSetQueryOptions()) {
{
oprot.writeI32(struct.queryOptions.size());
- for (java.util.Map.Entry _iter31 : struct.queryOptions.entrySet())
+ for (java.util.Map.Entry _iter25 : struct.queryOptions.entrySet())
{
- oprot.writeString(_iter31.getKey());
- oprot.writeString(_iter31.getValue());
+ oprot.writeString(_iter25.getKey());
+ oprot.writeString(_iter25.getValue());
}
}
}
@@ -1835,10 +1692,10 @@ public void write(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct)
if (struct.isSetExpressionOverrideHints()) {
{
oprot.writeI32(struct.expressionOverrideHints.size());
- for (java.util.Map.Entry _iter32 : struct.expressionOverrideHints.entrySet())
+ for (java.util.Map.Entry _iter26 : struct.expressionOverrideHints.entrySet())
{
- _iter32.getKey().write(oprot);
- _iter32.getValue().write(oprot);
+ _iter26.getKey().write(oprot);
+ _iter26.getValue().write(oprot);
}
}
}
@@ -1847,7 +1704,7 @@ public void write(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct)
@Override
public void read(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct) throws org.apache.thrift.TException {
org.apache.thrift.protocol.TTupleProtocol iprot = (org.apache.thrift.protocol.TTupleProtocol) prot;
- java.util.BitSet incoming = iprot.readBitSet(13);
+ java.util.BitSet incoming = iprot.readBitSet(12);
if (incoming.get(0)) {
struct.version = iprot.readI32();
struct.setVersionIsSet(true);
@@ -1859,14 +1716,14 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct) t
}
if (incoming.get(2)) {
{
- org.apache.thrift.protocol.TList _list33 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
- struct.selectList = new java.util.ArrayList(_list33.size);
- @org.apache.thrift.annotation.Nullable Expression _elem34;
- for (int _i35 = 0; _i35 < _list33.size; ++_i35)
+ org.apache.thrift.protocol.TList _list27 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.selectList = new java.util.ArrayList(_list27.size);
+ @org.apache.thrift.annotation.Nullable Expression _elem28;
+ for (int _i29 = 0; _i29 < _list27.size; ++_i29)
{
- _elem34 = new Expression();
- _elem34.read(iprot);
- struct.selectList.add(_elem34);
+ _elem28 = new Expression();
+ _elem28.read(iprot);
+ struct.selectList.add(_elem28);
}
}
struct.setSelectListIsSet(true);
@@ -1878,28 +1735,28 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct) t
}
if (incoming.get(4)) {
{
- org.apache.thrift.protocol.TList _list36 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
- struct.groupByList = new java.util.ArrayList(_list36.size);
- @org.apache.thrift.annotation.Nullable Expression _elem37;
- for (int _i38 = 0; _i38 < _list36.size; ++_i38)
+ org.apache.thrift.protocol.TList _list30 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.groupByList = new java.util.ArrayList(_list30.size);
+ @org.apache.thrift.annotation.Nullable Expression _elem31;
+ for (int _i32 = 0; _i32 < _list30.size; ++_i32)
{
- _elem37 = new Expression();
- _elem37.read(iprot);
- struct.groupByList.add(_elem37);
+ _elem31 = new Expression();
+ _elem31.read(iprot);
+ struct.groupByList.add(_elem31);
}
}
struct.setGroupByListIsSet(true);
}
if (incoming.get(5)) {
{
- org.apache.thrift.protocol.TList _list39 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
- struct.orderByList = new java.util.ArrayList(_list39.size);
- @org.apache.thrift.annotation.Nullable Expression _elem40;
- for (int _i41 = 0; _i41 < _list39.size; ++_i41)
+ org.apache.thrift.protocol.TList _list33 = iprot.readListBegin(org.apache.thrift.protocol.TType.STRUCT);
+ struct.orderByList = new java.util.ArrayList(_list33.size);
+ @org.apache.thrift.annotation.Nullable Expression _elem34;
+ for (int _i35 = 0; _i35 < _list33.size; ++_i35)
{
- _elem40 = new Expression();
- _elem40.read(iprot);
- struct.orderByList.add(_elem40);
+ _elem34 = new Expression();
+ _elem34.read(iprot);
+ struct.orderByList.add(_elem34);
}
}
struct.setOrderByListIsSet(true);
@@ -1919,51 +1776,36 @@ public void read(org.apache.thrift.protocol.TProtocol prot, PinotQuery struct) t
}
if (incoming.get(9)) {
{
- org.apache.thrift.protocol.TMap _map42 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
- struct.debugOptions = new java.util.HashMap(2*_map42.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _key43;
- @org.apache.thrift.annotation.Nullable java.lang.String _val44;
- for (int _i45 = 0; _i45 < _map42.size; ++_i45)
- {
- _key43 = iprot.readString();
- _val44 = iprot.readString();
- struct.debugOptions.put(_key43, _val44);
- }
- }
- struct.setDebugOptionsIsSet(true);
- }
- if (incoming.get(10)) {
- {
- org.apache.thrift.protocol.TMap _map46 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
- struct.queryOptions = new java.util.HashMap(2*_map46.size);
- @org.apache.thrift.annotation.Nullable java.lang.String _key47;
- @org.apache.thrift.annotation.Nullable java.lang.String _val48;
- for (int _i49 = 0; _i49 < _map46.size; ++_i49)
+ org.apache.thrift.protocol.TMap _map36 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRING, org.apache.thrift.protocol.TType.STRING);
+ struct.queryOptions = new java.util.HashMap(2*_map36.size);
+ @org.apache.thrift.annotation.Nullable java.lang.String _key37;
+ @org.apache.thrift.annotation.Nullable java.lang.String _val38;
+ for (int _i39 = 0; _i39 < _map36.size; ++_i39)
{
- _key47 = iprot.readString();
- _val48 = iprot.readString();
- struct.queryOptions.put(_key47, _val48);
+ _key37 = iprot.readString();
+ _val38 = iprot.readString();
+ struct.queryOptions.put(_key37, _val38);
}
}
struct.setQueryOptionsIsSet(true);
}
- if (incoming.get(11)) {
+ if (incoming.get(10)) {
struct.explain = iprot.readBool();
struct.setExplainIsSet(true);
}
- if (incoming.get(12)) {
+ if (incoming.get(11)) {
{
- org.apache.thrift.protocol.TMap _map50 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT);
- struct.expressionOverrideHints = new java.util.HashMap(2*_map50.size);
- @org.apache.thrift.annotation.Nullable Expression _key51;
- @org.apache.thrift.annotation.Nullable Expression _val52;
- for (int _i53 = 0; _i53 < _map50.size; ++_i53)
+ org.apache.thrift.protocol.TMap _map40 = iprot.readMapBegin(org.apache.thrift.protocol.TType.STRUCT, org.apache.thrift.protocol.TType.STRUCT);
+ struct.expressionOverrideHints = new java.util.HashMap(2*_map40.size);
+ @org.apache.thrift.annotation.Nullable Expression _key41;
+ @org.apache.thrift.annotation.Nullable Expression _val42;
+ for (int _i43 = 0; _i43 < _map40.size; ++_i43)
{
- _key51 = new Expression();
- _key51.read(iprot);
- _val52 = new Expression();
- _val52.read(iprot);
- struct.expressionOverrideHints.put(_key51, _val52);
+ _key41 = new Expression();
+ _key41.read(iprot);
+ _val42 = new Expression();
+ _val42.read(iprot);
+ struct.expressionOverrideHints.put(_key41, _val42);
}
}
struct.setExpressionOverrideHintsIsSet(true);
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 2ad89658793..594a255b840 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
@@ -25,7 +25,7 @@
package org.apache.pinot.common.request;
@SuppressWarnings({"cast", "rawtypes", "serial", "unchecked", "unused"})
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class QuerySource implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("QuerySource");
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 a7c7df7e735..263b074acdf 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
@@ -29,7 +29,7 @@
* Processing exception
*
*/
-@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2023-12-07")
+@javax.annotation.Generated(value = "Autogenerated by Thrift Compiler (0.15.0)", date = "2024-05-01")
public class ProcessingException extends org.apache.thrift.TException implements org.apache.thrift.TBase, java.io.Serializable, Cloneable, Comparable {
private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("ProcessingException");
diff --git a/pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java b/pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java
index f6818371a05..c99a56493db 100644
--- a/pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java
+++ b/pinot-common/src/main/java/org/apache/pinot/common/utils/request/RequestUtils.java
@@ -44,7 +44,7 @@
import org.apache.pinot.common.request.PinotQuery;
import org.apache.pinot.spi.utils.BigDecimalUtils;
import org.apache.pinot.spi.utils.BytesUtils;
-import org.apache.pinot.spi.utils.CommonConstants;
+import org.apache.pinot.spi.utils.CommonConstants.Broker.Request;
import org.apache.pinot.sql.FilterKind;
import org.apache.pinot.sql.parsers.CalciteSqlParser;
import org.apache.pinot.sql.parsers.SqlCompilationException;
@@ -80,33 +80,15 @@ public static SqlNodeAndOptions parseQuery(String query, JsonNode request)
@VisibleForTesting
public static void setOptions(SqlNodeAndOptions sqlNodeAndOptions, JsonNode jsonRequest) {
Map queryOptions = new HashMap<>();
- if (jsonRequest.has(CommonConstants.Broker.Request.DEBUG_OPTIONS)) {
- Map debugOptions = RequestUtils.getOptionsFromJson(jsonRequest,
- CommonConstants.Broker.Request.DEBUG_OPTIONS);
- // TODO: remove debug options after releasing 0.11.0.
- if (!debugOptions.isEmpty()) {
- // NOTE: Debug options are deprecated. Put all debug options into query options for backward compatibility.
- LOGGER.debug("Debug options are set to: {}", debugOptions);
- queryOptions.putAll(debugOptions);
- }
- }
- if (jsonRequest.has(CommonConstants.Broker.Request.QUERY_OPTIONS)) {
- Map queryOptionsFromJson = RequestUtils.getOptionsFromJson(jsonRequest,
- CommonConstants.Broker.Request.QUERY_OPTIONS);
- queryOptions.putAll(queryOptionsFromJson);
+ if (jsonRequest.has(Request.QUERY_OPTIONS)) {
+ queryOptions.putAll(getOptionsFromString(jsonRequest.get(Request.QUERY_OPTIONS).asText()));
}
- boolean enableTrace = jsonRequest.has(CommonConstants.Broker.Request.TRACE) && jsonRequest.get(
- CommonConstants.Broker.Request.TRACE).asBoolean();
- if (enableTrace) {
- queryOptions.put(CommonConstants.Broker.Request.TRACE, "true");
+ if (jsonRequest.has(Request.TRACE) && jsonRequest.get(Request.TRACE).asBoolean()) {
+ queryOptions.put(Request.TRACE, "true");
}
if (!queryOptions.isEmpty()) {
LOGGER.debug("Query options are set to: {}", queryOptions);
}
- // TODO: Remove the SQL query options after releasing 0.11.0
- // The query engine will break if these 2 options are missing during version upgrade.
- queryOptions.put(CommonConstants.Broker.Request.QueryOptionKey.GROUP_BY_MODE, CommonConstants.Broker.Request.SQL);
- queryOptions.put(CommonConstants.Broker.Request.QueryOptionKey.RESPONSE_FORMAT, CommonConstants.Broker.Request.SQL);
// Setting all query options back into SqlNodeAndOptions. The above ordering matters due to priority overwrite rule
sqlNodeAndOptions.setExtraOptions(queryOptions);
}
@@ -414,8 +396,7 @@ private static Set getTableNames(DataSource dataSource) {
if (dataSource.getSubquery() != null) {
return getTableNames(dataSource.getSubquery());
} else if (dataSource.isSetJoin()) {
- return ImmutableSet.builder()
- .addAll(getTableNames(dataSource.getJoin().getLeft()))
+ return ImmutableSet.builder().addAll(getTableNames(dataSource.getJoin().getLeft()))
.addAll(getTableNames(dataSource.getJoin().getLeft())).build();
}
return ImmutableSet.of(dataSource.getTableName());
@@ -425,6 +406,7 @@ public static Set getTableNames(PinotQuery pinotQuery) {
return getTableNames(pinotQuery.getDataSource());
}
+ @Deprecated
public static Map getOptionsFromJson(JsonNode request, String optionsKey) {
return getOptionsFromString(request.get(optionsKey).asText());
}
diff --git a/pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java b/pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
index 0787aacf9fe..86fdf760027 100644
--- a/pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
+++ b/pinot-common/src/main/java/org/apache/pinot/sql/parsers/CalciteSqlParser.java
@@ -162,14 +162,10 @@ public static PinotQuery compileToPinotQuery(String sql)
}
public static PinotQuery compileToPinotQuery(SqlNodeAndOptions sqlNodeAndOptions) {
- // Compile Sql without OPTION statements.
+ // Compile SqlNode into PinotQuery
PinotQuery pinotQuery = compileSqlNodeToPinotQuery(sqlNodeAndOptions.getSqlNode());
-
- // Set Option statements to PinotQuery.
- Map options = sqlNodeAndOptions.getOptions();
- if (!options.isEmpty()) {
- pinotQuery.setQueryOptions(options);
- }
+ // Set query options into PinotQuery
+ pinotQuery.setQueryOptions(sqlNodeAndOptions.getOptions());
return pinotQuery;
}
diff --git a/pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java b/pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java
index 574d6ad429d..253477a8f57 100644
--- a/pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java
+++ b/pinot-common/src/test/java/org/apache/pinot/sql/parsers/CalciteSqlCompilerTest.java
@@ -827,7 +827,7 @@ public void testCStyleInequalityOperator() {
public void testQueryOptions() {
PinotQuery pinotQuery = compileToPinotQuery("select * from vegetables where name <> 'Brussels sprouts'");
Assert.assertEquals(pinotQuery.getQueryOptionsSize(), 0);
- Assert.assertNull(pinotQuery.getQueryOptions());
+ Assert.assertTrue(pinotQuery.getQueryOptions().isEmpty());
pinotQuery =
compileToPinotQuery("select * from vegetables where name <> 'Brussels sprouts' OPTION (delicious=yes)");
@@ -863,7 +863,7 @@ public void testQueryOptions() {
public void testQuerySetOptions() {
PinotQuery pinotQuery = compileToPinotQuery("select * from vegetables where name <> 'Brussels sprouts'");
Assert.assertEquals(pinotQuery.getQueryOptionsSize(), 0);
- Assert.assertNull(pinotQuery.getQueryOptions());
+ Assert.assertTrue(pinotQuery.getQueryOptions().isEmpty());
pinotQuery = compileToPinotQuery("SET delicious='yes'; select * from vegetables where name <> 'Brussels sprouts'");
Assert.assertEquals(pinotQuery.getQueryOptionsSize(), 1);
@@ -3136,7 +3136,10 @@ public void testJoin() {
DataSource right = join.getRight();
Assert.assertEquals(right.getTableName(), "T2");
PinotQuery rightSubquery = right.getSubquery();
- Assert.assertEquals(rightSubquery, compileToPinotQuery("SELECT a, COUNT(*) AS b FROM T3 GROUP BY a"));
+ // NOTE: Subquery doesn't have query options
+ PinotQuery expected = compileToPinotQuery("SELECT a, COUNT(*) AS b FROM T3 GROUP BY a");
+ expected.setQueryOptions(null);
+ Assert.assertEquals(rightSubquery, expected);
Assert.assertEquals(join.getCondition(), compileToExpression("T1.key = T2.key"));
query = "SELECT T1.a, T2.b FROM T1 JOIN (SELECT key, COUNT(*) AS b FROM T3 JOIN T4 GROUP BY key) AS T2 "
@@ -3152,7 +3155,10 @@ public void testJoin() {
right = join.getRight();
Assert.assertEquals(right.getTableName(), "T2");
rightSubquery = right.getSubquery();
- Assert.assertEquals(rightSubquery, compileToPinotQuery("SELECT key, COUNT(*) AS b FROM T3 JOIN T4 GROUP BY key"));
+ // NOTE: Subquery doesn't have query options
+ expected = compileToPinotQuery("SELECT key, COUNT(*) AS b FROM T3 JOIN T4 GROUP BY key");
+ expected.setQueryOptions(null);
+ Assert.assertEquals(rightSubquery, expected);
Assert.assertEquals(join.getCondition(), compileToExpression("T1.key = T2.key"));
// test for self join queries.
@@ -3168,7 +3174,10 @@ public void testJoin() {
right = join.getRight();
Assert.assertEquals(right.getTableName(), "self");
rightSubquery = right.getSubquery();
- Assert.assertEquals(rightSubquery, compileToPinotQuery("SELECT key FROM T1"));
+ // NOTE: Subquery doesn't have query options
+ expected = compileToPinotQuery("SELECT key FROM T1");
+ expected.setQueryOptions(null);
+ Assert.assertEquals(rightSubquery, expected);
Assert.assertEquals(join.getCondition(), compileToExpression("T1.key = self.key"));
}
diff --git a/pinot-common/src/thrift/query.thrift b/pinot-common/src/thrift/query.thrift
index 8602a032aa7..7b896a31da1 100644
--- a/pinot-common/src/thrift/query.thrift
+++ b/pinot-common/src/thrift/query.thrift
@@ -28,7 +28,7 @@ struct PinotQuery {
7: optional Expression havingExpression;
8: optional i32 limit = 10;
9: optional i32 offset = 0;
- 10: optional map debugOptions;
+//10: optional map debugOptions;
11: optional map queryOptions;
12: optional bool explain;
13: optional map expressionOverrideHints;
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/QueryContext.java b/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/QueryContext.java
index 22e25eadf37..cd0ea147902 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/QueryContext.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/query/request/context/QueryContext.java
@@ -460,7 +460,6 @@ public static class Builder {
private int _limit;
private int _offset;
private Map _queryOptions;
- private Map _debugOptions;
private Map _expressionOverrideHints;
private boolean _explain;
diff --git a/pinot-core/src/main/java/org/apache/pinot/core/util/GapfillUtils.java b/pinot-core/src/main/java/org/apache/pinot/core/util/GapfillUtils.java
index bd39d347206..c353115dcf5 100644
--- a/pinot-core/src/main/java/org/apache/pinot/core/util/GapfillUtils.java
+++ b/pinot-core/src/main/java/org/apache/pinot/core/util/GapfillUtils.java
@@ -277,9 +277,8 @@ public static PinotQuery stripGapfill(PinotQuery pinotQuery) {
return pinotQuery;
}
- // Carry over the query and debug options from the original query
+ // Carry over the query options from the original query
Map queryOptions = pinotQuery.getQueryOptions();
- Map debugOptions = pinotQuery.getDebugOptions();
while (pinotQuery.getDataSource().getSubquery() != null) {
pinotQuery = pinotQuery.getDataSource().getSubquery();
@@ -321,7 +320,6 @@ public static PinotQuery stripGapfill(PinotQuery pinotQuery) {
}
strippedPinotQuery.setQueryOptions(queryOptions);
- strippedPinotQuery.setDebugOptions(debugOptions);
return strippedPinotQuery;
}
diff --git a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
index 24ea49cfa10..c86b1e14f79 100644
--- a/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
+++ b/pinot-spi/src/main/java/org/apache/pinot/spi/utils/CommonConstants.java
@@ -347,7 +347,6 @@ public static class Broker {
public static class Request {
public static final String SQL = "sql";
public static final String TRACE = "trace";
- public static final String DEBUG_OPTIONS = "debugOptions";
public static final String QUERY_OPTIONS = "queryOptions";
public static class QueryOptionKey {
@@ -397,14 +396,6 @@ public static class QueryOptionKey {
// Indicates the maximum length of serialized response across all servers for a query. This value is equally
// divided across all servers processing the query.
public static final String MAX_QUERY_RESPONSE_SIZE_BYTES = "maxQueryResponseSizeBytes";
-
- // TODO: Remove these keys (only apply to PQL) after releasing 0.11.0
- @Deprecated
- public static final String PRESERVE_TYPE = "preserveType";
- @Deprecated
- public static final String RESPONSE_FORMAT = "responseFormat";
- @Deprecated
- public static final String GROUP_BY_MODE = "groupByMode";
}
public static class QueryOptionValue {