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 2022/01/07 21:59:44 UTC

[GitHub] [pinot] joshigaurava commented on a change in pull request #7981: make query stats always show even there's error

joshigaurava commented on a change in pull request #7981:
URL: https://github.com/apache/pinot/pull/7981#discussion_r780552843



##########
File path: pinot-controller/src/main/resources/app/utils/PinotMethodUtils.ts
##########
@@ -228,57 +228,60 @@ const getQueryResults = (params, url, checkedOptions) => {
     let queryResponse = null;
     queryResponse = getAsObject(data);
 
+    let errorStr = '';
+    let dataArray = [];
+    let columnList = [];
     // if sql api throws error, handle here
     if(typeof queryResponse === 'string'){
-      return {error: queryResponse};
+      errorStr = queryResponse;
     } else if(queryResponse.exceptions.length){

Review comment:
       `queryResponse` could potentially be null.
   ```
   else if (queryResponse && queryResponse.exceptions && queryResponse.exceptions.length) {}
   ```




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