-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[fix](ES Catalog)Only like on keyword can be applied to wildcard query #41176
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
Conversation
|
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
|
run buildall |
xiaokang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you have a end to end testcase for text_field LIKE xxx ?
|
run buildall |
xiaokang
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
|
PR approved by anyone and no changes requested. |
|
run buildall |
b20d14d to
97e5c2f
Compare
|
run buildall |
We map `text` and `keyword` both to `string` type in Doris. When enable `like_push_down`, we translate like to wildcard query in ES, which will lead unexpected result in `text` field. We should stick to `keyword` with wildcard query. 1. Add `column2typeMap` in `EsTable` to save the mapping of column_name to ES field data type. 2. Add new class `EsSchemaCacheValue` to get schema and column to type map 2. Init `column2typeMap` when cache init and build query process of ES external table
2. Add end to end test case for like.
97e5c2f to
e7dc509
Compare
|
run buildall |
morningman
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
|
PR approved by at least one committer and no changes requested. |
airborne12
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
#41176) ## Proposed changes We map `text` and `keyword` both to `string` type in Doris. When enable `like_push_down`, we translate like to wildcard query in ES, which will lead unexpected result in `text` field. We should stick to `keyword` with wildcard query. 1. Add `column2typeMap` in `EsTable` to save the mapping of column_name to ES field data type. 2. Add new class `EsSchemaCacheValue` to get schema and column to type map 3. Init `column2typeMap` when cache init and build query process of ES external table 4. Support LIKE functionCallExpr for Nereids planner. 5. Add end to end like predicate test cases and UTs
#41176) ## Proposed changes We map `text` and `keyword` both to `string` type in Doris. When enable `like_push_down`, we translate like to wildcard query in ES, which will lead unexpected result in `text` field. We should stick to `keyword` with wildcard query. 1. Add `column2typeMap` in `EsTable` to save the mapping of column_name to ES field data type. 2. Add new class `EsSchemaCacheValue` to get schema and column to type map 3. Init `column2typeMap` when cache init and build query process of ES external table 4. Support LIKE functionCallExpr for Nereids planner. 5. Add end to end like predicate test cases and UTs
apache#41176) We map `text` and `keyword` both to `string` type in Doris. When enable `like_push_down`, we translate like to wildcard query in ES, which will lead unexpected result in `text` field. We should stick to `keyword` with wildcard query. 1. Add `column2typeMap` in `EsTable` to save the mapping of column_name to ES field data type. 2. Add new class `EsSchemaCacheValue` to get schema and column to type map 3. Init `column2typeMap` when cache init and build query process of ES external table 4. Support LIKE functionCallExpr for Nereids planner. 5. Add end to end like predicate test cases and UTs
Proposed changes
We map
textandkeywordboth tostringtype in Doris. When enablelike_push_down, we translate like to wildcard query in ES, which will lead unexpected result intextfield. We should stick tokeywordwith wildcard query.column2typeMapinEsTableto save the mapping of column_name to ES field data type.EsSchemaCacheValueto get schema and column to type mapcolumn2typeMapwhen cache init and build query process of ES external table