-
Notifications
You must be signed in to change notification settings - Fork 995
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
[core] Introduce InPredicateVisitor to refactor Predicate handle #4486
Conversation
break; | ||
} | ||
} | ||
Optional<List<Object>> leafs = |
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.
Why here has no judge of : (compoundPredicate.function() instanceof Or) ?
But SchemasTable and TagsTable both judged?
Optional<List<Object>> leafs = | ||
InPredicateVisitor.extractInElements(predicate, TAG_NAME); | ||
if (leafs.isPresent()) { | ||
leafs.get().stream() | ||
.forEach( | ||
leaf -> { | ||
if (tagManager.tagExists(leaf.toString())) { | ||
predicateMap.put( | ||
leaf.toString(), | ||
tagManager.tag(leaf.toString())); | ||
} | ||
}); |
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.
InPredicateVisitor.extractInElements(predicate, TAG_NAME) .ifPresent(leafs -> leafs .forEach( leaf -> { String leftName = leaf.toString(); if (tagManager.tagExists(leftName)) { predicateMap.put( leftName, tagManager.tag(leftName)); } }));
Optional<List<Object>> leafs = | ||
InPredicateVisitor.extractInElements(predicate, leafName); | ||
if (leafs.isPresent()) { | ||
leafs.get().stream() | ||
.forEach(leaf -> snapshotIds.add(Long.parseLong(leaf.toString()))); |
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.
InPredicateVisitor.extractInElements(predicate, leafName)
.ifPresent(leafs -> leafs
.forEach(leaf -> snapshotIds.add(Long.parseLong(leaf.toString()))));
Optional<List<Object>> leafs = | ||
InPredicateVisitor.extractInElements(predicate, leafName); | ||
if (leafs.isPresent()) { | ||
leafs.get().stream() | ||
.forEach(leaf -> schemaIds.add(Long.parseLong(leaf.toString()))); |
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.
InPredicateVisitor.extractInElements(predicate, leafName) .ifPresent(leafs -> leafs .forEach(leaf -> schemaIds.add(Long.parseLong(leaf.toString()))));
public class InPredicateVisitor { | ||
|
||
/** | ||
* Method for handling with CompoundPredicate. |
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.
Method for handling with In CompoundPredicate
@wwj6591812 had addressed, Thanks. |
+1 |
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.
+1
Purpose
Linked issue: close #xxx
from: #4469
Tests
API and Format
Documentation