GitHub user twalthr opened a pull request:

    [FLINK-8607] [table] Add a basic embedded SQL CLI client

    ## What is the purpose of the change
    This PR implements the first part of the implementation plan described in 
    Goal: Add the basic features to play around with Flink's streaming SQL.
    - Add CLI component that reads the configuration files
        - "Pre-registered table sources"
        - "Job parameters"
    - Add executor for retrieving pre-flight information and corresponding CLI 
SQL parser
        - SHOW TABLES
        - EXPLAIN
    - Add streaming append query submission to executor
    - Submit jars and run SELECT query using the ClusterClient
    - Collect results on heap and serve them on the CLI side (Internal Mode 
with SELECT)
    - SOURCE (for executing a SQL statement stored in a local file)
    Additionally, this PR also supports retraction queries and the SET 
operation for setting properties.
    The client can be started using `./bin/ embedded`.
    A table source must be defined in `./conf/sql-client-defaults.yaml` (for 
example a CSV table source, an example can be found in the test resources 
    The client supports two modes for viewing results. A `changelog` mode or 
`table` mode. They can be selected by setting the `execution.result-mode` 
    The code is still work in progress. There are a couple of things that can 
be improved:
    - Add more logging instead of swallowing exceptions
    - Use Flink's ConfigOptions where applicable (e.g. for better default value 
handling and validation)
    - Maybe make the record result retrieval blocking?
    - Tests for the LocalExecutor
    - Some basic tests for other classes (maybe for CLI classes as well?)
    - More deployment options (support for YARN, FLIP-6?)
    - Documentation
    ## Brief change log
    - New module `flink-sql-client`
    - New executable script in `flink/bin`
    - Minor visibility changes in other modules
    ## Verifying this change
    Manually verified. Further tests will follow.
    ## Does this pull request potentially affect one of the following parts:
      - Dependencies (does it add or upgrade a dependency): yes
      - The public API, i.e., is any changed class annotated with 
`@Public(Evolving)`: no
      - The serializers: no
      - The runtime per-record code paths (performance sensitive): no
      - Anything that affects deployment or recovery: JobManager (and its 
components), Checkpointing, Yarn/Mesos, ZooKeeper: no
      - The S3 file system connector: no
    ## Documentation
      - Does this pull request introduce a new feature? yes
      - If yes, how is the feature documented? not documented

You can merge this pull request into a Git repository by running:

    $ git pull FLINK-8607

Alternatively you can review and apply these changes as the patch at:

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #5441
commit 17b6b6d8b8804382b7b855033c370ffb4fd673ac
Author: twalthr <twalthr@...>
Date:   2017-12-07T12:46:31Z

    [FLINK-8607] [table] Add a basic embedded SQL CLI client



Reply via email to