Thanks Terry for bringing this up. TableEnv's interface is really critical not only to users, but also for components built upon it like SQL CLI. Your proposal solved some pain points we currently have, so +1 to the proposal.
I left some comments in the document. Best, Kurt On Thu, Oct 31, 2019 at 10:38 AM Terry Wang <zjuwa...@gmail.com> wrote: > Hi everyone, > > TableEnvironment has provided two `Table sqlQuery(String sql)` and `void > sqlUpdate(String sql)` interfaces to create a table(actually a view here) > or describe an update action from one sql string. > But with more use cases come up, there are some fatal shortcomings in > current API design. Such as `sqlUpdate()` don’t support get a return value > and buggy support for buffer sql exception and so on. > > So I’d like to kick off a discussion on improvement and refactor the api > of table module: > > google doc: > https://docs.google.com/document/d/19-mdYJjKirh5aXCwq1fDajSaI09BJMMT95wy_YhtuZk/edit?usp=sharing > < > https://docs.google.com/document/d/19-mdYJjKirh5aXCwq1fDajSaI09BJMMT95wy_YhtuZk/edit?usp=sharing > > > Flip link: > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=134745878 > < > https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=134745878 > > > > In short, it: > - Discuss buffering sql execute problem > - Discuss current `sqlQuery/sqlUpdate` and propose two new api > - Introduce one new `executeBatch` method to support batch sql > execute > - Discuss how SQL CLI should deal with multiple statements > > Looking forward to all your guys comments. > > Best, > Terry Wang > > > >