Java Code Examples for org.apache.calcite.sql.type.SqlOperandCountRanges

The following examples show how to use org.apache.calcite.sql.type.SqlOperandCountRanges. These examples are extracted from open source projects. 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 Project: Bats   Source File: SqlUnnestOperator.java    License: Apache License 2.0 5 votes vote down vote up
public SqlUnnestOperator(boolean withOrdinality) {
  super(
      "UNNEST",
      SqlKind.UNNEST,
      200,
      true,
      null,
      null,
      OperandTypes.repeat(SqlOperandCountRanges.from(1),
          OperandTypes.SCALAR_OR_RECORD_COLLECTION_OR_MAP));
  this.withOrdinality = withOrdinality;
}
 
Example 2
Source Project: flink   Source File: NumericExceptFirstOperandChecker.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SqlOperandCountRange getOperandCountRange() {
	if (nOperands == -1) {
		return SqlOperandCountRanges.any();
	} else {
		return SqlOperandCountRanges.of(nOperands);
	}
}
 
Example 3
Source Project: flink   Source File: NumericExceptFirstOperandChecker.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public SqlOperandCountRange getOperandCountRange() {
	if (nOperands == -1) {
		return SqlOperandCountRanges.any();
	} else {
		return SqlOperandCountRanges.of(nOperands);
	}
}
 
Example 4
Source Project: calcite   Source File: SqlUnnestOperator.java    License: Apache License 2.0 5 votes vote down vote up
public SqlUnnestOperator(boolean withOrdinality) {
  super(
      "UNNEST",
      SqlKind.UNNEST,
      200,
      true,
      null,
      null,
      OperandTypes.repeat(SqlOperandCountRanges.from(1),
          OperandTypes.SCALAR_OR_RECORD_COLLECTION_OR_MAP));
  this.withOrdinality = withOrdinality;
}
 
Example 5
Source Project: Bats   Source File: SqlMultisetMemberOfOperator.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(2);
}
 
Example 6
Source Project: Bats   Source File: SqlJsonDepthFunction.java    License: Apache License 2.0 4 votes vote down vote up
@Override public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(1);
}
 
Example 7
Source Project: Bats   Source File: SqlSubstringFunction.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.between(2, 3);
}
 
Example 8
Source Project: Bats   Source File: SqlDatePartFunction.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(1);
}
 
Example 9
Source Project: Bats   Source File: SqlLikeOperator.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.between(2, 3);
}
 
Example 10
Source Project: Bats   Source File: SqlJsonArrayFunction.java    License: Apache License 2.0 4 votes vote down vote up
@Override public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.from(1);
}
 
Example 11
Source Project: Bats   Source File: SqlCaseOperator.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.any();
}
 
Example 12
Source Project: Bats   Source File: SqlItemOperator.java    License: Apache License 2.0 4 votes vote down vote up
@Override public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(2);
}
 
Example 13
Source Project: Bats   Source File: SqlCastFunction.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(2);
}
 
Example 14
Source Project: Bats   Source File: SqlJsonObjectFunction.java    License: Apache License 2.0 4 votes vote down vote up
@Override public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.from(1);
}
 
Example 15
Source Project: Bats   Source File: SqlJsonPrettyFunction.java    License: Apache License 2.0 4 votes vote down vote up
@Override public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(1);
}
 
Example 16
Source Project: Bats   Source File: SqlDotOperator.java    License: Apache License 2.0 4 votes vote down vote up
@Override public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(2);
}
 
Example 17
Source Project: Bats   Source File: SqlJsonValueFunction.java    License: Apache License 2.0 4 votes vote down vote up
@Override public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.between(5, 6);
}
 
Example 18
Source Project: Bats   Source File: SqlOverlapsOperator.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(2);
}
 
Example 19
Source Project: Bats   Source File: SqlStdOperatorTable.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.between(1, 2);
}
 
Example 20
Source Project: Bats   Source File: SqlJsonTypeFunction.java    License: Apache License 2.0 4 votes vote down vote up
@Override public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(1);
}
 
Example 21
Source Project: Bats   Source File: Checker.java    License: Apache License 2.0 4 votes vote down vote up
private Checker(int min, int max) {
  range = SqlOperandCountRanges.between(min, max);
}
 
Example 22
Source Project: Bats   Source File: Checker.java    License: Apache License 2.0 4 votes vote down vote up
private Checker() {
  range = SqlOperandCountRanges.any();
}
 
Example 23
Source Project: flink   Source File: RepeatFamilyOperandTypeChecker.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
	return SqlOperandCountRanges.from(1);
}
 
Example 24
Source Project: dremio-oss   Source File: Checker.java    License: Apache License 2.0 4 votes vote down vote up
private Checker(int min, int max) {
  range = SqlOperandCountRanges.between(min, max);
}
 
Example 25
Source Project: dremio-oss   Source File: Checker.java    License: Apache License 2.0 4 votes vote down vote up
private Checker() {
  range = SqlOperandCountRanges.any();
}
 
Example 26
Source Project: dremio-oss   Source File: DremioArgChecker.java    License: Apache License 2.0 4 votes vote down vote up
public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.between(0, checkers.size());
}
 
Example 27
Source Project: samza   Source File: Checker.java    License: Apache License 2.0 4 votes vote down vote up
private Checker(int size, UdfMetadata udfMetadata) {
  this.range = SqlOperandCountRanges.of(size);
  this.udfMetadataOptional = Optional.of(udfMetadata);
}
 
Example 28
Source Project: samza   Source File: Checker.java    License: Apache License 2.0 4 votes vote down vote up
private Checker(int min, int max, UdfMetadata udfMetadata) {
  this.range = SqlOperandCountRanges.between(min, max);
  this.udfMetadataOptional = Optional.of(udfMetadata);
}
 
Example 29
Source Project: samza   Source File: Checker.java    License: Apache License 2.0 4 votes vote down vote up
private Checker() {
  this.range = SqlOperandCountRanges.any();
  this.udfMetadataOptional = Optional.empty();
}
 
Example 30
Source Project: calcite   Source File: SqlTumbleTableFunction.java    License: Apache License 2.0 4 votes vote down vote up
@Override public SqlOperandCountRange getOperandCountRange() {
  return SqlOperandCountRanges.of(3);
}