Package org.apache.flink.table.catalog
Interface TemporaryOperationListener
@PublicEvolving
public interface TemporaryOperationListener
This interface is for a
Catalog to listen on temporary object operations. When a catalog
implements this interface, it'll get informed when certain operations are performed on temporary
objects belonging to that catalog.-
Method Summary
Modifier and TypeMethodDescriptiononCreateTemporaryFunction(ObjectPath functionPath, CatalogFunction function) This method is called when a temporary function is to be created in this catalog.onCreateTemporaryModel(ObjectPath modelPath, CatalogModel model) This method is called when a temporary model is to be created in this catalog.onCreateTemporaryTable(ObjectPath tablePath, CatalogBaseTable table) This method is called when a temporary table or view is to be created in this catalog.voidonDropTemporaryFunction(ObjectPath functionPath) This method is called when a temporary function in this catalog is to be dropped.voidonDropTemporaryModel(ObjectPath modelPath) This method is called when a temporary model in this catalog is to be dropped.voidonDropTemporaryTable(ObjectPath tablePath) This method is called when a temporary table or view in this catalog is to be dropped.
-
Method Details
-
onCreateTemporaryTable
CatalogBaseTable onCreateTemporaryTable(ObjectPath tablePath, CatalogBaseTable table) throws CatalogException This method is called when a temporary table or view is to be created in this catalog. The catalog can modify the table or view according to its needs and return the modified CatalogBaseTable instance, which will be stored for the user session.- Parameters:
tablePath- path of the table or view to be createdtable- the table definition- Returns:
- the modified table definition to be stored
- Throws:
CatalogException- in case of any runtime exception
-
onDropTemporaryTable
This method is called when a temporary table or view in this catalog is to be dropped.- Parameters:
tablePath- path of the table or view to be dropped- Throws:
CatalogException- in case of any runtime exception
-
onCreateTemporaryModel
CatalogModel onCreateTemporaryModel(ObjectPath modelPath, CatalogModel model) throws CatalogException This method is called when a temporary model is to be created in this catalog. The catalog can modify the model according to its needs and return the modified CatalogModel instance, which will be stored for the user session.- Parameters:
modelPath- path of the model to be createdmodel- the model definition- Returns:
- the modified model definition to be stored
- Throws:
CatalogException- in case of any runtime exception
-
onDropTemporaryModel
This method is called when a temporary model in this catalog is to be dropped.- Parameters:
modelPath- path of the model to be dropped- Throws:
CatalogException- in case of any runtime exception
-
onCreateTemporaryFunction
CatalogFunction onCreateTemporaryFunction(ObjectPath functionPath, CatalogFunction function) throws CatalogException This method is called when a temporary function is to be created in this catalog. The catalog can modify the function according to its needs and return the modified CatalogFunction instance, which will be stored for the user session.- Parameters:
functionPath- path of the function to be createdfunction- the function definition- Returns:
- the modified function definition to be stored
- Throws:
CatalogException- in case of any runtime exception
-
onDropTemporaryFunction
This method is called when a temporary function in this catalog is to be dropped.- Parameters:
functionPath- path of the function to be dropped- Throws:
CatalogException- in case of any runtime exception
-