OpenSearch/docs/reference/sql
Marios Trivyzas d5b0badeb7
SQL: Remove CircuitBreaker from parser (#41835)
The CircuitBreaker was introduced as means of preventing a
`StackOverflowException` during the build of the AST by the parser.

The ANTLR4 grammar causes a weird behaviour for a Parser Listener.
The `enterEveryRule()` method is often called with a different parsing
context than the respective `exitEveryRule()`. This makes it difficult
to keep track of the tree's depth, and a custom Map was used as an
attempt of matching the contextes as they are encounter during `enter`
and during `exit` of the rules.

This approach had 2 important drawbacks:
1. It's hard to maintain this custom Map as the grammar changes.
2. The CircuitBreaker could often lead to false positives which caused
valid queries to return an Exception and prevent them from executing.

So, this removes completely the CircuitBreaker which is replaced be
a simple handling of the `StackOverflowException`

Fixes: #41471
(cherry picked from commit 1559a8e2dbd729138b52e89b7e80264c9f4ad1e7)
2019-05-07 23:25:37 +03:00
..
appendix SQL: Implement CURRENT_TIME/CURTIME functions (#40662) 2019-04-04 11:45:20 +02:00
endpoints [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00
functions SQL: [Docs] Add example for custom bucketing with CASE (#41787) 2019-05-06 18:05:03 +03:00
language SQL: [Docs] Add example for custom bucketing with CASE (#41787) 2019-05-06 18:05:03 +03:00
concepts.asciidoc [DOCS] Replaces CCS terms with attributes (#40076) 2019-03-15 07:57:51 -07:00
getting-started.asciidoc SQL: remove beta marker from documentation (#38661) 2019-02-10 00:09:58 +02:00
index.asciidoc SQL: Spec tests now use classpath discovery (#40388) 2019-03-25 15:22:52 +02:00
limitations.asciidoc SQL: Remove CircuitBreaker from parser (#41835) 2019-05-07 23:25:37 +03:00
overview.asciidoc SQL: remove beta marker from documentation (#38661) 2019-02-10 00:09:58 +02:00
security.asciidoc [DOCS] Add anchors for Asciidoctor migration (#41648) 2019-04-30 10:20:17 -04:00