public TranslatableTable apply(List<Object> arguments) { final CalciteConnection connection = MaterializedViewTable.MATERIALIZATION_CONNECTION; CalcitePrepare.AnalyzeViewResult parsed = Schemas.analyzeView(connection, schema, schemaPath, viewSql, viewPath, modifiable != null && modifiable); final List<String> schemaPath1 = schemaPath != null ? schemaPath : schema.path(null); if ((modifiable == null || modifiable) && parsed.modifiable && parsed.table != null) { return modifiableViewTable(parsed, viewSql, schemaPath1, viewPath, schema); } else { return viewTable(parsed, viewSql, schemaPath1, viewPath); } }
public TranslatableTable apply(List<Object> arguments) { final CalciteConnection connection = MaterializedViewTable.MATERIALIZATION_CONNECTION; CalcitePrepare.AnalyzeViewResult parsed = Schemas.analyzeView(connection, schema, schemaPath, viewSql, viewPath, modifiable != null && modifiable); final List<String> schemaPath1 = schemaPath != null ? schemaPath : schema.path(null); if ((modifiable == null || modifiable) && parsed.modifiable && parsed.table != null) { return modifiableViewTable(parsed, viewSql, schemaPath1, viewPath, schema); } else { return viewTable(parsed, viewSql, schemaPath1, viewPath); } }