Package org.apache.calcite.rex
Class RexMultisetUtil
java.lang.Object
org.apache.calcite.rex.RexMultisetUtil
Utility class for various methods related to multisets.
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
containsMixing
(RexNode node) Returns true if a node contains a mixing between multiset and non-multiset calls.static boolean
containsMixing
(RexProgram program) Returns true if any expression in a program contains a mixing between multiset and non-multiset calls.static boolean
containsMultiset
(List<RexNode> nodes, boolean deep) Returns whether a list of expressions contains a multiset.static boolean
containsMultiset
(RexNode node, boolean deep) Returns true if node contains a multiset operator, otherwise false.static boolean
containsMultiset
(RexProgram program) Returns whether a program contains a multiset.static @Nullable RexCall
findFirstMultiset
(RexNode node, boolean deep) Returns a reference to the first found multiset call or null if none was found.static boolean
isMultisetCast
(RexCall call) Returns true ifcall
is a call toCAST
and the to/from cast types are of multiset types.
-
Method Details
-
containsMixing
Returns true if any expression in a program contains a mixing between multiset and non-multiset calls. -
containsMixing
Returns true if a node contains a mixing between multiset and non-multiset calls. -
containsMultiset
Returns true if node contains a multiset operator, otherwise false. Use it with deep=false when checking if a RexCall is a multiset call.- Parameters:
node
- Expressiondeep
- If true, returns whether expression contains a multiset. If false, returns whether expression is a multiset.
-
containsMultiset
Returns whether a list of expressions contains a multiset. -
containsMultiset
Returns whether a program contains a multiset. -
isMultisetCast
Returns true ifcall
is a call toCAST
and the to/from cast types are of multiset types. -
findFirstMultiset
Returns a reference to the first found multiset call or null if none was found.
-