You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Kurt Young (JIRA)" <ji...@apache.org> on 2019/07/10 03:07:00 UTC

[jira] [Commented] (FLINK-13176) remember current catalog and database in SQL CLI SessionContext

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

Kurt Young commented on FLINK-13176:
------------------------------------

cc [~docete], we had a similar discussion before and I think we were plan to reuse the whole CatalogManager. Will these two approaches conflicts?

> remember current catalog and database in SQL CLI SessionContext
> ---------------------------------------------------------------
>
>                 Key: FLINK-13176
>                 URL: https://issues.apache.org/jira/browse/FLINK-13176
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table SQL / Client
>            Reporter: Bowen Li
>            Assignee: Bowen Li
>            Priority: Major
>              Labels: pull-request-available
>             Fix For: 1.9.0
>
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> currently the EnvironmentInstance/TableEnvironment in SQL CLI is not reused, it's recreated for all SQL commands. The resulting problem is that we lost state of the user configured current catalog/database. We believe users should be able to run 'USE CATALOG/DATABASE xxx' to change their current catalog/database despite the ones set in yaml files.
> The core design was that the SQL Client "Gateway" is stateless and the SQL Client "CLI" knows everything that is required to submit a SQL job. So only one request is sent with all information necessary. `USE CATALOG/DATABASE xxx` should be executed in the CLI and stored in the CLI's session context. The session context has higher priority than the YAML file. 
> For `USE CATALOG/DATABASE xxx` use case the current design should be sufficient as the `USE` would just modify an `execution` property in the session context



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