use of org.apache.calcite.schema.impl.TableFunctionImpl in project calcite by apache.
the class EnumerableTableFunctionScan method isQueryable.
private boolean isQueryable() {
if (!(getCall() instanceof RexCall)) {
return false;
}
final RexCall call = (RexCall) getCall();
if (!(call.getOperator() instanceof SqlUserDefinedTableFunction)) {
return false;
}
final SqlUserDefinedTableFunction udtf = (SqlUserDefinedTableFunction) call.getOperator();
if (!(udtf.getFunction() instanceof TableFunctionImpl)) {
return false;
}
final TableFunctionImpl tableFunction = (TableFunctionImpl) udtf.getFunction();
final Method method = tableFunction.method;
return QueryableTable.class.isAssignableFrom(method.getReturnType());
}
Aggregations