Java Code Examples for org.apache.calcite.sql.type.InferTypes#RETURN_TYPE

The following examples show how to use org.apache.calcite.sql.type.InferTypes#RETURN_TYPE . 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: SqlAsOperator.java    From Bats with Apache License 2.0 5 votes vote down vote up
/**
 * Creates an AS operator.
 */
public SqlAsOperator() {
  this(
      "AS",
      SqlKind.AS,
      20,
      true,
      ReturnTypes.ARG0,
      InferTypes.RETURN_TYPE,
      OperandTypes.ANY_ANY);
}
 
Example 2
Source File: ProctimeMaterializeSqlFunction.java    From flink with Apache License 2.0 5 votes vote down vote up
public ProctimeMaterializeSqlFunction() {
	super(
		"PROCTIME_MATERIALIZE",
		SqlKind.OTHER_FUNCTION,
		ReturnTypes.cascade(
				ReturnTypes.explicit(SqlTypeName.TIMESTAMP),
				SqlTypeTransforms.TO_NULLABLE),
		InferTypes.RETURN_TYPE,
		OperandTypes.family(SqlTypeFamily.TIMESTAMP),
		SqlFunctionCategory.SYSTEM);
}
 
Example 3
Source File: StreamRecordTimestampSqlFunction.java    From flink with Apache License 2.0 5 votes vote down vote up
public StreamRecordTimestampSqlFunction() {
	super(
		"STREAMRECORD_TIMESTAMP",
		SqlKind.OTHER_FUNCTION,
		ReturnTypes.explicit(SqlTypeName.BIGINT),
		InferTypes.RETURN_TYPE,
		OperandTypes.family(SqlTypeFamily.NUMERIC),
		SqlFunctionCategory.SYSTEM);
}
 
Example 4
Source File: ProctimeMaterializeSqlFunction.java    From flink with Apache License 2.0 5 votes vote down vote up
public ProctimeMaterializeSqlFunction() {
	super(
		"PROCTIME_MATERIALIZE",
		SqlKind.OTHER_FUNCTION,
		ReturnTypes.cascade(
				ReturnTypes.explicit(SqlTypeName.TIMESTAMP, 3),
				SqlTypeTransforms.TO_NULLABLE),
		InferTypes.RETURN_TYPE,
		OperandTypes.family(SqlTypeFamily.TIMESTAMP),
		SqlFunctionCategory.SYSTEM);
}
 
Example 5
Source File: StreamRecordTimestampSqlFunction.java    From flink with Apache License 2.0 5 votes vote down vote up
public StreamRecordTimestampSqlFunction() {
	super(
		"STREAMRECORD_TIMESTAMP",
		SqlKind.OTHER_FUNCTION,
		ReturnTypes.explicit(SqlTypeName.BIGINT),
		InferTypes.RETURN_TYPE,
		OperandTypes.family(SqlTypeFamily.NUMERIC),
		SqlFunctionCategory.SYSTEM);
}
 
Example 6
Source File: SqlAsOperator.java    From calcite with Apache License 2.0 5 votes vote down vote up
/**
 * Creates an AS operator.
 */
public SqlAsOperator() {
  this(
      "AS",
      SqlKind.AS,
      20,
      true,
      ReturnTypes.ARG0,
      InferTypes.RETURN_TYPE,
      OperandTypes.ANY_ANY);
}
 
Example 7
Source File: SqlDefaultOperator.java    From Bats with Apache License 2.0 4 votes vote down vote up
SqlDefaultOperator() {
  super("DEFAULT", SqlKind.DEFAULT, 100, true,
      ReturnTypes.explicit(SqlTypeName.ANY), InferTypes.RETURN_TYPE,
      OperandTypes.NILADIC);
}
 
Example 8
Source File: SqlCaseOperator.java    From Bats with Apache License 2.0 4 votes vote down vote up
private SqlCaseOperator() {
  super("CASE", SqlKind.CASE, MDX_PRECEDENCE, true, null,
      InferTypes.RETURN_TYPE, null);
}
 
Example 9
Source File: SqlArgumentAssignmentOperator.java    From Bats with Apache License 2.0 4 votes vote down vote up
SqlArgumentAssignmentOperator() {
  super("=>", SqlKind.ARGUMENT_ASSIGNMENT, 20, true, ReturnTypes.ARG0,
      InferTypes.RETURN_TYPE, OperandTypes.ANY_ANY);
}
 
Example 10
Source File: SqlDefaultOperator.java    From calcite with Apache License 2.0 4 votes vote down vote up
SqlDefaultOperator() {
  super("DEFAULT", SqlKind.DEFAULT, 100, true,
      ReturnTypes.explicit(SqlTypeName.ANY), InferTypes.RETURN_TYPE,
      OperandTypes.NILADIC);
}
 
Example 11
Source File: SqlCaseOperator.java    From calcite with Apache License 2.0 4 votes vote down vote up
private SqlCaseOperator() {
  super("CASE", SqlKind.CASE, MDX_PRECEDENCE, true, null,
      InferTypes.RETURN_TYPE, null);
}
 
Example 12
Source File: SqlArgumentAssignmentOperator.java    From calcite with Apache License 2.0 4 votes vote down vote up
SqlArgumentAssignmentOperator() {
  super("=>", SqlKind.ARGUMENT_ASSIGNMENT, 20, true, ReturnTypes.ARG0,
      InferTypes.RETURN_TYPE, OperandTypes.ANY_ANY);
}