generated from amazon-archives/__template_Custom
-
Couldn't load subscription status.
- Fork 176
Closed
Labels
PPLPiped processing languagePiped processing languagebugSomething isn't workingSomething isn't workingdynamic-testIssues found by or related to Dynamic TestingIssues found by or related to Dynamic Testing
Description
What is the bug?
In PPL WHERE clauses, most plain boolean expressions are failing. Two related repros below:
How can one reproduce the bug?
- Create a test index (here
test_19a673e2) with at least two fields of typeboolean(herexandy). - First example: try to just select rows where
xis truthy:
POST _plugins/_ppl
{
"query": "SOURCE = test_19a673e2 | WHERE x"
}Result:
{
"error": {
"reason": "Invalid Query",
"details": "Failed to parse query due to offending symbol [<EOF>] at: 'SOURCE = test_19a673e2 | WHERE x' <--- HERE... More details: Expecting tokens in {'SEARCH', 'DESCRIBE', ..., BQUOTA_STRING}",
"type": "SyntaxCheckException"
},
"status": 400
}- Second example: forget boolean variables, just select all the rows with a no-op
WHERE:
POST _plugins/_ppl
{
"query": "SOURCE = test_19a673e2 | WHERE TRUE"
}Result:
{
"error": {
"reason": "Invalid Query",
"details": "Failed to parse query due to offending symbol [<EOF>] at: 'SOURCE = test_19a673e2 | WHERE TRUE' <--- HERE... More details: Expecting tokens in {'SEARCH', 'DESCRIBE', ..., BQUOTA_STRING}",
"type": "SyntaxCheckException"
},
"status": 400
}- Third example: the first example can be resolved by using
x = TRUEinstead of justx, but now let's try combining variables:
POST _plugins/_ppl
{
"query": "SOURCE = test_19a673e2 | WHERE x OR y"
}Result:
{
"error": {
"reason": "Invalid Query",
"details": "Failed to parse query due to offending symbol [OR] at: 'SOURCE = test_19a673e2 | WHERE x OR' <--- HERE... More details: Expecting tokens in {'SEARCH', 'DESCRIBE', ..., BQUOTA_STRING}",
"type": "SyntaxCheckException"
},
"status": 400
}What is the expected behavior?
Logical expressions involving boolean variables should behave as expected.
What is your host/environment?
- OS: commit 0e61d20.
Do you have any screenshots?
N/A
Do you have any additional context?
Found by distributed-testing.
Metadata
Metadata
Assignees
Labels
PPLPiped processing languagePiped processing languagebugSomething isn't workingSomething isn't workingdynamic-testIssues found by or related to Dynamic TestingIssues found by or related to Dynamic Testing
Type
Projects
Status
Done