Java Code Examples for org.apache.calcite.sql.type.ReturnTypes#BIGINT

The following examples show how to use org.apache.calcite.sql.type.ReturnTypes#BIGINT . 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: AggPrelBase.java    From Bats with Apache License 2.0 5 votes vote down vote up
public SqlSumCountAggFunction(RelDataType type) {
  super("$SUM0",
      null,
      SqlKind.OTHER_FUNCTION,
      ReturnTypes.BIGINT, // use the inferred return type of SqlCountAggFunction
      null,
      OperandTypes.NUMERIC,
      SqlFunctionCategory.NUMERIC,
      false,
      false);

  this.type = type;
}
 
Example 3
Source File: HyperLogLog.java    From dremio-oss with Apache License 2.0 5 votes vote down vote up
public SqlNdvAggFunction() {
  super("NDV",
    null,
    SqlKind.OTHER_FUNCTION,
    ReturnTypes.BIGINT,
    null,
    OperandTypes.ANY,
    SqlFunctionCategory.USER_DEFINED_FUNCTION,
    false,
    false
  );
}
 
Example 4
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 5
Source File: SqlGroupIdFunction.java    From Bats with Apache License 2.0 4 votes vote down vote up
SqlGroupIdFunction() {
  super("GROUP_ID", SqlKind.GROUP_ID, ReturnTypes.BIGINT, null,
      OperandTypes.NILADIC, SqlFunctionCategory.SYSTEM);
}
 
Example 6
Source File: SqlGroupingIdFunction.java    From Bats with Apache License 2.0 4 votes vote down vote up
SqlGroupingIdFunction() {
  //noinspection deprecation
  super("GROUPING_ID", SqlKind.GROUPING_ID, ReturnTypes.BIGINT, null,
      OperandTypes.ONE_OR_MORE, SqlFunctionCategory.SYSTEM);
}
 
Example 7
Source File: SqlCountAggFunction.java    From Bats with Apache License 2.0 4 votes vote down vote up
public SqlCountAggFunction(String name,
    SqlOperandTypeChecker sqlOperandTypeChecker) {
  super(name, null, SqlKind.COUNT, ReturnTypes.BIGINT, null,
      sqlOperandTypeChecker, SqlFunctionCategory.NUMERIC, false, false,
      Optionality.FORBIDDEN);
}
 
Example 8
Source File: SqlGroupingFunction.java    From Bats with Apache License 2.0 4 votes vote down vote up
SqlGroupingFunction(String name) {
  super(name, SqlKind.GROUPING, ReturnTypes.BIGINT, null,
      OperandTypes.ONE_OR_MORE, SqlFunctionCategory.SYSTEM);
}
 
Example 9
Source File: HyperLogLog.java    From dremio-oss with Apache License 2.0 4 votes vote down vote up
public SqlHllDecodeOperator() {
  super(new SqlIdentifier("HLL_DECODE", SqlParserPos.ZERO), ReturnTypes.BIGINT, null, OperandTypes.BINARY, null, SqlFunctionCategory.USER_DEFINED_FUNCTION);
}
 
Example 10
Source File: SqlGroupIdFunction.java    From calcite with Apache License 2.0 4 votes vote down vote up
SqlGroupIdFunction() {
  super("GROUP_ID", SqlKind.GROUP_ID, ReturnTypes.BIGINT, null,
      OperandTypes.NILADIC, SqlFunctionCategory.SYSTEM);
}
 
Example 11
Source File: SqlGroupingIdFunction.java    From calcite with Apache License 2.0 4 votes vote down vote up
SqlGroupingIdFunction() {
  //noinspection deprecation
  super("GROUPING_ID", SqlKind.GROUPING_ID, ReturnTypes.BIGINT, null,
      OperandTypes.ONE_OR_MORE, SqlFunctionCategory.SYSTEM);
}
 
Example 12
Source File: SqlCountAggFunction.java    From calcite with Apache License 2.0 4 votes vote down vote up
public SqlCountAggFunction(String name,
    SqlOperandTypeChecker sqlOperandTypeChecker) {
  super(name, null, SqlKind.COUNT, ReturnTypes.BIGINT, null,
      sqlOperandTypeChecker, SqlFunctionCategory.NUMERIC, false, false,
      Optionality.FORBIDDEN);
}
 
Example 13
Source File: SqlGroupingFunction.java    From calcite with Apache License 2.0 4 votes vote down vote up
SqlGroupingFunction(String name) {
  super(name, SqlKind.GROUPING, ReturnTypes.BIGINT, null,
      OperandTypes.ONE_OR_MORE, SqlFunctionCategory.SYSTEM);
}
 
Example 14
Source File: PlannerTest.java    From calcite with Apache License 2.0 4 votes vote down vote up
public MyCountAggFunction() {
  super("MY_COUNT", null, SqlKind.OTHER_FUNCTION, ReturnTypes.BIGINT, null,
      OperandTypes.ANY, SqlFunctionCategory.NUMERIC, false, false,
      Optionality.FORBIDDEN);
}
 
Example 15
Source File: MockSqlOperatorTable.java    From calcite with Apache License 2.0 4 votes vote down vote up
public MyAggFunc() {
  super("myAggFunc", null, SqlKind.OTHER_FUNCTION, ReturnTypes.BIGINT, null,
      OperandTypes.ONE_OR_MORE, SqlFunctionCategory.USER_DEFINED_FUNCTION, false, false,
      Optionality.FORBIDDEN);
}