-
Notifications
You must be signed in to change notification settings - Fork 271
Make FieldExistenceRule check for hidden fields #3264
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
Open
foster33
wants to merge
10
commits into
integration
Choose a base branch
from
task/col-h-validation
base: integration
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+105
−5
Open
Changes from all commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
705778d
Add validation check for hidden fields
foster33 9ca49b6
Merge integration & resolve conflicts
foster33 c180caf
Merge branch 'integration' into task/col-h-validation
foster33 47b63b2
improvements to hidden field check
foster33 c3f0884
Remove unused config
foster33 ba8a433
Feedback improvements
foster33 198f1c8
Feedback & Fix test failures
foster33 002e2f9
Merge branch 'integration' into task/col-h-validation
foster33 3f2c9a5
Improvements & PR Feedback Changes
foster33 d05e68a
Cleanup
foster33 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -717,6 +717,30 @@ public boolean isTokenized(String fieldName, Set<String> ingestTypeFilter) throw | |
| } | ||
| } | ||
|
|
||
| /** | ||
| * Get the set of hidden fields for the provided ingest type filter. A null or empty filter indicates all hidden fields should be returned. | ||
| * | ||
| * @param ingestTypeFilter | ||
| * the ingest type filter | ||
| * @return the set of hidden fields given the provided ingest type filter | ||
| * @throws TableNotFoundException | ||
| * if the table does not exist | ||
| */ | ||
| public Set<String> getHiddenFields(Set<String> ingestTypeFilter) throws TableNotFoundException { | ||
|
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It may be beneficial to make this method cacheable as well with |
||
|
|
||
| Multimap<String,String> hiddenFields = this.allFieldMetadataHelper.loadHiddenFields(); | ||
|
|
||
| Set<String> fields = new HashSet<>(); | ||
| if (ingestTypeFilter == null || ingestTypeFilter.isEmpty()) { | ||
| fields.addAll(hiddenFields.values()); | ||
| } else { | ||
| for (String datatype : ingestTypeFilter) { | ||
| fields.addAll(hiddenFields.get(datatype)); | ||
| } | ||
| } | ||
| return Collections.unmodifiableSet(fields); | ||
| } | ||
|
|
||
| /** | ||
| * Returns a Set of all TextNormalizers in use by any type in Accumulo | ||
| * | ||
|
|
@@ -2155,5 +2179,4 @@ public static IteratorSetting getCQRegexFilter(String regex) { | |
| RegExFilter.setRegexs(cqRegex, null, null, regex, null, false); | ||
| return cqRegex; | ||
| } | ||
|
|
||
| } | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Can you add a unit test for this method?