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

The following examples show how to use org.apache.calcite.sql.type.OperandTypes#NUMERIC_NUMERIC . 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: SqlCovarAggFunction.java    From Bats with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a SqlCovarAggFunction.
 */
public SqlCovarAggFunction(SqlKind kind) {
  super(kind.name(),
      null,
      kind,
      kind == SqlKind.REGR_COUNT ? ReturnTypes.BIGINT : ReturnTypes.COVAR_REGR_FUNCTION,
      null,
      OperandTypes.NUMERIC_NUMERIC,
      SqlFunctionCategory.NUMERIC,
      false,
      false,
      Optionality.FORBIDDEN);
  Preconditions.checkArgument(SqlKind.COVAR_AVG_AGG_FUNCTIONS.contains(kind),
      "unsupported sql kind: " + kind);
}
 
Example 2
Source File: SqlCovarAggFunction.java    From calcite with Apache License 2.0 5 votes vote down vote up
/**
 * Creates a SqlCovarAggFunction.
 */
public SqlCovarAggFunction(SqlKind kind) {
  super(kind.name(),
      null,
      kind,
      kind == SqlKind.REGR_COUNT ? ReturnTypes.BIGINT : ReturnTypes.COVAR_REGR_FUNCTION,
      null,
      OperandTypes.NUMERIC_NUMERIC,
      SqlFunctionCategory.NUMERIC,
      false,
      false,
      Optionality.FORBIDDEN);
  Preconditions.checkArgument(SqlKind.COVAR_AVG_AGG_FUNCTIONS.contains(kind),
      "unsupported sql kind: " + kind);
}
 
Example 3
Source File: SqlRegrCountAggFunction.java    From Bats with Apache License 2.0 4 votes vote down vote up
public SqlRegrCountAggFunction(SqlKind kind) {
  super("REGR_COUNT", OperandTypes.NUMERIC_NUMERIC);
  Preconditions.checkArgument(SqlKind.REGR_COUNT == kind, "unsupported sql kind: " + kind);
}
 
Example 4
Source File: SqlRegrCountAggFunction.java    From calcite with Apache License 2.0 4 votes vote down vote up
public SqlRegrCountAggFunction(SqlKind kind) {
  super("REGR_COUNT", OperandTypes.NUMERIC_NUMERIC);
  Preconditions.checkArgument(SqlKind.REGR_COUNT == kind, "unsupported sql kind: " + kind);
}