generated from amazon-archives/__template_Custom
-
Notifications
You must be signed in to change notification settings - Fork 179
Closed
Labels
PPLPiped processing languagePiped processing languagePriority-HighbugSomething isn't workingSomething isn't workingcalcitecalcite migration releatedcalcite migration releated
Description
What is the bug?
=expression works as expected in eval
source=logs-otel | parse body 'HTTP/1.1 (?<httpstatus>\\d+)' | eval status200=httpstatus='200' | fields httpstatus, status200
=throw expression when used inside if expression
source=logs-otel | parse body 'HTTP/1.1 (?<httpstatus>\\d+)' | eval status200=if(httpstatus='200', 1, 0) | fields httpstatus, status200
{
"error": {
"reason": "Invalid Query",
"details": "IF function expects {[BOOLEAN,ANY,ANY]}, but got [STRING,INTEGER,INTEGER]",
"type": "ExpressionEvaluationException"
},
"status": 400
}
What is the expected behavior?
No exception.
Do you have any screenshots?
n/a
Do you have any additional context?
###
PUT {{baseUrl}}/_plugins/_query/settings
Content-Type: application/x-ndjson
{
"transient" : {
"plugins.calcite.enabled" : true
}
}
###
POST {{baseUrl}}/logs-otel/_bulk
Content-Type: application/x-ndjson
{"index": {}}
{"regionId": 1, "body": "HTTP/1.1 200 UT response_timeout - \"-\" 380 24 15000"}
{"index": {}}
{"regionId": 1, "body": "HTTP/1.1 301 UT response_timeout - \"-\" 380 24 15000"}
{"index": {}}
{"regionId": 2, "body": "HTTP/1.1 404 UT response_timeout - \"-\" 380 24 15000"}
{"index": {}}
{"regionId": 2, "body": "HTTP/1.1 504 UT response_timeout - \"-\" 380 24 15000"}
{"index": {}}
{"regionId": 2, "body": "HTTP/1.1 900 UT response_timeout - \"-\" 380 24 15000"}
Metadata
Metadata
Assignees
Labels
PPLPiped processing languagePiped processing languagePriority-HighbugSomething isn't workingSomething isn't workingcalcitecalcite migration releatedcalcite migration releated
Type
Projects
Status
Done