EmmyMiao87 commented on code in PR #9506:
URL: https://github.com/apache/incubator-doris/pull/9506#discussion_r870907861
##########
fe/fe-core/src/main/java/org/apache/doris/nereids/trees/expressions/ComparisonPredicate.java:
##########
@@ -18,42 +18,39 @@
package org.apache.doris.nereids.trees.expressions;
import org.apache.doris.nereids.exceptions.UnboundException;
-import org.apache.doris.nereids.trees.AbstractTreeNode;
import org.apache.doris.nereids.trees.NodeType;
+import org.apache.doris.nereids.types.BooleanType;
import org.apache.doris.nereids.types.DataType;
-import java.util.List;
-
/**
- * Abstract class for all Expression in Nereids.
+ * Comparison predicate expression.
+ * Such as: "=", "!=", "<", "<=", ">", ">=", "<=>"
*/
-public abstract class AbstractExpression<EXPR_TYPE extends
AbstractExpression<EXPR_TYPE>>
- extends AbstractTreeNode<EXPR_TYPE>
- implements Expression<EXPR_TYPE> {
-
- public AbstractExpression(NodeType type, Expression... children) {
- super(type, children);
- }
-
- public DataType getDataType() throws UnboundException {
- throw new UnboundException("dataType");
- }
-
- public String sql() throws UnboundException {
- throw new UnboundException("sql");
- }
-
- public boolean nullable() throws UnboundException {
- throw new UnboundException("nullable");
+public class ComparisonPredicate<
+ LEFT_CHILD_TYPE extends Expression,
+ RIGHT_CHILD_TYPE extends Expression>
+ extends Expression<ComparisonPredicate<LEFT_CHILD_TYPE, RIGHT_CHILD_TYPE>>
+ implements BinaryExpression<ComparisonPredicate<LEFT_CHILD_TYPE,
RIGHT_CHILD_TYPE>,
+ LEFT_CHILD_TYPE, RIGHT_CHILD_TYPE> {
+
+ /**
+ * Constructor of ComparisonPredicate.
+ *
+ * @param nodeType node type of expression
+ * @param left left child of comparison predicate
Review Comment:
My IDE's automatic format adjustment is based on this, so it looks better,
right?
--
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]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]