dawidwys commented on issue #9781: [FLINK-14098] Support multiple statements 
for TableEnvironment.
URL: https://github.com/apache/flink/pull/9781#issuecomment-538893866
 
 
   Couple of thoughts from my sight. I'm not sure what would be the best 
interface here so far.
   
   1. The `sqlQuery` method returns a `Table`. I think this clearly defines 
that `sqlQuery` supports a single statement. In other words a `sqlQuery` plays 
the role of `parse` or `convert` from SQL to a relational tree.
   2. From what I understood from the description of the JDBC methods, they are 
not necessarily what we want to have in the `TableEnvrionment. As far as I 
know, at some point, we want to have a very thin sql client that would just 
forward sql string to `TableEnvironment`. With such requirement we need a 
method that would accept any, arbitrary set of statements in any number.
   3. As for the `sqlUpdate` method, I think we should consider changing the 
result type of a `sqlUpdate`. Pretty much always in case of executing SQL we 
need some kind of a result e.g. number of updated rows, list of tables, result 
of a query etc.
   
   With so many new requirements especially around integration with SQL client, 
I am not sure if it makes sense to add a multi statement support to either 
`sqlUpdate`or `sqlQuery`. I think we should start with a better design 
documentation for this feature with a user facing use case(s) in mind.
   
   Lastly I think @xuefuz had some opinions on the design of those methods in 
`TableEnvironment`.

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to