Interface Module

  • All Known Implementing Classes:
    CoreModule

    @PublicEvolving
    public interface Module
    Modules 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 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
      • getTableSourceFactory

        default Optional<DynamicTableSourceFactory> getTableSourceFactory()
        Returns a DynamicTableSourceFactory for 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 a DynamicTableSinkFactory for 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.