-
Notifications
You must be signed in to change notification settings - Fork 139
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
Support for _routing field in SQL queries #339
Comments
Thanks for raising this! For example, following query will throw SemanticCheckException _routing is not defined.
I think one solution is to borrow pseudo columns concept to expose metadata field like _routing. @newUserForTesting Can you elaborate on your use case to provide us some insights? |
Proposal: couchbase offers META() as a way to retrieve metadata fields in their n1ql syntax https://docs.couchbase.com/server/current/n1ql/n1ql-language-reference/indexing-meta-info.html. We could consider coding something similar to SQL DSL that allows one to do:
|
* Spotless apply on PPL (#339) Signed-off-by: Mitchell Gale <Mitchell.Gale@improving.com> * Update ppl/src/test/java/org/opensearch/sql/ppl/parser/AstExpressionBuilderTest.java Co-authored-by: Guian Gumpac <guian.gumpac@improving.com> Signed-off-by: Mitchell Gale <Mitchell.gale@improving.com> --------- Signed-off-by: Mitchell Gale <Mitchell.Gale@improving.com> Signed-off-by: Mitchell Gale <Mitchell.gale@improving.com> Co-authored-by: Guian Gumpac <guian.gumpac@improving.com>
Here is the relevant documentation for _routing field: https://www.elastic.co/guide/en/elasticsearch/reference/current/mapping-routing-field.html
This is extremely useful for optimizing query performance for large ElasticSearch cluster.
Requesting to please provide support for _routing field for SQL queries. We really appreciate your help!
Thanks!
The text was updated successfully, but these errors were encountered: