-
Notifications
You must be signed in to change notification settings - Fork 3.2k
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
[fix](ES Catalog)Only like on keyword can be applied to wildcard query #41176
base: master
Are you sure you want to change the base?
Conversation
Thank you for your contribution to Apache Doris. Since 2024-03-18, the Document has been moved to doris-website. |
run buildall |
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 |
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 |
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.
b20d14d
to
97e5c2f
Compare
run buildall |
Proposed changes
We map
text
andkeyword
both tostring
type in Doris. When enablelike_push_down
, we translate like to wildcard query in ES, which will lead unexpected result intext
field. We should stick tokeyword
with wildcard query.column2typeMap
inEsTable
to save the mapping of column_name to ES field data type.EsSchemaCacheValue
to get schema and column to type mapcolumn2typeMap
when cache init and build query process of ES external table