Package io.delta.kernel.internal.util
Class ExpressionUtils
Object
io.delta.kernel.internal.util.ExpressionUtils
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic PredicateasPredicate(Expression expression) Return an expression cast as a predicate, throw an error if it is not a predicatestatic PredicatecreatePredicate(String name, Expression left, Expression right, Optional<CollationIdentifier> collationIdentifier) Utility method to create a binary predicate with an optional collation identifierstatic PredicatecreatePredicate(String name, List<Expression> children, Optional<CollationIdentifier> collationIdentifier) Utility method to create a predicate with an optional collation identifierstatic ExpressiongetLeft(Expression expression) Utility method to return the left child of the binary input expressionstatic ExpressiongetRight(Expression expression) Utility method to return the right child of the binary input expressionstatic ExpressiongetUnaryChild(Expression expression) Utility method to return the single child of the unary input expression
-
Constructor Details
-
ExpressionUtils
public ExpressionUtils()
-
-
Method Details
-
asPredicate
Return an expression cast as a predicate, throw an error if it is not a predicate -
getLeft
Utility method to return the left child of the binary input expression -
getRight
Utility method to return the right child of the binary input expression -
getUnaryChild
Utility method to return the single child of the unary input expression -
createPredicate
public static Predicate createPredicate(String name, List<Expression> children, Optional<CollationIdentifier> collationIdentifier) Utility method to create a predicate with an optional collation identifier -
createPredicate
public static Predicate createPredicate(String name, Expression left, Expression right, Optional<CollationIdentifier> collationIdentifier) Utility method to create a binary predicate with an optional collation identifier
-