You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Aug 2, 2022. It is now read-only.
The negative integer and floating-point number is matched wrongly in current ANTLR grammar. This bug seems introduced since the very beginning when new ANTLR parser was added. Here is an example:
PUT float-test/_doc/1
{
"balance": 1.23
}
PUT float-test/_doc/2
{
"balance": 2.21
}
PUT float-test/_doc/3
{
"balance": -746.0000000000075
}
POST _opendistro/_sql?pretty
{
"query": """
SELECT
balance FROM null-sum-test WHERE balance > -746
"""
}
{
"error": {
"reason": "Invalid SQL query",
"details": "*Field [-746] cannot be found or used here.*",
"type": "SemanticAnalysisException"
},
"status": 400
}
POST _opendistro/_sql?pretty
{
"query": """
SELECT
balance FROM null-sum-test WHERE balance > -1.0
"""
}
{
"error": {
"reason": "Invalid SQL query",
"details": "Failed to parse query due to *offending symbol [.0]* at:
'\n SELECT\n balance FROM null-sum-test WHERE balance > -1.0' <--- HERE...
More details: extraneous input '.0' expecting <EOF>",
"type": "SyntaxAnalysisException"
},
"status": 400
}