Introduce a Parquet based doc values codec - #23055
manaslohani wants to merge 2 commits into
Conversation
PR Reviewer Guide 🔍(Review updated until commit 1757a40)Here are some key observations to aid the review process:
|
PR Code Suggestions ✨Latest suggestions up to 1757a40 Explore these optional code suggestions:
Previous suggestionsSuggestions up to commit 14aeb50
Suggestions up to commit d06196f
Suggestions up to commit a8b6817
Suggestions up to commit 46dd573
Suggestions up to commit 4cfe273
|
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #23055 +/- ##
============================================
+ Coverage 71.83% 71.85% +0.01%
- Complexity 77801 77826 +25
============================================
Files 6173 6173
Lines 360563 360578 +15
Branches 52479 52483 +4
============================================
+ Hits 259016 259081 +65
+ Misses 81049 80927 -122
- Partials 20498 20570 +72 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
1f5ddd9 to
4cfe273
Compare
|
Persistent review updated to latest commit 4cfe273 |
4cfe273 to
46dd573
Compare
|
Persistent review updated to latest commit 46dd573 |
|
Persistent review updated to latest commit a8b6817 |
a8b6817 to
d06196f
Compare
|
Persistent review updated to latest commit d06196f |
| } | ||
| } | ||
|
|
||
| /** Scales of the long-encoded {@code major.minor.patch} version: {@code major*1_000_000 + minor*1_000 + patch}. */ |
There was a problem hiding this comment.
everywhere why do we need a long ? i think we just need a version for the file format, we don't need to tie it to a release. A simple integer starting from 1 will work. Take Lucene90DocValuesConsumer for example.
|
Persistent review updated to latest commit 14aeb50 |
Plugin-scope extraction of the Parquet doc-values read path from opensearch-project#22752: the codec core (reader wrappers, field admission, producer, iterator), the format-version stamp on the writer side, and the Rust cursor. The plugin wires itself in via IndexModule#setReaderWrapper; the path stays dormant until composite searcher acquisition lands in the server module (kept in opensearch-project#22752 pending the shard/engine/searcher LLD). Unit-tested at plugin scope; end-to-end integration tests remain with opensearch-project#22752. Signed-off-by: Manas Lohani <manloh@amazon.com>
Use a plain integer format version: the writer stamps "1" and the reader gates on an integer range, replacing the encoded major.minor.patch scheme. Expose all numeric fields as SORTED_NUMERIC doc values; getNumericDocValues returns null per the CodecReader contract. Reject negative pointers in store_from_ptr. Scope the doc-values producer to the segment core: a registry caches one producer per core cache key, created eagerly at wrap and closed by the core closed-listener. The per-request leaf is reduced to a cursor registry whose close releases only the cursors that request opened; cursors stay dedicated per consumer. Skip absent rows in advance() using the decoded batch's presence bitmap instead of stepping one document at a time. Signed-off-by: Manas Lohani <manloh@amazon.com>
14aeb50 to
1757a40
Compare
|
Persistent review updated to latest commit 1757a40 |
Description
Introduces a Parquet-based doc-values codec at plugin scope. This is the read-path extraction from #22752, split out so the codec can be reviewed and merged independently of the server-side searcher integration.
What this adds
FilterDirectoryReader/FilterLeafReaderpair that synthesizesFieldInfos for supported numeric fields present only in Parquet and serves their doc values through a Parquet-backed producer. Fields mappeddoc_values: falseare excluded from synthesis.ParquetDocValuesProducerwith fail-closed gates: anopensearch.format_versionfooter stamp check and anumRows == maxDoccheck; each doc-values iterator gets a dedicated forward-only native cursor, opened lazily and released with the leaf reader.long,integer,short,byte,double,float,date,date_nanos,unsigned_long,scaled_float,half_float,boolean.native-bridge-common, with a build-time equality test so the two cannot drift.What this intentionally does not add
The server-module integration that triggers this codec end to end (composite searcher acquisition) stays in #22752. Until that lands, this path is dormant: the plugin wires its reader wrapper via
IndexModule#setReaderWrapper, but no search on main reaches it.Testing
Unit tests at plugin scope: field admission, producer format-version and row-count gates, iterator contracts (null-presence bitmaps, backward-advance cursor reopen, multi-batch reloads), boolean reads at byte boundaries,
half_floatpinned to Lucene's exact sortable-short encoding, and a writer/reader format-version round trip. Rust-side cursor tests cover the new borrow kinds. End-to-end integration tests live with #22752.Related Issues
Related to #22752 (server-side integration and end-to-end tests).
Check List
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.