Java Code Examples for org.apache.calcite.sql.validate.SqlModality

The following examples show how to use org.apache.calcite.sql.validate.SqlModality. 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: RelOptTableImpl.java    License: Apache License 2.0 5 votes vote down vote up
@Override
public boolean supportsModality(SqlModality modality) {
    switch (modality) {
    case STREAM:
        return table instanceof StreamableTable;
    default:
        return !(table instanceof StreamableTable);
    }
}
 
Example 2
Source Project: calcite   Source File: RelOptTableImpl.java    License: Apache License 2.0 5 votes vote down vote up
public boolean supportsModality(SqlModality modality) {
  switch (modality) {
  case STREAM:
    return table instanceof StreamableTable;
  default:
    return !(table instanceof StreamableTable);
  }
}
 
Example 3
Source Project: Bats   Source File: SqlAdvisorValidator.java    License: Apache License 2.0 4 votes vote down vote up
@Override public boolean validateModality(SqlSelect select,
    SqlModality modality, boolean fail) {
  return true;
}
 
Example 4
Source Project: Bats   Source File: SqlCollectionTableOperator.java    License: Apache License 2.0 4 votes vote down vote up
public SqlCollectionTableOperator(String name, SqlModality modality) {
  super(name, SqlKind.COLLECTION_TABLE, 200, true, ReturnTypes.ARG0, null,
      OperandTypes.ANY);
  this.modality = modality;
}
 
Example 5
Source Project: Bats   Source File: SqlCollectionTableOperator.java    License: Apache License 2.0 4 votes vote down vote up
public SqlModality getModality() {
  return modality;
}
 
Example 6
Source Project: dremio-oss   Source File: DremioPrepareTable.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public boolean supportsModality(SqlModality paramSqlModality) {
  return SqlModality.RELATION == paramSqlModality;
}
 
Example 7
Source Project: dremio-oss   Source File: TestSQLAnalyzer.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public boolean supportsModality(SqlModality modality) {
  return false;
}
 
Example 8
Source Project: flink   Source File: FlinkPreparingTableBase.java    License: Apache License 2.0 4 votes vote down vote up
@Override
public boolean supportsModality(SqlModality modality) {
	return false;
}
 
Example 9
Source Project: calcite   Source File: SqlAdvisorValidator.java    License: Apache License 2.0 4 votes vote down vote up
@Override public boolean validateModality(SqlSelect select,
    SqlModality modality, boolean fail) {
  return true;
}
 
Example 10
Source Project: calcite   Source File: SqlCollectionTableOperator.java    License: Apache License 2.0 4 votes vote down vote up
public SqlCollectionTableOperator(String name, SqlModality modality) {
  super(name, SqlKind.COLLECTION_TABLE, 200, true, ReturnTypes.ARG0, null,
      OperandTypes.ANY);
  this.modality = modality;
}
 
Example 11
Source Project: calcite   Source File: SqlCollectionTableOperator.java    License: Apache License 2.0 4 votes vote down vote up
public SqlModality getModality() {
  return modality;
}
 
Example 12
Source Project: calcite   Source File: MockCatalogReader.java    License: Apache License 2.0 4 votes vote down vote up
public boolean supportsModality(SqlModality modality) {
  return modality == (stream ? SqlModality.STREAM : SqlModality.RELATION);
}