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



##########
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:
       I think we should avoid regenerating the original query within the 
output of EXPLAIN PLAN. Simply saying that the select list contained only 
literals should be enough since the user can look up and correlate the explain 
plan output with the actual query. In future though, it is quite possible that 
more details may need to be added, but for now it will be good idea to keep the 
output minimal.




-- 
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-unsubscr...@pinot.apache.org

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



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

Reply via email to