pinot
pinot copied to clipboard
Add a flexible json config way
Json index is a frequently used feature but currently with very limited configuration ways. Users could only have a global max level or array index limit. The existing includePaths/excludePaths(fields) could only do binary include or exclude. There are requirement like following cannot be fulfilled:
Set global max level as 3, but 5 or infinite levels on a particular key "$.request" Include a prefix path "$.a.b.c" but with more or less max levels Enable array json index on some path "$.a.b" only Having includePaths filter with wildcard like matching instead of prefix match only, e.g. "$.*.a.b" This PR introduced a new json config parameter indexPaths which could be configured with:
Matching infinite levels from a prefix with ** or a.** Matching one single level from a prefix and with its following suffix with a.b..c.d Global max level setup or max level with prefix (e.g. 3 levels global and 5 levels after prefix) with .. or a.b.....* Json index configuration within an array a..* to match {"a": ["b": 1, "c": 2]}
Codecov Report
Attention: Patch coverage is 88.23529% with 6 lines in your changes missing coverage. Please review.
Project coverage is 63.78%. Comparing base (
59551e4) to head (bc02c83). Report is 1475 commits behind head on master.
| Files with missing lines | Patch % | Lines |
|---|---|---|
| ...ain/java/org/apache/pinot/spi/utils/JsonUtils.java | 87.23% | 1 Missing and 5 partials :warning: |
Additional details and impacted files
@@ Coverage Diff @@
## master #14229 +/- ##
============================================
+ Coverage 61.75% 63.78% +2.02%
- Complexity 207 1555 +1348
============================================
Files 2436 2660 +224
Lines 133233 146014 +12781
Branches 20636 22367 +1731
============================================
+ Hits 82274 93129 +10855
- Misses 44911 45998 +1087
- Partials 6048 6887 +839
| Flag | Coverage Δ | |
|---|---|---|
| custom-integration1 | 100.00% <ø> (+99.99%) |
:arrow_up: |
| integration | 100.00% <ø> (+99.99%) |
:arrow_up: |
| integration1 | 100.00% <ø> (+99.99%) |
:arrow_up: |
| integration2 | 0.00% <ø> (ø) |
|
| java-11 | 63.76% <88.23%> (+2.05%) |
:arrow_up: |
| java-21 | 63.65% <88.23%> (+2.03%) |
:arrow_up: |
| skip-bytebuffers-false | 63.77% <88.23%> (+2.02%) |
:arrow_up: |
| skip-bytebuffers-true | 63.63% <88.23%> (+35.90%) |
:arrow_up: |
| temurin | 63.78% <88.23%> (+2.02%) |
:arrow_up: |
| unittests | 63.77% <88.23%> (+2.02%) |
:arrow_up: |
| unittests1 | 55.50% <88.23%> (+8.61%) |
:arrow_up: |
| unittests2 | 34.13% <0.00%> (+6.40%) |
:arrow_up: |
Flags with carried forward coverage won't be shown. Click here to find out more.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Can you help also update the pinot doc for this feature?
Can you help also update the pinot doc for this feature?
Thanks for bringing up, created https://github.com/pinot-contrib/pinot-docs/pull/398