+1 for #1
I think this is what we are currently doing, that forward SQL statements to
TableEnv#executeSql, e.g. FLINK-17113, FLINK-18059.
But IMO the SQL CLI specific statements (EXIT, QUIT) should still stay only
in SQL CLI.

Another idea is that, the reviewer/committer should check tests are both
added for SQL CLI and TableEnv if it is a new statement.

Best,
Jark

On Thu, 18 Jun 2020 at 15:40, Rui Li <lirui.fu...@gmail.com> wrote:

> Thanks Jingsong for bringing up the discussion. Perhaps we can do both #1
> and #2? I like the idea that SQL Client should just forward SQL statements
> to TableEnvironment. IIUC, with TableEnvironment::executeSql in place, most
> statements can be forwarded. Only a very limited set of statements need to
> be handled by SQL Client, like SET and EXIT.
>
> On Thu, Jun 18, 2020 at 3:19 PM Jingsong Li <jingsongl...@gmail.com>
> wrote:
>
> > Hi all,
> >
> > I'd like to start a discussion for the new features lacking support of
> > Sql-client.
> >
> > I've seen the new DDL syntax that SQL client lacks support for many
> times.
> > For every new DDL syntax, we need to add support in sql-client. Add
> > a corresponding SqlCommand in sql-client, otherwise this DDL is still
> > not working in sql-client.
> >
> > But it looks like developers always forgot to add support in sql-client.
> > Lots of DDL features just be added in parser and planner, but lack
> > sql-client support, so users will wait for the next release. Just like:
> > https://issues.apache.org/jira/browse/FLINK-7151
> > https://issues.apache.org/jira/browse/FLINK-17198
> > https://issues.apache.org/jira/browse/FLINK-15468
> > https://issues.apache.org/jira/browse/FLINK-15175
> >
> > How to solve this?
> > I think we have two options:
> >
> > 1. Unify the parser in sql-client and TableEnvironment truly. Really make
> > sql-client have all abilities from TableEnvironment. sql-client just
> > forward sql to TableEnvironment. Can it be?
> > 2. A new testing framework mechanism: We can make sql-related tests more
> > "up front", we can move e2e tests (I think we are doing now) and it cases
> > to sql-client oriented. This may require a new testing framework
> mechanism,
> > for example, we can do something like hive sql testing [1] to
> > sql-client oriented. In this way, the testing can cover more horizontal
> and
> > vertical and it is easy to migrate tests from other systems too. And I
> > think, Flink's DDLs are enough stronger to support pure SQLs testing.
> >
> > What do you think?
> >
> > [1]https://github.com/apache/hive/tree/master/ql/src/test/queries
> >
> > Best,
> > Jingsong
> >
>
>
> --
> Best regards!
> Rui Li
>

Reply via email to