Class FullNameTableProvider
- java.lang.Object
-
- org.apache.beam.sdk.extensions.sql.meta.provider.FullNameTableProvider
-
- All Implemented Interfaces:
CustomTableResolver,TableProvider
public abstract class FullNameTableProvider extends java.lang.Object implements TableProvider, CustomTableResolver
Base class for table providers that look up table metadata using full table names, instead of querying it by parts of the name separately.
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedFullNameTableProvider()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description @Nullable TableProvidergetSubProvider(java.lang.String name)Returns a sub-provider, e.g.abstract TablegetTableByFullName(TableName fullTableName)voidregisterKnownTableNames(java.util.List<TableName> tableNames)Register the table names as extracted from the FROM clause.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.beam.sdk.extensions.sql.meta.provider.TableProvider
buildBeamSqlTable, createTable, dropTable, getSubProviders, getTable, getTables, getTableType, supportsPartitioning
-
-
-
-
Method Detail
-
registerKnownTableNames
public void registerKnownTableNames(java.util.List<TableName> tableNames)
Description copied from interface:CustomTableResolverRegister 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.
- Specified by:
registerKnownTableNamesin interfaceCustomTableResolver
-
getSubProvider
public @Nullable TableProvider getSubProvider(java.lang.String name)
Description copied from interface:TableProviderReturns a sub-provider, e.g. sub-schema. Temporary, this logic needs to live inBeamCalciteSchema.- Specified by:
getSubProviderin interfaceTableProvider
-
-