Closed
Description
Currently the form of the ANTLR grammar makes the logic of the CircuitBreaker quite complicated and prone to bugs when the grammar changes. That is because the enterEveryRule()
and exitEveryRule()
are often called on different contexts so it's difficult to track the correct counts and calculate a correct parsing tree depth.
After discussion, it was decided to remove completely the CircuitBreaker and instead simply catch the StackOverflowException (when the parsing tree grows too big to fit in the stack).
Moreover this behaviour should be added in the SQL docs.