You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by GitBox <gi...@apache.org> on 2021/11/09 16:07:18 UTC

[GitHub] [pinot] siddharthteotia commented on a change in pull request #7568: EXPLAIN PLAN

siddharthteotia commented on a change in pull request #7568:
URL: https://github.com/apache/pinot/pull/7568#discussion_r745770403



##########
File path: pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseBrokerRequestHandler.java
##########
@@ -225,7 +225,16 @@ private BrokerResponseNative handleSQLRequest(long requestId, String query, Json
     if (isLiteralOnlyQuery(pinotQuery)) {
       LOGGER.debug("Request {} contains only Literal, skipping server query: {}", requestId, query);
       try {
-        return processLiteralOnlyQuery(pinotQuery, compilationStartTimeNs, requestStatistics);
+        BrokerResponseNative responseForLiteralOnly =
+            processLiteralOnlyQuery(pinotQuery, compilationStartTimeNs, requestStatistics);
+        if (pinotQuery.isExplain()) {
+          // Generate explain results to show that this is a SELECT on a literal value.
+          List<Object[]> rows = new ArrayList<>();
+          rows.add(new Object[]{"SELECT(selectList:literal)", 0, -1});

Review comment:
       Should we not use the actual literal ?




-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org