Skip to content

Better document limitation on Array support. #442

Open

Activity

  1. added
    enhancement
    on Feb 21, 2022
  2. penghuo commented on Feb 21, 2022

    @penghuo
    CollaboratorAuthor

    Similar issue. #235

  3. ps48 commented on Apr 19, 2022

    @ps48
    Member

    @penghuo Adding one example for documentation. SQL plugin doesn't support arrays and array of objects. It returns just the first element for the both types.

    Indexed Doc

    PUT my-index-000001/_doc/1
    {
      "message": "some arrays in this document...",
      "tags":  [ "opensearch", "wow" ], 
      "lists": [ 
        {
          "name": "prog_list",
          "description": "programming list"
        },
        {
          "name": "cool_list",
          "description": "cool stuff list"
        }
      ]
    }
    

    SQL Query, Response

    select * from my-index-000001
    
    {
      "schema": [
        {
          "name": "message",
          "type": "text"
        },
        {
          "name": "lists",
          "type": "object"
        },
        {
          "name": "tags",
          "type": "text"
        }
      ],
      "datarows": [
        [
          "some arrays in this document...",
          {
            "name": "prog_list",
            "description": "programming list"
          },
          "opensearch"
        ]
      ],
      "total": 1,
      "size": 1,
      "status": 200
    }
    
  4. dai-chen commented on Sep 13, 2022

    @dai-chen
    Collaborator

    Just for reference: Presto/Trino supports array type by asking user to specific it in index mapping: https://trino.io/docs/current/connector/elasticsearch.html#array-types

  5. Yury-Fridlyand commented on Oct 5, 2022

    @Yury-Fridlyand
    Collaborator

    // Fall back to old engine too if type is not supported semantically
    if (isTypeNotSupported(ref.type())) {
    throw new SyntaxCheckException(String.format(
    "Identifier [%s] of type [%s] is not supported yet", ident, ref.type()));
    }
    return ref;
    }
    // Array type is not supporte yet.
    private boolean isTypeNotSupported(ExprType type) {
    return "array".equalsIgnoreCase(type.typeName());
    }

  6. added
    PPL
    documentation
    on May 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    PPLarraydocumentationenhancement

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions