kgyrtkirk commented on code in PR #17101:
URL: https://github.com/apache/druid/pull/17101#discussion_r1766377935


##########
sql/src/test/java/org/apache/druid/quidem/DruidQuidemCommandHandler.java:
##########
@@ -141,25 +156,21 @@ protected void executeExplain(Context x) throws Exception
     {
       DruidConnectionExtras connectionExtras = (DruidConnectionExtras) 
x.connection();
       ObjectMapper objectMapper = connectionExtras.getObjectMapper();
-      QueryLogHook qlh = new QueryLogHook(objectMapper);
-      qlh.logQueriesForGlobal(
-          () -> {
-            executeQuery(x);
-          }
-      );
-
-      List<Query<?>> queries = qlh.getRecordedQueries();
-
-      queries = queries
-          .stream()
-          .map(q -> BaseCalciteQueryTest.recursivelyClearContext(q, 
objectMapper))
-          .collect(Collectors.toList());
+      DruidHookDispatcher dhp = unwrapDruidHookDispatcher(x);

Review Comment:
   instead of adding a comment; I've extracted a method named 
`executeExplainCollectHookValues`;
   I think that too increased readability and also consolidated to do the same 
from 3 callsites



-- 
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]

Reply via email to