Package org.apache.flink.table.factories
Interface ModelProviderFactory.Context
-
- All Known Implementing Classes:
FactoryUtil.DefaultModelProviderContext
- Enclosing interface:
- ModelProviderFactory
@PublicEvolving public static interface ModelProviderFactory.ContextProvides catalog and session information describing the model to be accessed.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description ResolvedCatalogModelgetCatalogModel()Returns the resolved model information received from theCatalogor persisted plan.ClassLoadergetClassLoader()Returns the class loader of the current session.org.apache.flink.configuration.ReadableConfiggetConfiguration()Gives read-only access to the configuration of the current session.ObjectIdentifiergetObjectIdentifier()Returns the identifier of the model in theCatalog.booleanisTemporary()Whether the model is temporary.
-
-
-
Method Detail
-
getObjectIdentifier
ObjectIdentifier getObjectIdentifier()
-
getCatalogModel
ResolvedCatalogModel getCatalogModel()
Returns the resolved model information received from theCatalogor persisted plan.The
ResolvedCatalogModelforwards the metadata from the catalog but offers a validatedResolvedSchema. The original metadata object is available viaResolvedCatalogModel.getOrigin().In most cases, a factory is interested in the following characteristics:
// get the physical input and output data type to initialize the connector context.getCatalogModel().getResolvedInputSchema().toPhysicalRowDataType() context.getCatalogModel().getResolvedInputSchema().toPhysicalRowDataType() // get configuration options context.getCatalogModel().getOptions()During a plan restore, usually the model information persisted in the plan is used to reconstruct the catalog model.
-
getConfiguration
org.apache.flink.configuration.ReadableConfig getConfiguration()
Gives read-only access to the configuration of the current session.
-
getClassLoader
ClassLoader getClassLoader()
Returns the class loader of the current session.The class loader is in particular useful for discovering further (nested) factories.
-
isTemporary
boolean isTemporary()
Whether the model is temporary.
-
-