PARQUET-34: Extend Contains support to all ColumnFilterPredicate types#1370
Merged
gszadovszky merged 2 commits intoapache:masterfrom Jun 14, 2024
Merged
Conversation
clairemcginty
commented
Jun 4, 2024
| add(" set = true;\n"); | ||
|
|
||
| add(" break;\n"); | ||
| add(" setResult(true);\n return;\n"); |
Contributor
Author
There was a problem hiding this comment.
I simplified the existing ValueInspector logic a bit for In/NotIn here. Previously it was:
@Override
public void update(int value) {
boolean set = false;
for (int i : target) {
if(comparator.compare(value, i) != 0) {
setResult(true);
set = true;
break;
}
}
if (!set) setResult(false);
}
};
}Now it's:
@Override
public void update(int value) {
for (int i : target) {
if(comparator.compare(value, i) == 0 ) {
setResult(true);
return;
}
}
setResult(false);
}
wgtmac
approved these changes
Jun 13, 2024
Member
wgtmac
left a comment
There was a problem hiding this comment.
+1
Sorry for the delay. cc @gszadovszky
gszadovszky
approved these changes
Jun 13, 2024
Contributor
gszadovszky
left a comment
There was a problem hiding this comment.
Looks good to me! I have just one nit comment.
Comment on lines
+430
to
+433
| || underlying instanceof SetColumnFilterPredicate | ||
| && ((SetColumnFilterPredicate) underlying) | ||
| .getValues() | ||
| .contains(null)) { |
Contributor
There was a problem hiding this comment.
nit: I know it means the same logically, but I think it is more readable to wrap in a parenthesis since the instanceof and the related cast are tightly related.
Contributor
Author
There was a problem hiding this comment.
makes sense! updated
gszadovszky
approved these changes
Jun 14, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follows up on this discussion from #1328 to fast-follow by expanding
Containspredicate support from onlyEq<T>to allColumnFilterPredicate<T>types.Jira
them in the PR title. For example, "PARQUET-1234: My Parquet PR"
the ASF 3rd Party License Policy.
Tests
Commits
from "How to write a good git commit message":
Style
mvn spotless:apply -Pvector-pluginsDocumentation