Open bugmakerrrrrr opened 2 weeks ago
PPL (or SQL v2) shows numerical field with string value as 0.
POST num_with_string_value/_doc
{
"number": 123
}
POST num_with_string_value/_doc
{
"number": "456"
}
POST _plugins/_ppl
{
"query": "source = num_with_string_value | where number > 0"
}
{
"schema": [
{
"name": "number",
"type": "long"
}
],
"datarows": [
[
0
],
[
123
]
],
"total": 2,
"size": 2
}
What is the bug? In OS, the numeric/boolean fields can be indexed in text format, and the string field can be indexed in numeric format, but the sql plugin cannot parse these value correctly.
How can one reproduce the bug?