[fix](es-catalog) Fix query error when ES keyword field contains array data#61236
Merged
morningman merged 3 commits intoapache:masterfrom Mar 16, 2026
Merged
Conversation
Contributor
|
Thank you for your contribution to Apache Doris. Please clearly describe your PR:
|
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 27579 ms |
TPC-DS: Total hot run time: 153525 ms |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
…y data When an Elasticsearch field is mapped as keyword/text but the actual data stored is an array (which is valid in ES), Doris was throwing: 'Expected value of type: STRING; but found type: Array' This fix serializes the array to a JSON string representation instead of throwing an error, which is consistent with how other non-string types (Numbers, Objects) are already handled. Fixed two code paths in es_scroll_parser.cpp: 1. fill_columns() - main _source parsing path 2. handle_value() - array element processing path Also added regression test and test data for this scenario.
6fe4a68 to
a20f5bf
Compare
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 27489 ms |
TPC-DS: Total hot run time: 152669 ms |
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
linrrzqqq
approved these changes
Mar 12, 2026
Contributor
linrrzqqq
left a comment
There was a problem hiding this comment.
Approved by OpenClaw assistant
Contributor
|
PR approved by anyone and no changes requested. |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 27692 ms |
TPC-DS: Total hot run time: 153039 ms |
Contributor
Author
|
run buildall |
TPC-H: Total hot run time: 27745 ms |
TPC-DS: Total hot run time: 153217 ms |
Contributor
BE UT Coverage ReportIncrement line coverage Increment coverage report
|
Contributor
BE Regression && UT Coverage ReportIncrement line coverage Increment coverage report
|
CalvinKirs
approved these changes
Mar 16, 2026
Contributor
|
PR approved by at least one committer and no changes requested. |
github-actions bot
pushed a commit
that referenced
this pull request
Mar 16, 2026
…y data (#61236) ### What problem does this PR solve? When an Elasticsearch field is mapped as keyword/text but the actual data stored is an array (which is valid in ES), Doris was throwing: 'Expected value of type: STRING; but found type: Array' This fix serializes the array to a JSON string representation instead of throwing an error, which is consistent with how other non-string types (Numbers, Objects) are already handled. Fixed two code paths in es_scroll_parser.cpp: 1. fill_columns() - main _source parsing path 2. handle_value() - array element processing path Also added regression test and test data for this scenario.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What problem does this PR solve?
When an Elasticsearch field is mapped as keyword/text but the actual data stored is an array (which is valid in ES),
Doris was throwing: 'Expected value of type: STRING; but found type: Array'
This fix serializes the array to a JSON string representation instead of throwing an error,
which is consistent with how other non-string types (Numbers, Objects) are already handled.
Fixed two code paths in es_scroll_parser.cpp:
Also added regression test and test data for this scenario.
Release note
None
Check List (For Author)
Test
Behavior changed:
Does this need documentation?
Check List (For Reviewer who merge this PR)