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

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

Closed
GumpacG opened this issue Jan 12, 2023 · 3 comments
Closed

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

GumpacG opened this issue Jan 12, 2023 · 3 comments
Labels
bug Something isn't working

Comments

@GumpacG
Copy link
Collaborator

GumpacG commented Jan 12, 2023

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"
      }
    }
  }
}
@dai-chen
Copy link
Collaborator

@GumpacG Could you also share your test index mapping?

@GumpacG
Copy link
Collaborator Author

GumpacG commented Jan 13, 2023

@GumpacG Could you also share your test index mapping?

Done. Thanks

@GumpacG
Copy link
Collaborator Author

GumpacG commented Apr 25, 2023

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

@GumpacG GumpacG closed this as completed Apr 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants