New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add more options to json index #9543
Add more options to json index #9543
Conversation
Codecov Report
@@ Coverage Diff @@
## master #9543 +/- ##
============================================
+ Coverage 69.90% 69.94% +0.03%
- Complexity 4797 4876 +79
============================================
Files 1927 1930 +3
Lines 102729 102990 +261
Branches 15592 15622 +30
============================================
+ Hits 71811 72032 +221
- Misses 25847 25882 +35
- Partials 5071 5076 +5
Flags with carried forward coverage won't be shown. Click here to find out more.
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
5e2e099
to
07f2d4c
Compare
private boolean _disableCrossArrayUnnest = false; | ||
private Set<String> _includePaths; | ||
private Set<String> _excludePaths; | ||
private Set<String> _excludeFields; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to add an "_excludeTypes"?
for example, if the node is an array i will not need to enumerate them all out
also good to add a javadoc to explain which overwrites which (e.g. in both include and exclude, etc)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excludeArray
is for that purpose. IMO, excludeValue
and excludeObject
doesn't make a lot of sense for JSON.
Added javadoc to explain the behavior of each config.
Release Notes
Added
jsonIndexConfigs
(map from column to config) undertableIndexConfig
.The following configs are added to json column:
maxLevels
: max levels to flatten the json object (Limit the depth of Json index #9476), int, default -1 (unlimited levels)excludeArray
: do not flatten array, boolean, default falsedisableCrossArrayUnnest
: do not unnest multiple arrays (unique combination of all elements), boolean, default falseincludePaths
: only flatten the given paths, set of strings, default null (include all paths), example["$.a.b", "$.a.c[*]"]
excludePaths
: exclude the given paths when flattening, set of strings, default null (include all paths), example["$.a.b", "$.a.c[*]"]
excludeFields
: exclude the given fields when flattening, set of strings, default null (include all paths), example["b", "c"]
When
jsonIndexConfigs
is configured, the oldjsonIndexColumns
will be ignored.Example: