xiangfu0 commented on PR #19223:
URL: https://github.com/apache/pinot/pull/19223#issuecomment-5272178376

   ## Counterpart audit and expanded benchmark matrix
   
   I audited the public JSON function surface before adding APIs. No production 
Fory counterpart was missing:
   
   - `jsonPathStringFast(Object, String, String)` has 
`jsonPathStringFory(Object, String, String)`.
   - `jsonPathLongFast(Object, String, long)` has `jsonPathLongFory(Object, 
String, long)`.
   - `jsonPathDoubleFast(Object, String, double)` has 
`jsonPathDoubleFory(Object, String, double)`.
   - `jsonExtractScalar`, `jsonExtractScalarFast`, and `jsonExtractScalarFory` 
all support the same 3- and 4-argument transform signatures and are registered 
through the enum, transform factory, parser, and planner.
   
   The normal two-argument scalar overloads do not have Fast overloads either, 
so omitting Fory two-argument overloads is intentional parity. Generic 
`jsonPath`, array, and exists functions also have no Fast variants, so they are 
not Fory gaps.
   
   This follow-up adds:
   
   - production-wrapper JMH trios for String, Long, and Double: normal/Jayway, 
Fast, and Fory;
   - query `ValueBlock` trios for LONG and DOUBLE, with STRING available 
explicitly as a documented Jayway-fallback characterization;
   - early/late, 700 B/8 KiB/64 KiB, hit/missing, typed-default fixtures;
   - setup assertions that directly execute Fory, reject unavailable Fory, and 
then verify wrapper parity, preventing a silent Jayway fallback from being 
published as Fory performance;
   - missing Fast registry/evaluator coverage and corrected Fory result-type 
documentation.
   
   ### Local JMH results
   
   JDK 25.0.4, JMH 1.37, one thread, one fork, late-field hit, `5 x 2s` warmup, 
`5 x 2s` measurement, GC profiler. Throughput is in thousands of 
operations/rows per second. These are local one-fork measurements; the large 
documents intentionally contain one large skipped string and therefore stress 
Fory 1.6.0's current skip-string allocation behavior.
   
   #### Ingestion scalar functions
   
   | Type | JSON | Normal | Fast | Fory | Fory / Fast |
   | --- | ---: | ---: | ---: | ---: | ---: |
   | STRING | 700 B | 372.6k | 671.7k | 1,141.4k | 1.70x |
   | STRING | 8 KiB | 153.2k | 177.4k | 564.0k | 3.18x |
   | STRING | 64 KiB | 10.7k | 26.4k | 127.7k | 4.83x |
   | LONG | 700 B | 338.9k | 689.2k | 1,029.5k | 1.49x |
   | LONG | 8 KiB | 136.0k | 180.0k | 594.3k | 3.30x |
   | LONG | 64 KiB | 10.5k | 26.4k | 94.1k | 3.57x |
   | DOUBLE | 700 B | 192.0k | 625.8k | 821.0k | 1.31x |
   | DOUBLE | 8 KiB | 153.9k | 177.6k | 548.7k | 3.09x |
   | DOUBLE | 64 KiB | 10.8k | 27.0k | 118.8k | 4.39x |
   
   #### Query `jsonExtractScalar*` ValueBlock path
   
   JMH normalizes each 128-row invocation to one row.
   
   | Result type | JSON | Normal | Fast | Fory | Fory / Fast |
   | --- | ---: | ---: | ---: | ---: | ---: |
   | LONG | 700 B | 316.7k | 730.5k | 760.4k | 1.04x |
   | LONG | 8 KiB | 126.8k | 351.5k | 471.5k | 1.34x |
   | LONG | 64 KiB | 10.8k | 26.7k | 109.5k | 4.11x |
   | DOUBLE | 700 B | 307.1k | 632.4k | 779.0k | 1.23x |
   | DOUBLE | 8 KiB | 138.6k | 326.8k | 509.9k | 1.56x |
   | DOUBLE | 64 KiB | 10.7k | 26.8k | 109.3k | 4.08x |
   
   `jsonExtractScalarFory(..., 'STRING')` intentionally uses Jayway for 
precision/serialization parity, so it is not reported as Fory acceleration. The 
same is true for JSON, BIG_DECIMAL, arrays/containers, BYTES input, and complex 
paths.
   
   ### Allocation caveat
   
   Fory scalar allocation was approximately 1.1-1.2 KiB at 700 B, 8.6-8.7 KiB 
at 8 KiB, and 66 KiB at 64 KiB, versus roughly 0.7-1.0 KiB for Fast. Fory 1.6.0 
materializes large irrelevant strings because its public allocation-free skip 
path hashes every character and is substantially slower. Throughput is 
favorable here, but an upstream fast allocation-free string-skip API remains 
the main requirement before recommending broad production adoption.
   
   ### Validation
   
   - Focused common/core suites: 817 tests, 0 failures or errors.
   - Full `pinot-perf -am package -DskipTests`: 64 modules, build success.
   - Spotless, Checkstyle, license format, and license check passed for 
`pinot-common`, `pinot-core`, and `pinot-perf`.
   - `git diff --check` clean.
   
   Commit: `62c2db4b670153709edc03eb98bf70fcb53b5880`
   


-- 
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