public class HCatalogTableProvider extends java.lang.Object implements TableProvider, java.io.Serializable
Supports only 'db.table' format at the moment, does not support 'catalog.db.table'.
Delegates to sub-providers to get the actual table.
If only the table name is provided, then 'db' is assumed to be 'default'.
Modifier and Type | Method and Description |
---|---|
BeamSqlTable |
buildBeamSqlTable(Table table)
Build a
BeamSqlTable using the given table meta info. |
static HCatalogTableProvider |
create(java.util.Map<java.lang.String,java.lang.String> configuration) |
void |
createTable(Table table)
Creates a table.
|
void |
dropTable(java.lang.String tableName)
Drops a table.
|
TableProvider |
getSubProvider(java.lang.String name)
Returns a sub-provider, e.g.
|
java.util.Set<java.lang.String> |
getSubProviders()
Returns all sub-providers, e.g.
|
Table |
getTable(java.lang.String name)
Get a specific table from this provider it is present, or null if it is not present.
|
java.util.Map<java.lang.String,Table> |
getTables()
Get all tables from this provider.
|
java.lang.String |
getTableType()
Gets the table type this provider handles.
|
public static HCatalogTableProvider create(java.util.Map<java.lang.String,java.lang.String> configuration)
public java.lang.String getTableType()
TableProvider
getTableType
in interface TableProvider
public void createTable(Table table)
TableProvider
createTable
in interface TableProvider
public void dropTable(java.lang.String tableName)
TableProvider
dropTable
in interface TableProvider
public java.util.Map<java.lang.String,Table> getTables()
TableProvider
getTables
in interface TableProvider
@Nullable public Table getTable(java.lang.String name)
TableProvider
getTable
in interface TableProvider
public BeamSqlTable buildBeamSqlTable(Table table)
TableProvider
BeamSqlTable
using the given table meta info.buildBeamSqlTable
in interface TableProvider
public java.util.Set<java.lang.String> getSubProviders()
TableProvider
BeamCalciteSchema
.getSubProviders
in interface TableProvider
public TableProvider getSubProvider(java.lang.String name)
TableProvider
BeamCalciteSchema
.getSubProvider
in interface TableProvider