[ 
https://issues.apache.org/jira/browse/FLINK-36482?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17913219#comment-17913219
 ] 

Dawid Wysakowicz commented on FLINK-36482:
------------------------------------------

Some feedback on one of the APIs. I'd suggest reconsidering removal of 
`registerCatalog`.

I think {{createCatalog}} is not and should not be a directed replacement for 
{{registerCatalog}}.

{{createCatalog}} forces you to provide a catalog via service lookup mechanism, 
which is not easy in all cases. Especially ones like in this PR: 
https://github.com/apache/flink/pull/25952, when you want to instantiate tables 
in memory. I don't really see a reason we should force users to go that route.

Moreover, all other APIs do have a version where you can pass an instance:

{code}
void createTemporarySystemFunction(String name, UserDefinedFunction 
functionInstance);
void createTemporaryFunction(String path, UserDefinedFunction functionInstance);
void createTemporaryView(String path, Table view);
void createView(String path, Table view);
{code}

Lastly, I think it's different from e.g. {{from(TableDescriptor)}}, because the 
sources need to be instantiated on tasks, which is better maintained with a 
descriptor approach. It's different for a Catalog, which is used only during 
the planning and not necessary during the runtime. I think having a way to pass 
an instance in that case is totally fine.

> Remove all deprecated methods in `TableEnvironment`
> ---------------------------------------------------
>
>                 Key: FLINK-36482
>                 URL: https://issues.apache.org/jira/browse/FLINK-36482
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / API
>            Reporter: xuyang
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 2.0.0
>
>




--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to