Java Code Examples for org.apache.calcite.sql.type.OperandTypes#SAME_VARIADIC

The following examples show how to use org.apache.calcite.sql.type.OperandTypes#SAME_VARIADIC . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SqlCoalesceFunction.java    From Bats with Apache License 2.0 5 votes vote down vote up
public SqlCoalesceFunction() {
  // NOTE jvs 26-July-2006:  We fill in the type strategies here,
  // but normally they are not used because the validator invokes
  // rewriteCall to convert COALESCE into CASE early.  However,
  // validator rewrite can optionally be disabled, in which case these
  // strategies are used.
  super("COALESCE",
      SqlKind.COALESCE,
      ReturnTypes.cascade(ReturnTypes.LEAST_RESTRICTIVE,
          SqlTypeTransforms.LEAST_NULLABLE),
      null,
      OperandTypes.SAME_VARIADIC,
      SqlFunctionCategory.SYSTEM);
}
 
Example 2
Source File: SqlCoalesceFunction.java    From calcite with Apache License 2.0 5 votes vote down vote up
public SqlCoalesceFunction() {
  // NOTE jvs 26-July-2006:  We fill in the type strategies here,
  // but normally they are not used because the validator invokes
  // rewriteCall to convert COALESCE into CASE early.  However,
  // validator rewrite can optionally be disabled, in which case these
  // strategies are used.
  super("COALESCE",
      SqlKind.COALESCE,
      ReturnTypes.cascade(ReturnTypes.LEAST_RESTRICTIVE,
          SqlTypeTransforms.LEAST_NULLABLE),
      null,
      OperandTypes.SAME_VARIADIC,
      SqlFunctionCategory.SYSTEM);
}