zhengcanbin commented on issue #9781: [FLINK-14098] Support multiple statements for TableEnvironment. URL: https://github.com/apache/flink/pull/9781#issuecomment-536836014 > One general question from my side: Shall we also allow multiline statements in `sqlQuery()`? In theory we could allow that and just ensure that the last statement is a query statement. Similarly we need to ensure that there is no query statement in `sqlUpdate()`. What is JDBC doing in those cases? Thanks, @twalthr In JDBC, `executeXXX` just accepts one statement, `executeUpdate` allows DDL/DML and throws an exception when executing DQL, conversely, `executeQuery` supports DQL while DDL/DML is not allowed. IMO, it also makes sense to support multi statements in `sqlQuery()`, DDL/DML are allowed if a query is the last statement, also, multiple queries should not be allowed. But it seems the boundary is not very clear between these two interfaces after we apply these changes, both of them allow DDL/DML, would such behavior cause confusion for users to some extent? Actually I tend to not change the behavior of `sqlQuery()`, so `sqlQuery()` is only for read side and `sqlUpdate()` for write side. Thoughts? @wuchong @dawidwys
---------------------------------------------------------------- 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
