korlov42 commented on code in PR #2271:
URL: https://github.com/apache/ignite-3/pull/2271#discussion_r1261094438


##########
modules/core/src/main/java/org/apache/ignite/lang/ErrorGroups.java:
##########


Review Comment:
   1) I would say, we need neither `SESSION_NOT_FOUND_ERR` nor 
`SESSION_EXPIRED_ERR`. But I would preserve `EXECUTION_CANCELLED_ERR` code. The 
idea is to distinguish cursor closed explicitly (by invocation of closeAsync 
method) from those closed implicitly (by timeout, by admin request, etc).
   
   2) For every remaining code in SQL group, we need to improve javadoc. Things 
to highlight: general description, some example when it's legit to throw this 
exception (if applicable), action points. Here is an example for 
`VALIDATION_ERR`:
   
   ```
   Although statement is grammatically correct, the semantic is in question. 
This error may appears in following cases:
       * the statement refer to relation that doesn't exists
       * the statement describes action that is prohibited by the system, like 
changing columns belonging to primary keys
       * the statement contains operation that is not defined for given 
operands' types, like addition of DATE and DECIMAL
       * etc
   
   See message for details.
   ```
   
   3) rename `RUNTIME_EXECUTION_ERR` --> `RUNTIME_ERR`. This code should be 
used whenever the exception caused by user (like in the case `CAST('asd' as 
INTEGER)`)
   
   4) rest of the runtime exceptions should be covered by INTERNAL error code



-- 
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: notifications-unsubscr...@ignite.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to