Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Elasticsearch catalog does not work for text fields with multiple values #45623

Open
matt-scwx opened this issue May 15, 2024 · 0 comments
Open
Labels
type/bug Something isn't working

Comments

@matt-scwx
Copy link

Steps to reproduce the behavior (Required)

  1. Create a new elasticsearch catalog
  2. Run any query against a table belonging to the newly created catalog

If the targeted index has a document with a field that has more than one value, the following error is seen:

ERROR 1064 (HY000): Expected value of type: VARCHAR; but found type: Array; Document slice is : ["SAMPLE"]

Here is a sample document that causes the issue:

{
  "message": "some arrays in this document...",
  "tags":  [ "elasticsearch", "wow" ], 
  "lists": [ 
    {
      "name": "prog_list",
      "description": "programming list"
    },
    {
      "name": "cool_list",
      "description": "cool stuff list"
    }
  ]
}

Expected behavior (Required)

The elasticsearch connector should create tables with array data types when necessary. There's a deeper problem here in that within a given index, one document might have an array value for a field while another document might have a scalar. This may just result in a given index being incompatible with StarRocks, which seems reasonable. But it'd be nice to handle the case where all values are arrays.

Real behavior (Required)

The elasticsearch connector does not handle array data types at all in when creating tables.

StarRocks version (Required)

3.2.6-2585333

@matt-scwx matt-scwx added the type/bug Something isn't working label May 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant