You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@pinot.apache.org by "raghavyadav01 (via GitHub)" <gi...@apache.org> on 2026/10/13 23:12:49 UTC

[PR] Serve JSON_MATCH on an OPEN_STRUCT column from its sparse blob JSON index [pinot]

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

   An `OPEN_STRUCT` column keeps its JSON index on the sparse blob child rather than on the column
   itself, so `dataSource.getJsonIndex()` returns `null` and `JSON_MATCH` is refused outright with
   `Cannot apply JSON_MATCH on column: <col> without json index` — even though the blob is a real
   JSON document and the index over it can answer paths into it.
   
   That left paths into arrays and nested values with no index-served spelling at all. `col['key']`
   reaches the same index through `MapFilterOperator`, but it can only name a whole key, so anything
   inside an array had to be pulled apart with `JSON_EXTRACT_SCALAR`, which scans.
   
   This makes `JSON_MATCH` fall back to the blob's index when the column has none of its own.
   
   ## The part that needs care
   
   The index may answer only what the blob actually holds. A materialized key is lifted into its own
   dense column and is **never written to the blob**, so a path naming one has no postings — serving
   it from the index would answer "no documents match" confidently and wrongly.
   
   `col['key']` is immune to this because `MapFilterOperator` resolves the key's own `DataSource`
   first and takes the index only when the key is sparse. `JSON_MATCH` names its paths inside an
   opaque filter string, so the same check has to be done at plan time: the filter is parsed and
   every top-level key it names is checked against `isMaterialized` and `isPathIndexed`. Any path
   that fails leaves the existing refusal in place.
   
   Refusing is the right failure here — `JSON_MATCH` has no scan to fall back to, so the alternative
   to "cannot apply" would be a confidently empty answer.
   
   ## Tests
   
   Five cases in `FilterPlanNodeTest`:
   
   - a sparse path is served from the blob's index
   - a materialized key is refused rather than answered from the blob, and the index is never consulted
   - a path the index does not hold is refused
   - an `AND` where only one of two paths is materialized is refused — every path has to clear the bar
   - a column with no blob index is refused exactly as before
   
   `FilterPlanNodeTest` 33/33, plus `MapFilterOperatorOpenStructTest`, `JsonMatchQueriesTest`,
   `JsonMatchQueriesWithDisableUnnestTest`, `ProjectionBlockOpenStructTest` and `JsonPathQueriesTest`
   green (51 tests).
   
   Verified end to end on a cluster as well: a path into an array element returns the same count as
   the equivalent `JSON_EXTRACT_SCALAR` predicate with `numEntriesScannedInFilter = 0`, and a path
   naming a materialized key still refuses.
   
   ## Behaviour change
   
   Only for `JSON_MATCH` on an `OPEN_STRUCT` column, which fails today. Every other column is
   untouched: the new branch is reached only when `getJsonIndex()` and the composite index lookup
   both return `null` **and** the data source is an `OpenStructDataSource`.
   


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] [DRAFT]Serve JSON_MATCH on an OPEN_STRUCT column from its sparse blob JSON index [pinot]

Posted by "codecov-commenter (via GitHub)" <gi...@apache.org>.
codecov-commenter commented on PR #19858:
URL: https://github.com/apache/pinot/pull/19858#issuecomment-6159557731

   ## [Codecov](https://app.codecov.io/gh/apache/pinot/pull/19858?dropdown=coverage&src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) Report
   :x: Patch coverage is `0%` with `37 lines` in your changes missing coverage. Please review.
   :white_check_mark: Project coverage is 40.68%. Comparing base ([`db47c06`](https://app.codecov.io/gh/apache/pinot/commit/db47c062b04158cf599a44d597c8dc4aba294cb8?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)) to head ([`04760b1`](https://app.codecov.io/gh/apache/pinot/commit/04760b168e05a67f1190607a0deb97069a78a9d3?dropdown=coverage&el=desc&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache)).
   :warning: Report is 6 commits behind head on master.
   
   | [Files with missing lines](https://app.codecov.io/gh/apache/pinot/pull/19858?dropdown=coverage&src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Patch % | Lines |
   |---|---|---|
   | [...ava/org/apache/pinot/core/plan/FilterPlanNode.java](https://app.codecov.io/gh/apache/pinot/pull/19858?src=pr&el=tree&filepath=pinot-core%2Fsrc%2Fmain%2Fjava%2Forg%2Fapache%2Fpinot%2Fcore%2Fplan%2FFilterPlanNode.java&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#diff-cGlub3QtY29yZS9zcmMvbWFpbi9qYXZhL29yZy9hcGFjaGUvcGlub3QvY29yZS9wbGFuL0ZpbHRlclBsYW5Ob2RlLmphdmE=) | 0.00% | [37 Missing :warning: ](https://app.codecov.io/gh/apache/pinot/pull/19858?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) |
   > :exclamation:  There is a different number of reports uploaded between BASE (db47c06) and HEAD (04760b1). Click for more details.
   > 
   > <details><summary>HEAD has 14 uploads less than BASE</summary>
   >
   >| Flag | BASE (db47c06) | HEAD (04760b1) |
   >|------|------|------|
   >|lane-a|1|0|
   >|integration|2|0|
   >|java-25|4|1|
   >|integration1|2|0|
   >|temurin|4|1|
   >|lane-b|1|0|
   >|unittests|2|1|
   >|unittests1|1|0|
   ></details>
   
   <details><summary>Additional details and impacted files</summary>
   
   
   
   ```diff
   @@              Coverage Diff              @@
   ##             master   #19858       +/-   ##
   =============================================
   - Coverage     68.94%   40.68%   -28.26%     
   + Complexity     1491     1484        -7     
   =============================================
     Files          3533     3533               
     Lines        231767   231771        +4     
     Branches      36985    36990        +5     
   =============================================
   - Hits         159781    94303    -65478     
   - Misses        59579   129055    +69476     
   + Partials      12407     8413     -3994     
   ```
   
   | [Flag](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flags&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | Coverage Δ | |
   |---|---|---|
   | [integration](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [integration1](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [java-25](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.68% <0.00%> (-28.26%)` | :arrow_down: |
   | [lane-a](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [lane-b](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [temurin](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.68% <0.00%> (-28.26%)` | :arrow_down: |
   | [unittests](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.68% <0.00%> (-28.25%)` | :arrow_down: |
   | [unittests1](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `?` | |
   | [unittests2](https://app.codecov.io/gh/apache/pinot/pull/19858/flags?src=pr&el=flag&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache) | `40.68% <0.00%> (-0.01%)` | :arrow_down: |
   
   Flags with carried forward coverage won't be shown. [Click here](https://docs.codecov.io/docs/carryforward-flags?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache#carryforward-flags-in-the-pull-request-comment) to find out more.
   </details>
   
   [:umbrella: View full report in Codecov by Harness](https://app.codecov.io/gh/apache/pinot/pull/19858?dropdown=coverage&src=pr&el=continue&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).   
   :loudspeaker: Have feedback on the report? [Share it here](https://about.codecov.io/codecov-pr-comment-feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=apache).
   <details><summary> :rocket: New features to boost your workflow: </summary>
   
   - :package: [JS Bundle Analysis](https://docs.codecov.com/docs/javascript-bundle-analysis): Save yourself from yourself by tracking and limiting bundle sizes in JS merges.
   </details>


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org


Re: [PR] [DRAFT]Serve JSON_MATCH on an OPEN_STRUCT column from its sparse blob JSON index [pinot]

Posted by "raghavyadav01 (via GitHub)" <gi...@apache.org>.
raghavyadav01 closed pull request #19858: [DRAFT]Serve JSON_MATCH on an OPEN_STRUCT column from its sparse blob JSON index
URL: https://github.com/apache/pinot/pull/19858


-- 
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: commits-unsubscribe@pinot.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@pinot.apache.org
For additional commands, e-mail: commits-help@pinot.apache.org