-
Notifications
You must be signed in to change notification settings - Fork 141
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] _id is not available in where condition #639
Comments
similar one. #339. |
related issue: #432 |
Since we're adding more Storage implementation for external data source, such as S3, Prometheus. Probably another way to look at this is: every storage may have some special/meta fields. For example, OpenSearch has _id, _score, S3 may have _partition, _file like these in Trino https://trino.io/docs/current/connector/hive.html#special-columns. |
…lifiedName Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
We can include metadata fields in the parser language as part of this ticket and hardcode the field types in the expression analyzer. This will also work to fix the double underscore fields. @dai-chen unfortunately, this doesn't work for other storage devices - which means all _id fields will be treated equally. We would need to think of a way around this when defining our user-defined-languages and maybe just check the table storage type is part of a hardcoded list (for that storage type) or is defined in the user-defined-language. Works for these examples:
PR prototype: Bit-Quill#142 |
@acarbonetto Any progress on this? I'm thinking can we label all these related issues 2.6.0? |
…lifiedName Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
…nction (#228) * Rebase from main Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update to define and include metadata when visiting the expr node Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Add specific metadata identifiers Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Add IT tests and add parser changes Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Rebase from main Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update score function expression analyzer to return boosted relevance function Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update builder to track scores Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Remove ScoreExpression.java and cleanup checkstyle Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * cleanup checkstyle Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Cleanup and add alternative score function syntax Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Cleanup and add alternative score function syntax Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Fix some bugs and add Expression tests Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Add expresssion and analyzer tests Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Add score doctests Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Add score function doctests Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Add metafield tests Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Move legacy test and mark old as ignore Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * fix checkstyle violations Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * fix checkstyle violations Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update tests and identifier to accept metafields Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Checkstyle fixes Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Rebase from main Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Rebase from main Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Rebase from main Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * fix checkstyle violations Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Revert bad conflict resolution Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Fix for review comments Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update IT tests and legacy tests for comments Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Minor comment Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Updates for whitespace Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update basics.rst to show OS result Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update basics.rst to show OS result Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update basics.rst description Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Change Score function to accept a double/integer not an unresolved Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update functions.rst Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Checkstyle update Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Move reserved world symbol table to OpenSearchTable Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Update functions.rst for review comments Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Removed parser meta tokens; Changes ImmutableMap to Map Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> * Removed parser meta tokens; Changes ImmutableMap to Map Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com> --------- Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
…elds and the score OpenSearch function (#228) (opensearch-project#1456) Allow metadata fields and score OpenSearch function. Signed-off-by: Andrew Carbonetto <andrewc@bitquilltech.com>
What is the bug?
reproduce:
POST _plugins/_sql
{
"query": "SELECT * FROM my-index1 where _id = 1"
}
SemanticCheckException was encountered
The text was updated successfully, but these errors were encountered: