real-mj-song commented on code in PR #14917:
URL: https://github.com/apache/pinot/pull/14917#discussion_r1933403035


##########
pinot-common/src/main/java/org/apache/pinot/common/exception/QueryInfoException.java:
##########
@@ -0,0 +1,32 @@
+package org.apache.pinot.common.exception;
+
+import org.apache.pinot.common.response.ProcessingException;
+
+
+/**
+ * Exception to contain info about QueryException errors.
+ * Throwable version of {@link 
org.apache.pinot.common.response.broker.QueryProcessingException}
+ */
+public class QueryInfoException extends RuntimeException {

Review Comment:
   ### Why this class?
   QueryException is more of QueryExceptionUtil. It isn't throwable and a 
collection of `ProcessingException extends org.apache.thrift.TException`. We 
need a throwable class that also contains information about ProcessingException.
   
   ### Can't you use static QueryException.QUERY_VALIDATION_ERROR (or other 
from that family) directly?
   Because they are basically `org.apache.thrift.TException`, they aren't 
suitable for general purpose exception. For instance, the message of 
QueryException.QUERY_VALIDATION_ERROR is statically set when 
defined/initialized.
   
   ### Can't you use QueryProcessingException instead?
   
[QueryProcessingException](https://github.com/apache/pinot/blob/master/pinot-common/src/main/java/org/apache/pinot/common/response/broker/QueryProcessingException.java)
 isn't throwable. It's named exception but it's really a 
QueryExceptionContainer used on broker side.



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