danny0405 commented on code in PR #8051:
URL: https://github.com/apache/hudi/pull/8051#discussion_r1129059876


##########
hudi-flink-datasource/hudi-flink/src/main/java/org/apache/hudi/util/EvaluatorUtils.java:
##########
@@ -0,0 +1,218 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *      http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.apache.hudi.util;
+
+import org.apache.hudi.common.util.ValidationUtils;
+import org.apache.hudi.source.evaluator.AlwaysFalse;
+import org.apache.hudi.source.evaluator.And;
+import org.apache.hudi.source.evaluator.EqualTo;
+import org.apache.hudi.source.evaluator.Evaluator;
+import org.apache.hudi.source.evaluator.GreaterThan;
+import org.apache.hudi.source.evaluator.GreaterThanOrEqual;
+import org.apache.hudi.source.evaluator.In;
+import org.apache.hudi.source.evaluator.IsNotNull;
+import org.apache.hudi.source.evaluator.IsNull;
+import org.apache.hudi.source.evaluator.LessThan;
+import org.apache.hudi.source.evaluator.LessThanOrEqual;
+import org.apache.hudi.source.evaluator.Not;
+import org.apache.hudi.source.evaluator.NotEqualTo;
+import org.apache.hudi.source.evaluator.NullFalseEvaluator;
+import org.apache.hudi.source.evaluator.Or;
+
+import org.apache.flink.table.expressions.CallExpression;
+import org.apache.flink.table.expressions.Expression;
+import org.apache.flink.table.expressions.FieldReferenceExpression;
+import org.apache.flink.table.expressions.ResolvedExpression;
+import org.apache.flink.table.expressions.ValueLiteralExpression;
+import org.apache.flink.table.functions.BuiltInFunctionDefinitions;
+import org.apache.flink.table.functions.FunctionDefinition;
+import org.apache.flink.table.types.logical.LogicalType;
+
+import javax.validation.constraints.NotNull;
+
+import java.math.BigDecimal;
+import java.util.ArrayList;
+import java.util.List;
+import java.util.stream.Collectors;
+
+/**
+ * Utilities for evaluators.
+ */
+public class EvaluatorUtils {
+
+  /**

Review Comment:
   Understood, my point is the Evaluator class is not a user API, it is a 
developer API and I want to hide the complexity of the impls from different 
evaluators, we only expose the tool class `ExpressionEvaludators` to the 
invoker, that is the way I can think of the code can be cleaner.



-- 
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]

Reply via email to