Class PythonUtil


  • public class PythonUtil
    extends Object
    Utility for Python.
    • Constructor Detail

      • PythonUtil

        public PythonUtil()
    • Method Detail

      • containsPythonCall

        public static boolean containsPythonCall​(org.apache.calcite.rex.RexNode node,
                                                 PythonFunctionKind pythonFunctionKind)
        Checks whether it contains the specified kind of Python function call in the specified node. If the parameter pythonFunctionKind is null, it will return true for any kind of Python function.
        Parameters:
        node - the RexNode to check
        pythonFunctionKind - the kind of the python function
        Returns:
        true if it contains the Python function call in the specified node.
      • containsPythonCall

        public static boolean containsPythonCall​(org.apache.calcite.rex.RexNode node)
      • containsNonPythonCall

        public static boolean containsNonPythonCall​(org.apache.calcite.rex.RexNode node)
        Checks whether it contains non-Python function call in the specified node.
        Parameters:
        node - the RexNode to check
        Returns:
        true if it contains the non-Python function call in the specified node.
      • isPythonCall

        public static boolean isPythonCall​(org.apache.calcite.rex.RexNode node,
                                           PythonFunctionKind pythonFunctionKind)
        Checks whether the specified node is the specified kind of Python function call. If the parameter pythonFunctionKind is null, it will return true for any kind of Python function.
        Parameters:
        node - the RexNode to check
        pythonFunctionKind - the kind of the python function
        Returns:
        true if the specified node is a Python function call.
      • isPythonCall

        public static boolean isPythonCall​(org.apache.calcite.rex.RexNode node)
      • isNonPythonCall

        public static boolean isNonPythonCall​(org.apache.calcite.rex.RexNode node)
        Checks whether the specified node is a non-Python function call.
        Parameters:
        node - the RexNode to check
        Returns:
        true if the specified node is a non-Python function call.
      • isPythonAggregate

        public static boolean isPythonAggregate​(org.apache.calcite.rel.core.AggregateCall call)
      • isPythonAggregate

        public static boolean isPythonAggregate​(org.apache.calcite.rel.core.AggregateCall call,
                                                PythonFunctionKind pythonFunctionKind)
        Checks whether the specified aggregate is the specified kind of Python function Aggregate.
        Parameters:
        call - the AggregateCall to check
        pythonFunctionKind - the kind of the python function
        Returns:
        true if the specified call is a Python function Aggregate.
      • isBuiltInAggregate

        public static boolean isBuiltInAggregate​(org.apache.calcite.rel.core.AggregateCall call)
      • takesRowAsInput

        public static boolean takesRowAsInput​(org.apache.calcite.rex.RexCall call)
      • isFlattenCalc

        public static boolean isFlattenCalc​(org.apache.flink.table.planner.plan.nodes.logical.FlinkLogicalCalc calc)