MeihanLi commented on code in PR #17177:
URL: https://github.com/apache/pinot/pull/17177#discussion_r2524723912


##########
pinot-broker/src/main/java/org/apache/pinot/broker/requesthandler/BaseSingleStageBrokerRequestHandler.java:
##########
@@ -329,6 +335,22 @@ protected BrokerResponse handleRequest(long requestId, 
String query, SqlNodeAndO
       throws Exception {
     _queryLogger.log(requestId, query);
 
+    String queryHash = "";
+    if (_enableQueryFingerprinting) {
+      try {
+        QueryFingerprint queryFingerprint = 
QueryFingerprintUtils.generateFingerprint(sqlNodeAndOptions);
+        if (queryFingerprint != null) {
+          requestContext.setQueryFingerprint(queryFingerprint);
+          if (queryFingerprint.getQueryHash() != null) {

Review Comment:
   We can remove the null checking on queryHash. Both queryHash or fingerprint 
are guaranteed to be non-null when queryFingerprint is not null.



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