Package org.apache.flink.table.factories
Class FactoryUtil.DefaultModelProviderContext
- java.lang.Object
-
- org.apache.flink.table.factories.FactoryUtil.DefaultModelProviderContext
-
- All Implemented Interfaces:
ModelProviderFactory.Context
- Enclosing class:
- FactoryUtil
@Internal public static class FactoryUtil.DefaultModelProviderContext extends Object implements ModelProviderFactory.Context
Default implementation ofModelProviderFactory.Context.
-
-
Constructor Summary
Constructors Constructor Description DefaultModelProviderContext(ObjectIdentifier objectIdentifier, ResolvedCatalogModel catalogModel, org.apache.flink.configuration.ReadableConfig configuration, ClassLoader classLoader, boolean isTemporary)
-
Method Summary
All Methods Instance Methods Concrete 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.
-
-
-
Constructor Detail
-
DefaultModelProviderContext
public DefaultModelProviderContext(ObjectIdentifier objectIdentifier, ResolvedCatalogModel catalogModel, org.apache.flink.configuration.ReadableConfig configuration, ClassLoader classLoader, boolean isTemporary)
-
-
Method Detail
-
getObjectIdentifier
public ObjectIdentifier getObjectIdentifier()
Description copied from interface:ModelProviderFactory.ContextReturns the identifier of the model in theCatalog.This identifier describes the relationship between the model instance and the associated
Catalog(if any).- Specified by:
getObjectIdentifierin interfaceModelProviderFactory.Context
-
getCatalogModel
public ResolvedCatalogModel getCatalogModel()
Description copied from interface:ModelProviderFactory.ContextReturns 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.
- Specified by:
getCatalogModelin interfaceModelProviderFactory.Context
-
getConfiguration
public org.apache.flink.configuration.ReadableConfig getConfiguration()
Description copied from interface:ModelProviderFactory.ContextGives read-only access to the configuration of the current session.- Specified by:
getConfigurationin interfaceModelProviderFactory.Context
-
getClassLoader
public ClassLoader getClassLoader()
Description copied from interface:ModelProviderFactory.ContextReturns the class loader of the current session.The class loader is in particular useful for discovering further (nested) factories.
- Specified by:
getClassLoaderin interfaceModelProviderFactory.Context
-
isTemporary
public boolean isTemporary()
Description copied from interface:ModelProviderFactory.ContextWhether the model is temporary.- Specified by:
isTemporaryin interfaceModelProviderFactory.Context
-
-