Repository navigation
[Backport 3.9] Prune indices by request-level time bounds before the schema is resolved (#5766, #5852) - #5863
Conversation
…ved (opensearch-project#5766) (cherry picked from commit f40bfdd) Signed-off-by: Kai Huang <[email protected]>
…h-project#5852) * Encode time bounds once for a comma-separated source With request-level time bounds, AstBuilder encoded the bounds onto every source of a comma-separated list, and Relation then joined the sources with commas. TimeBounds uses a comma as its own separator and decodes only the last block, so `source=a,b` decoded to a garbled name and failed with "no such index". For a cross-cluster source the `cluster:` strip then cut at the colon in the timestamp, giving "no such index [55:54]". Encode the bounds onto the last source only, so the joined name ends in a single block and decodes to every source with its bounds. Signed-off-by: Kai Huang <[email protected]> * Cover comma-separated sources with time bounds end to end A request with time bounds over a comma-separated source returns its rows, and pruning still drops the out-of-range index from every entry of the list. Signed-off-by: Kai Huang <[email protected]> --------- Signed-off-by: Kai Huang <[email protected]> (cherry picked from commit 866dafc) Signed-off-by: Kai Huang <[email protected]>
PR Reviewer Guide 🔍Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Explore these optional code suggestions:
|
Codecov Report❌ Patch coverage is ❌ Your project check has failed because the head coverage (62.89%) is below the target coverage (99.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## 3.9 #5863 +/- ##
============================================
+ Coverage 62.86% 62.89% +0.02%
- Complexity 8782 8819 +37
============================================
Files 938 939 +1
Lines 40145 40235 +90
Branches 4519 4531 +12
============================================
+ Hits 25238 25304 +66
- Misses 14106 14125 +19
- Partials 801 806 +5
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Description
Backport of #5766 to
3.9, together with its follow-up fix #5852 (comma-separated sources with request-level time bounds returned 404). #5852 fixes a bug introduced by #5766 and doesn't apply without it, so both go in one PR.Both commits cherry-pick cleanly and match
main.Verified on this branch:
spotlessCheck, unit tests forcommon,core,ppl,opensearchandopensearch-sql-plugin, and:integ-test:compileTestJava.Related Issues
Backport of #5766 and #5852
Check List
--signoff.By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.