xiangfu0 opened a new pull request, #19168:
URL: https://github.com/apache/pinot/pull/19168

   ## Description
   
   Consuming MAP key lookups currently materialize and deserialize the full MAP 
value before extracting one requested key. This change adds a selective 
forward-index read path that scans the serialized MAP entries and deserializes 
only the matching value.
   
   ## Changes
   
   - Add a default `ForwardIndexReader#getMapValue` API while preserving the 
existing full-MAP fallback.
   - Add a selective MAP-value deserializer that compares serialized UTF-8 key 
bytes without allocating non-matching values.
   - Add a read-only zero-copy view for mutable off-heap forward-index values.
   - Use the selective path from `MapKeyIndexReader` and add focused unit 
coverage.
   - Add `BenchmarkMapKeyAccess` for comparing full-map and selective lookup 
costs.
   
   ## Performance
   
   Isolated JMH run for a 64-entry MAP, looking up the last key, on JDK 25 (1 
fork, 2 warmup iterations, 3 measurement iterations):
   
   | Path | Score |
   | --- | ---: |
   | Full map copy + deserialize | 11.154 +/- 1.970 us/op |
   | Selective direct-buffer access | 0.609 +/- 0.077 us/op |
   
   The benchmark is an isolated forward-index lookup measurement; it does not 
represent an end-to-end broker/server query latency result.
   
   ## Validation
   
   - `./mvnw -pl pinot-spi,pinot-segment-local -am 
-Dtest=MapUtilsTest,VarByteSVMutableForwardIndexTest 
-Dsurefire.failIfNoSpecifiedTests=false test`
   - `./mvnw -pl pinot-perf -am -DskipTests package`
   - `./mvnw spotless:apply -pl 
pinot-spi,pinot-segment-spi,pinot-segment-local,pinot-perf`
   - `./mvnw license:format license:check -pl 
pinot-spi,pinot-segment-spi,pinot-segment-local,pinot-perf`
   - `git diff --check`
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to