Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

[Enhancement] Handle the multivalue field properly #1017

Closed
penghuo opened this issue Jan 28, 2021 · 0 comments
Closed

[Enhancement] Handle the multivalue field properly #1017

penghuo opened this issue Jan 28, 2021 · 0 comments
Labels
enhancement New feature or request PPL SQL

Comments

@penghuo
Copy link
Contributor

penghuo commented Jan 28, 2021

Currently, we the field has multiple value, SQL/PPL can't handle it properly.

PUT objectsit/_doc/1
{
  "name": ["test1", "test2"],
  "ids": [1, 2],
  "accounts": [
    {
      "id": 1
    },
    {
      "id": 2
    }
  ]
}
POST /_opendistro/_sql
{
  "query": """
    SELECT name, ids, accounts
    FROM objectsit
  """
}

{
  "schema": [
    {
      "name": "name",
      "type": "text"
    },
    {
      "name": "ids",
      "type": "long"
    },
    {
      "name": "accounts",
      "type": "object"
    }
  ],
  "datarows": [
    [
      "",
      0,
      {}
    ]
  ],
  "total": 1,
  "size": 1,
  "status": 200
}
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request PPL SQL
Projects
None yet
Development

No branches or pull requests

1 participant