Class RexMultisetUtil

java.lang.Object
org.apache.calcite.rex.RexMultisetUtil

public class RexMultisetUtil extends Object
Utility class for various methods related to multisets.
  • Method Details

    • containsMixing

      public static boolean containsMixing(RexProgram program)
      Returns true if any expression in a program contains a mixing between multiset and non-multiset calls.
    • containsMixing

      public static boolean containsMixing(RexNode node)
      Returns true if a node contains a mixing between multiset and non-multiset calls.
    • containsMultiset

      public static boolean containsMultiset(RexNode node, boolean deep)
      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 - Expression
      deep - If true, returns whether expression contains a multiset. If false, returns whether expression is a multiset.
    • containsMultiset

      public static boolean containsMultiset(List<RexNode> nodes, boolean deep)
      Returns whether a list of expressions contains a multiset.
    • containsMultiset

      public static boolean containsMultiset(RexProgram program)
      Returns whether a program contains a multiset.
    • isMultisetCast

      public static boolean isMultisetCast(RexCall call)
      Returns true if call is a call to CAST and the to/from cast types are of multiset types.
    • findFirstMultiset

      public static @Nullable RexCall findFirstMultiset(RexNode node, boolean deep)
      Returns a reference to the first found multiset call or null if none was found.