opensearch-project / opensearch-project/sql
[BUG] PPL query return null when access valid inner json object
Open
Nobody has claimed this yet.
bug
PPL
- Dominant language
- Java
- Stars
- 176
- Forks
- 229
- Avg merge
- 2d 21h
- Merged PRs (30d)
- 43
Description
How can one reproduce the bug?
###
PUT {{baseUrl}}/log00001
Content-Type: application/x-ndjson
{
"mappings": {
"properties": {
"log": {
"type": "object",
"enabled": false
}
}
}
}
###
POST {{baseUrl}}/log00001/_bulk
Content-Type: application/x-ndjson
{"index": {}}
{"log": {"a":1, "c": {"d": 2}}}
###
POST {{baseUrl}}/_plugins/_ppl/
Content-Type: application/x-ndjson
{
"query": "source=log00001 | fields log.c.d"
}
- Results
{
"schema": [
{
"name": "log.c.d",
"type": "undefined"
}
],
"datarows": [
[
null
]
],
"total": 1,
"size": 1
}
What is the expected behavior?
It should return
{
"schema": [
{
"name": "log.c.d",
"type": "int"
}
],
"datarows": [
[
2
]
],
"total": 1,
"size": 1
}
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.