Skip to content

[BUG] Query with nested field type does not fall back to legacy #1277

Closed

Description

@GumpacG

What is the bug?
SELECT message.info FROM nested_simple; is being run on the new engine instead of Legacy. It is not supported by the new engine yet and should fall back to Legacy.

How can one reproduce the bug?
Steps to reproduce the behavior:

  1. Checkout upstream opensearch-sql branch 2.x
  2. Install the plugin to your local server
  3. Run opensearch
  4. Run the query SELECT message.info FROM nested_simple;
  5. See results as NULL and the Logs shows that it is being run on the new engine

What is the expected behavior?
Since this is not supported in the new engine, it should fall back to Legacy

What is your host/environment?
opensearch-sql 2.4.0

Do you have any screenshots?
Screenshot 2023-01-12 at 11 02 31 AM
[2023-01-12T11:01:49,953][ERROR][o.o.s.l.p.RestSQLQueryAction] [Unused26-MacBook.local] [c7c6efae-d236-4093-9516-37c94896ceb3] Request is handled by new SQL query engine

Test data mappings

  "mappings": {
    "properties": {
      "message": {
        "type": "nested",
        "properties": {
          "info": {
            "type": "keyword",
            "index": "true"
          },
          "author": {
            "type": "keyword",
            "fields": {
              "keyword": {
                "type": "keyword",
                "ignore_above": 256
              }
            },
            "index": "true"
          },
          "dayOfWeek": {
            "type": "long"
          }
        }
      },
      "comment": {
        "type": "nested",
        "properties": {
          "data": {
            "type": "keyword",
            "index": "true"
          },
          "likes": {
            "type": "long"
          }
        }
      },
      "myNum": {
        "type": "long"
      },
      "someField": {
        "type": "keyword",
        "index": "true"
      }
    }
  }
}

Activity

  1. added
    bug
    on Jan 12, 2023
  2. dai-chen commented on Jan 13, 2023

    @dai-chen
    Collaborator

    @GumpacG Could you also share your test index mapping?

  3. GumpacG commented on Jan 13, 2023

    @GumpacG
    CollaboratorAuthor

    @GumpacG Could you also share your test index mapping?

    Done. Thanks

  4. GumpacG commented on Apr 25, 2023

    @GumpacG
    CollaboratorAuthor

    Closing this as Nested implementation is merged and is now irrelevant.

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

    bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions