imply-cheddar commented on code in PR #13564:
URL: https://github.com/apache/druid/pull/13564#discussion_r1051910985


##########
sql/src/main/java/org/apache/druid/sql/SqlPlanningException.java:
##########
@@ -32,11 +32,12 @@
  */
 public class SqlPlanningException extends BadQueryException
 {
+
   public enum PlanningError
   {
-    SQL_PARSE_ERROR("SQL parse failed", SqlParseException.class.getName()),
-    VALIDATION_ERROR("Plan validation failed", 
ValidationException.class.getName()),
-    UNSUPPORTED_SQL_ERROR("SQL query is unsupported", 
RelOptPlanner.CannotPlanException.class.getName());
+    SQL_PARSE_ERROR(SQL_PARSE_FAILED_ERROR_CODE, 
SqlParseException.class.getName()),
+    VALIDATION_ERROR(PLAN_VALIDATION_FAILED_ERROR_CODE, 
ValidationException.class.getName()),
+    UNSUPPORTED_SQL_ERROR(SQL_QUERY_UNSUPPORTED_ERROR_CODE, 
RelOptPlanner.CannotPlanException.class.getName());

Review Comment:
   I completely agree.  Kashif was asking about this above as well.  We should 
absolutely introduce actual numerical error codes at some point and migrate 
away from these weird string-matched things.  Your proposal seems like a good 
way to get that in.



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