Uploaded image for project: 'Flink'
  1. Flink
  2. FLINK-12625 Support catalogs in SQL Client
  3. FLINK-13176

remember current catalog and database in SQL CLI SessionContext

    XMLWordPrintableJSON

Details

    Description

      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

      Attachments

        Issue Links

          Activity

            People

              phoenixjiangnan Bowen Li
              phoenixjiangnan Bowen Li
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 10m
                  10m