[
https://issues.apache.org/jira/browse/FLINK-25174?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Jingsong Lee updated FLINK-25174:
---------------------------------
Description:
We need an interface to discover the managed table factory implementation for
managed table:
{code:java}
/**
* Base interface for configuring a managed dynamic table connector. The
managed table factory is
* used when there is no {@link FactoryUtil#CONNECTOR} option.
*/
@Internal
public interface ManagedTableFactory extends DynamicTableFactory {
@Override
default String factoryIdentifier() {
return "";
}
/**
* Enrich options from catalog and session information.
*
* @return new options of this table.
*/
Map<String, String> enrichOptions(Context context);
/** Notifies the listener that a table creation occurred. */
void onCreateTable(Context context);
/** Notifies the listener that a table drop occurred. */
void onDropTable(Context context);
} {code}
A catalog that supports built-in dynamic table needs to implement the method in
the Catalog (The GenericInMemoryCatalog and HiveCatalog will implement this
method):
{{/**}}
{{ }}{{* If return true, the Table without specified connector will be
translated to the Flink managed table.}}
{{ }}{{{}* See {@link CatalogBaseTable.TableKind#MANAGED{}}}}
{{ }}{{*/}}
{{default}} {{boolean}} {{supportsManagedTable {}}
{{ }}{{return}} {{{}false{}}}{{{};{}}}
{{}}}
{{}}
was:
We need an interface to discover the managed table factory implementation for
managed table:
{{/**}}
{{ }}{{* Base interface for configuring a managed dynamic table connector. The
managed table factory is}}
{{ }}{{* used when there is no \{@link FactoryUtil#CONNECTOR} option.}}
{{ }}{{*/}}
{{@Internal}}
{{public}} {{interface}} {{ManagedTableFactory }}{{extends}}
{{DynamicTableFactory {}}
{{ }}{{@Override}}
{{ }}{{default}} {{String factoryIdentifier() {}}
{{ }}{{return}} {{{}""{}}}{{{};{}}}
{{ }}{{}}}
{{ }}{{/**}}
{{ }}{{* Enrich options from catalog and session information.}}
{{ }}{{*}}
{{ }}{{* @return new options of this table.}}
{{ }}{{*/}}
{{ }}{{Map<String, String> enrichOptions(Context context);}}
{{ }}{{/** Notifies the listener that a table creation occurred. */}}
{{ }}{{void}} {{onCreateTable(Context context);}}
{{ }}{{/** Notifies the listener that a table drop occurred. */}}
{{ }}{{void}} {{onDropTable(Context context);}}
{{}}}
{{}}
A catalog that supports built-in dynamic table needs to implement the method in
the Catalog (The GenericInMemoryCatalog and HiveCatalog will implement this
method):
{{/**}}
{{ }}{{* If return true, the Table without specified connector will be
translated to the Flink managed table.}}
{{ }}{{* See \{@link CatalogBaseTable.TableKind#MANAGED}}}
{{ }}{{*/}}
{{default}} {{boolean}} {{supportsManagedTable {}}
{{ }}{{return}} {{{}false{}}}{{{};{}}}
{{}}}
{{}}
> Introduce ManagedTableFactory
> -----------------------------
>
> Key: FLINK-25174
> URL: https://issues.apache.org/jira/browse/FLINK-25174
> Project: Flink
> Issue Type: Sub-task
> Components: Table SQL / API
> Reporter: Jingsong Lee
> Priority: Major
> Fix For: 1.15.0
>
>
> We need an interface to discover the managed table factory implementation for
> managed table:
> {code:java}
> /**
> * Base interface for configuring a managed dynamic table connector. The
> managed table factory is
> * used when there is no {@link FactoryUtil#CONNECTOR} option.
> */
> @Internal
> public interface ManagedTableFactory extends DynamicTableFactory {
>
> @Override
> default String factoryIdentifier() {
> return "";
> }
>
> /**
> * Enrich options from catalog and session information.
> *
> * @return new options of this table.
> */
> Map<String, String> enrichOptions(Context context);
>
> /** Notifies the listener that a table creation occurred. */
> void onCreateTable(Context context);
>
> /** Notifies the listener that a table drop occurred. */
> void onDropTable(Context context);
> } {code}
> A catalog that supports built-in dynamic table needs to implement the method
> in the Catalog (The GenericInMemoryCatalog and HiveCatalog will implement
> this method):
> {{/**}}
> {{ }}{{* If return true, the Table without specified connector will be
> translated to the Flink managed table.}}
> {{ }}{{{}* See {@link CatalogBaseTable.TableKind#MANAGED{}}}}
> {{ }}{{*/}}
> {{default}} {{boolean}} {{supportsManagedTable {}}
> {{ }}{{return}} {{{}false{}}}{{{};{}}}
> {{}}}
> {{}}
--
This message was sent by Atlassian Jira
(v8.20.1#820001)