Interface CustomTableResolver
- All Superinterfaces:
TableProvider
- All Known Implementing Classes:
DataCatalogTableProvider
,FullNameTableProvider
registerKnownTableNames(List)
is called by the parser/planner and takes the list of
all tables mentioned in the query. Then when normal Calcite lifecycle is executed the table
provider can now check against this list and perform custom resolution. This is a workaround for
lack of context in Calcite's logic, e.g. it's impossible to receive the whole table name at once,
or understand that it has done querying sub-schemas and expects a table.
-
Method Summary
Modifier and TypeMethodDescriptionvoid
registerKnownTableNames
(List<TableName> tableNames) Register the table names as extracted from the FROM clause.Methods inherited from interface org.apache.beam.sdk.extensions.sql.meta.provider.TableProvider
buildBeamSqlTable, createTable, dropTable, getSubProvider, getSubProviders, getTable, getTables, getTableType, supportsPartitioning
-
Method Details
-
registerKnownTableNames
Register the table names as extracted from the FROM clause.Calcite doesn't provide these full names to table providers and queries them with individual parts of the identifiers without giving any extra context. So if a table provider needs to implement some custom table name resolution strategy it doesn't have information to do so. E.g. if you want to take the compound SQL identifiers that were originally split by dots, join them into a single string, and then query a back-end service, this interface makes this possible.
-