amrishlal commented on a change in pull request #7568:
URL: https://github.com/apache/pinot/pull/7568#discussion_r759008062
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/query/request/context/utils/QueryContextUtils.java
##########
@@ -52,4 +58,79 @@ public static boolean isDistinctQuery(QueryContext query) {
return aggregationFunctions != null && aggregationFunctions.length == 1
&& aggregationFunctions[0] instanceof DistinctAggregationFunction;
}
+
+ /** Collect aggregation functions (except for the ones in filter). */
+ public static void generateTransforms(QueryContext queryContext, Set<String>
postAggregations) {
Review comment:
Done.
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/operator/filter/EmptyFilterOperator.java
##########
@@ -26,10 +29,9 @@
* Singleton class which extends {@link BaseFilterOperator} that is empty,
i.e. does not match any document.
*/
public final class EmptyFilterOperator extends BaseFilterOperator {
- private EmptyFilterOperator() {
Review comment:
Fixed.
##########
File path:
pinot-core/src/main/java/org/apache/pinot/core/operator/BaseOperator.java
##########
@@ -52,4 +52,14 @@ public final T nextBlock() {
// Make it protected because we should always call nextBlock()
protected abstract T getNextBlock();
+
+ @Override
+ public String toExplainString() {
+ return getExplainPlanName();
+ }
+
+ @Override
+ public ExecutionStatistics getExecutionStatistics() {
Review comment:
Done.
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -519,6 +545,15 @@ private BrokerResponseNative handleSQLRequest(long
requestId, String query, Json
return brokerResponse;
}
+ /** Set EXPLAIN PLAN query to route to only one server. */
+ private void setRoutingToOneServer(Map<ServerInstance, List<String>>
routingTable) {
Review comment:
Done.
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -491,6 +504,19 @@ private BrokerResponseNative handleSQLRequest(long
requestId, String query, Json
// Execute the query
ServerStats serverStats = new ServerStats();
+ if (brokerRequest.getPinotQuery().isExplain()) {
Review comment:
Done
##########
File path:
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -106,6 +106,7 @@
private static final String IN_SUBQUERY = "inSubquery";
private static final Expression FALSE =
RequestUtils.getLiteralExpression(false);
private static final Expression TRUE =
RequestUtils.getLiteralExpression(true);
+ private static final BrokerResponseNative BROKER_ONLY_EXPLAIN_PLAN_OUTPUT =
getBrokerResponseExplainPlanOutput();
Review comment:
Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]