Class SqlNewOperator


  • public class SqlNewOperator
    extends SqlPrefixOperator
    SqlNewOperator represents an SQL new specification such as NEW UDT(1, 2). When used in an SqlCall, SqlNewOperator takes a single operand, which is an invocation of the constructor method; but when used in a RexCall, the operands are the initial values to be used for the new instance.
    • Constructor Detail

      • SqlNewOperator

        public SqlNewOperator()
    • Method Detail

      • rewriteCall

        public SqlNode rewriteCall​(SqlValidator validator,
                                   SqlCall call)
        Description copied from class: SqlOperator
        Rewrites a call to this operator. Some operators are implemented as trivial rewrites (e.g. NULLIF becomes CASE). However, we don't do this at createCall time because we want to preserve the original SQL syntax as much as possible; instead, we do this before the call is validated (so the trivial operator doesn't need its own implementation of type derivation methods). The default implementation is to just return the original call without any rewrite.
        Overrides:
        rewriteCall in class SqlOperator
        Parameters:
        validator - Validator
        call - Call to be rewritten
        Returns:
        rewritten call
      • requiresDecimalExpansion

        public boolean requiresDecimalExpansion()
        Description copied from class: SqlOperator
        Method to check if call requires expansion when it has decimal operands. The default implementation is to return true.
        Overrides:
        requiresDecimalExpansion in class SqlOperator