Class RexCallBinding

    • Field Detail

      • operands

        private final java.util.List<RexNode> operands
      • inputCollations

        private final java.util.List<RelCollation> inputCollations
    • Method Detail

      • getStringLiteralOperand

        public java.lang.String getStringLiteralOperand​(int ordinal)
        Description copied from class: SqlOperatorBinding
        Gets the string value of a string literal operand.
        Overrides:
        getStringLiteralOperand in class SqlOperatorBinding
        Parameters:
        ordinal - zero-based ordinal of operand of interest
        Returns:
        string value
      • getIntLiteralOperand

        public int getIntLiteralOperand​(int ordinal)
        Description copied from class: SqlOperatorBinding
        Gets the integer value of a numeric literal operand.
        Overrides:
        getIntLiteralOperand in class SqlOperatorBinding
        Parameters:
        ordinal - zero-based ordinal of operand of interest
        Returns:
        integer value
      • getOperandLiteralValue

        public <T> T getOperandLiteralValue​(int ordinal,
                                            java.lang.Class<T> clazz)
        Description copied from class: SqlOperatorBinding
        Gets the value of a literal operand.

        Cases:

        • If the operand is not a literal, the value is null.
        • If the operand is a string literal, the value will be of type NlsString.
        • If the operand is a numeric literal, the value will be of type BigDecimal.
        • If the operand is an interval qualifier, the value will be of type SqlIntervalQualifier
        • Otherwise the type is undefined, and the value may be null.
        Overrides:
        getOperandLiteralValue in class SqlOperatorBinding
        Parameters:
        ordinal - zero-based ordinal of operand of interest
        clazz - Desired valued type
        Returns:
        value of operand
      • isOperandNull

        public boolean isOperandNull​(int ordinal,
                                     boolean allowCast)
        Description copied from class: SqlOperatorBinding
        Determines whether a bound operand is NULL.

        This is only relevant for SQL validation.

        Overrides:
        isOperandNull in class SqlOperatorBinding
        Parameters:
        ordinal - zero-based ordinal of operand of interest
        allowCast - whether to regard CAST(constant) as a constant
        Returns:
        whether operand is null; false for everything except SQL validation
      • isOperandLiteral

        public boolean isOperandLiteral​(int ordinal,
                                        boolean allowCast)
        Description copied from class: SqlOperatorBinding
        Determines whether an operand is a literal.
        Overrides:
        isOperandLiteral in class SqlOperatorBinding
        Parameters:
        ordinal - zero-based ordinal of operand of interest
        allowCast - whether to regard CAST(literal) as a literal
        Returns:
        whether operand is literal
      • getOperandType

        public RelDataType getOperandType​(int ordinal)
        Description copied from class: SqlOperatorBinding
        Gets the type of a bound operand.
        Specified by:
        getOperandType in class SqlOperatorBinding
        Parameters:
        ordinal - zero-based ordinal of operand of interest
        Returns:
        bound operand type