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

   Thanks @Jackie-Jiang — agreed on both points, and reworked accordingly 
(pushed).
   
   **No more node-level config.** `JsonPathFastPathMode`, the two 
`CommonConstants` keys, and the `ServiceStartableUtils` wiring are all removed. 
`jsonExtractScalar` and the existing `jsonPath*` functions revert to pure 
Jayway — existing queries are unchanged.
   
   **Opt-in per expression instead**, so early exit is a per-field choice as 
you noted (some columns can use it, others can't). New streaming overloads:
   ```
   jsonPathString(json, path, defaultValue, earlyExit)
   jsonPathLong  (json, path, defaultValue, earlyExit)
   jsonPathDouble(json, path, defaultValue, earlyExit)
   ```
   Each resolves a simple linear path in a single streaming pass and falls back 
to Jayway for complex paths / non-JSON, so the result matches the existing 
overload; `earlyExit` is the per-field knob for the two documented divergences. 
A `FunctionRegistry` test confirms the new 4-arg signatures resolve and the 
boolean literal converts through the SQL path.
   
   Two open items for your call:
   1. **Naming** — I used 4-arg overloads of the existing names (arity is 
already how `jsonPathString` overloads today) so there's nothing new to learn, 
but happy to switch to distinct names (e.g. a `jsonExtract*` family) if you'd 
prefer the engine choice be explicit rather than implied by the extra arg.
   2. I kept this to the **scalar** functions per your suggestion. The typed 
`jsonExtractScalar` **transform** function (the column-optimized ingestion 
path) and the single-pass **multi-path** extractor are left as follow-ups — let 
me know if you'd rather fold a streaming transform variant into this PR.


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