forked from opendistro-for-elasticsearch/sql
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Modified the wording of exception messages and created the troublesho…
…oting page (opendistro-for-elasticsearch#372) * Edit the wording of exception messages * Created troubleshooting page * Revised troubleshooting page * addressed comments (cherry picked from commit a4afc75)
- Loading branch information
Showing
24 changed files
with
218 additions
and
118 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
|
||
=============== | ||
Troubleshooting | ||
=============== | ||
|
||
.. contents:: | ||
:local: | ||
:depth: 2 | ||
|
||
|
||
Narrative | ||
========= | ||
|
||
SQL plugin is stateless for now so mostly the troubleshooting is focused on why a single query fails. | ||
|
||
|
||
Syntax Analysis / Semantic Analysis Exceptions | ||
---------------------------------------------- | ||
|
||
**Symptoms** | ||
|
||
When you end up with exceptions similar to as follows: | ||
|
||
Query: | ||
|
||
.. code-block:: JSON | ||
POST /_opendistro/_sql | ||
{ | ||
"query" : "SELECT * FROM sample:data" | ||
} | ||
Result: | ||
|
||
.. code-block:: JSON | ||
{ | ||
"reason": "Invalid SQL query", | ||
"details": "Failed to parse query due to offending symbol [:] at: 'SELECT * FROM xxx WHERE xxx:' <--- HERE... | ||
More details: Expecting tokens in {<EOF>, 'AND', 'BETWEEN', 'GROUP', 'HAVING', 'IN', 'IS', 'LIKE', 'LIMIT', | ||
'NOT', 'OR', 'ORDER', 'REGEXP', '*', '/', '%', '+', '-', 'DIV', 'MOD', '=', '>', '<', '!', | ||
'|', '&', '^', '.', DOT_ID}", | ||
"type": "SyntaxAnalysisException" | ||
} | ||
**Workaround** | ||
|
||
You need to confirm if the syntax is not supported and disable query analysis if that's the case by the following steps: | ||
|
||
1. Identify syntax error in failed query, and correct the syntax if the query does not follow MySQL grammar. Go to step 2 if your query is correct in syntax but it still ends up syntax exception. | ||
|
||
#. Disable strict query analysis in new ANTLR parser with the following code block. | ||
|
||
#. Verify if the query can pass now. If the query fails as well, please create an issue in our `GitHub Issues <https://github.com/opendistro-for-elasticsearch/sql/issues>`_ section to report bugs fixing or request new features. | ||
|
||
.. code-block:: JSON | ||
#Disable query analysis | ||
curl -H 'Content-Type: application/json' -X PUT localhost:9200/_cluster/settings -d '{ | ||
"persistent" : { | ||
"opendistro.sql.query.analysis.enabled" : false | ||
} | ||
}' | ||
#Verify if the query can pass the verification now | ||
curl -H 'Content-Type: application/json' -X POST localhost:9200/_opendistro/_sql -d '{ | ||
"query" : "SELECT * FROM ..." | ||
}' | ||
Index Mapping Verification Exception | ||
------------------------------------ | ||
|
||
**Symptoms** | ||
|
||
.. code-block:: JSON | ||
{ | ||
"error": { | ||
"reason": "There was internal problem at backend", | ||
"details": "When using multiple indices, the mappings must be identical.", | ||
"type": "VerificationException" | ||
}, | ||
"status": 503 | ||
} | ||
**Workaround** | ||
|
||
If index in query is not an index pattern (index name ends with wildcard), check if the index has multiple types. If nothing works during your workaround, please create an issue in our `GitHub Issues <https://github.com/opendistro-for-elasticsearch/sql/issues>`_ section so that we can provide you with our suggestions and help. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.