[Feature] PPL Highlight Support#5234
[Feature] PPL Highlight Support#5234RyanL1997 wants to merge 17 commits intoopensearch-project:mainfrom
Conversation
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit 5891541.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
PR Reviewer Guide 🔍(Review updated until commit c87b5b8)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to c87b5b8 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 124c42a
Suggestions up to commit 82443d8
Suggestions up to commit d039af6
Suggestions up to commit 9a272c4
Suggestions up to commit 3cfbe9a
|
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit f0dacc0.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
Persistent review updated to latest commit f0dacc0 |
|
Persistent review updated to latest commit ab37b5b |
|
Persistent review updated to latest commit a7c44d8 |
|
Persistent review updated to latest commit 51356cd |
|
Persistent review updated to latest commit b2d6afe |
|
Persistent review updated to latest commit 7bb526a |
PR Code Analyzer ❗AI-powered 'Code-Diff-Analyzer' found issues on commit e3b9c75.
The table above displays the top 10 most important findings. Pull Requests Author(s): Please update your Pull Request according to the report above. Repository Maintainer(s): You can Thanks. |
|
Persistent review updated to latest commit e3b9c75 |
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
…command Signed-off-by: Jialiang Liang <jiallian@amazon.com>
e3b9c75 to
3cfbe9a
Compare
|
Persistent review updated to latest commit 3cfbe9a |
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
Signed-off-by: Jialiang Liang <jiallian@amazon.com>
|
Persistent review updated to latest commit 82443d8 |
|
Persistent review updated to latest commit 124c42a |
|
Persistent review updated to latest commit c87b5b8 |
Description
This PR replaces the request-level
ThreadLocalapproach from #5141. Instead of passing highlight config through thread-local state, we thread aHighlightConfigrecord through the AST and Calcite plan — following the same pattern asfetch_size(#5109). The highlight config flows from the API request into the AST viaStatementBuilderContext, becomes aLogicalHighlightCalcite node, and gets pushed down to the OpenSearch scan via an optimizer rule. This avoids the thread-safety concerns and implicit coupling ofThreadLocaland keeps the data flow explicit and traceable through the plan.highlightAPI parameter (not as a PPL command)["*"]) and the rich OpenSearch Dashboards object format withpre_tags,post_tags,fields, andfragment_sizeHighlightConfigrecord to carry highlight options through the full pipeline:PPLQueryRequest→AstStatementBuilder→HighlightAST node →CalciteRelNodeVisitor→LogicalHighlight→HighlightIndexScanRulepushdown → OpenSearchHighlightBuilderhighlightsarray parallel todatarows, containing per-field highlighted fragmentsRelated Issues
Sample Request / Response
Details
Check List
--signoffor-s.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.