Interface Module
-
- All Known Implementing Classes:
CoreModule
@PublicEvolving public interface ModuleModules define a set of metadata, including functions, user defined types, operators, rules, etc. Metadata from modules are regarded as built-in or system metadata that users can take advantages of.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default Optional<FunctionDefinition>getFunctionDefinition(String name)Get an optional ofFunctionDefinitionby a given name.default Optional<ModelProviderFactory>getModelProviderFactory()Returns aModelProviderFactoryfor creating model providers.default Optional<DynamicTableSinkFactory>getTableSinkFactory()Returns aDynamicTableSinkFactoryfor creating sink tables.default Optional<DynamicTableSourceFactory>getTableSourceFactory()Returns aDynamicTableSourceFactoryfor creating source tables.default Set<String>listFunctions()List names of all functions in this module.default Set<String>listFunctions(boolean includeHiddenFunctions)List names of all functions in this module.
-
-
-
Method Detail
-
listFunctions
default Set<String> listFunctions()
List names of all functions in this module. It excludes internal functions.- Returns:
- a set of function names
-
listFunctions
default Set<String> listFunctions(boolean includeHiddenFunctions)
List names of all functions in this module.A module can decide to hide certain functions. For example, internal functions that can be resolved via
getFunctionDefinition(String)but should not be listed by default.- Parameters:
includeHiddenFunctions- whether to list hidden functions or not- Returns:
- a set of function names
-
getFunctionDefinition
default Optional<FunctionDefinition> getFunctionDefinition(String name)
Get an optional ofFunctionDefinitionby a given name.It includes hidden functions even though not listed in
listFunctions().- Parameters:
name- name of theFunctionDefinition.- Returns:
- an optional function definition
-
getTableSourceFactory
default Optional<DynamicTableSourceFactory> getTableSourceFactory()
Returns aDynamicTableSourceFactoryfor creating source tables.A factory is determined with the following precedence rule:
- 1. Factory provided by the corresponding catalog of a persisted table.
- 2. Factory provided by a module.
- 3. Factory discovered using Java SPI.
This will be called on loaded modules in the order in which they have been loaded. The first factory returned will be used.
This method can be useful to disable Java SPI completely or influence how temporary table sources should be created without a corresponding catalog.
-
getTableSinkFactory
default Optional<DynamicTableSinkFactory> getTableSinkFactory()
Returns aDynamicTableSinkFactoryfor creating sink tables.A factory is determined with the following precedence rule:
- 1. Factory provided by the corresponding catalog of a persisted table.
- 2. Factory provided by a module.
- 3. Factory discovered using Java SPI.
This will be called on loaded modules in the order in which they have been loaded. The first factory returned will be used.
This method can be useful to disable Java SPI completely or influence how temporary table sinks should be created without a corresponding catalog.
-
getModelProviderFactory
default Optional<ModelProviderFactory> getModelProviderFactory()
Returns aModelProviderFactoryfor creating model providers.A factory is determined with the following precedence rule:
- 1. Factory provided by the corresponding catalog of a persisted model. See
Catalog.getFactory() - 2. Factory provided by a module.
- 3. Factory discovered using Java SPI.
This will be called on loaded modules in the order in which they have been loaded. The first factory returned will be used.
This method can be useful to disable Java SPI completely or influence how temporary model providers should be created without a corresponding catalog.
- 1. Factory provided by the corresponding catalog of a persisted model. See
-
-