linliu-code commented on code in PR #13300:
URL: https://github.com/apache/hudi/pull/13300#discussion_r2103447548
##########
hudi-common/src/main/java/org/apache/hudi/expression/Predicates.java:
##########
@@ -406,4 +406,40 @@ public Boolean eval(StructLike data) {
}
}
}
+
+ public static class StringStartsWithAny implements Predicate {
+ private final Operator operator;
+ private final Expression left;
+ private final List<Expression> right;
+
+ public StringStartsWithAny(Expression left, List<Expression> right) {
+ this.left = left;
+ this.operator = Operator.STARTS_WITH;
+ this.right = right;
+ }
+
+ @Override
+ public List<Expression> getChildren() {
+ List<Expression> children = new ArrayList<>();
+ children.add(left);
+ children.addAll(right);
+ return children;
+ }
+
+ @Override
+ public Operator getOperator() {
+ return operator;
+ }
+
+ @Override
+ public Object eval(StructLike data) {
+ for (Expression e : right) {
+ Expression exp = new StringStartsWith(left, e);
Review Comment:
But in current PR, the eval is not triggerd since they are transformed into
keySpec for log files, and set of strings for base files.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]