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

Xuefu Zhang commented on FLINK-13150:
-------------------------------------

[~zjffdu] good observation! I know there was a discussion of treating table env 
as stateless, but from what is exposed from this class it doesn't seem so, at 
least not from the surface. For instance, it provides API to change current 
catalog/databes, while registering table always occurs to the default 
database/db that was initialized when the table env is created. It might not be 
a problem if table env is created every time for each operation, but that seems 
quite anti-pattern and anti-intuitive.

Personally I don't feel that table env should be stateless, but I'd like to cc: 
[~twalthr] for input.

> defaultCatalogName and defaultDatabaseName in TableEnvImpl is not updated 
> after they are updated in TableEnvironment
> --------------------------------------------------------------------------------------------------------------------
>
>                 Key: FLINK-13150
>                 URL: https://issues.apache.org/jira/browse/FLINK-13150
>             Project: Flink
>          Issue Type: Bug
>          Components: Table SQL / API
>    Affects Versions: 1.9.0
>            Reporter: Jeff Zhang
>            Priority: Major
>
> defaultCatalogName and defaultDatabaseName in TableEnvImpl are initialized 
> when it is created and never changed even when they are updated in 
> TableEnvironment.
> The will cause issues that we may register table to the wrong catalog after 
> we changed the defaultCatalogName and defaultDatabaseName 



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to