[ https://issues.apache.org/jira/browse/IGNITE-7253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16389528#comment-16389528 ]
Vladimir Ozerov commented on IGNITE-7253: ----------------------------------------- [~al.psc], my comments: 1) {{SqlParserSetStreamingSelfTest}} doesn't pass 2) {{SqlSetStreamingCommand#parse}} - we should thrown an exception if parameters are found after {{OFF}} keyword. The easiest way to do this is simply return as soon as {{OFF}} is found without further parsing. Our parser should handle this gracefully. Additional tests are needed for this case. 3) {{DdlStatementsProcessor#zeroCursor}} - as this is common method it is better to put it into {{H2Utils}} instead of DDL processor. 4) {{GridQueryProcessor#cliCtxs}} - unused 5) {{SqlClientContext#enableStreaming/disableStreaming}} - why don't we throw an exception if user wants to re-enable already enabled streaming? We cannot simply ignore the second command silently because it may contain different parameters. I see two possible solutions here - either throw an exception, or force "OFF" and then re-enable with passed arguments. The latter approach looks more friendly to me. Additional tests are needed. 6) Please confirm that it is impossible to execute DDL commands when streaming is on. 7) {{IgniteH2Indexing.doRunPrepared}} - unused {{cliCtx}} argument 8) {{JdbcConnectionContext}} - looks like we should advance the version to 2.5.0 9) {{JdbcRequestHandler}} - it is strange that {{replicatedOnly}} flag was not moved to {{SqlClientContext}} along with other query parameters 10) {{JdbcBatchExecuteRequest.isLastStreamBatch}} - taking in count p.5 looks like this flag is not the right way to go should we decide to implement more user-friendly approach (what is {{STREAMING ON}} is executed when streaming is enabled already?). Or may be we can for "last stream batch" request in this case, and then enable streaming again with separate command. 11) {{JdbcThinConnection.executeNative}} - same as p.5, possible change to streamer config is ignored. 12) {{JdbcthinStatement.checkStatementBatchEmpty}} - error message sounds unclear to me. Can we rephrase it so something like "Statement has non-empty batch (call executeBatch() or clearBatch() before enabling streaming)." 13) {{JdbcThinPreparedStatement.addBatch}} - it looks like it is allowed to add {{SET STREAMING}} to batch here, while exception is thrown in similar case for {{JdbcThinStatement.addBatch}}. > JDBC thin driver: introduce streaming mode > ------------------------------------------ > > Key: IGNITE-7253 > URL: https://issues.apache.org/jira/browse/IGNITE-7253 > Project: Ignite > Issue Type: Task > Components: jdbc, sql > Reporter: Vladimir Ozerov > Assignee: Alexander Paschenko > Priority: Major > Fix For: 2.5 > > Attachments: IGNITE_7253.patch > > > Should be done after IGNITE-6022. We should allow optional streaming mode for > JDBC driver. In this mode only INSERTs without SELECT should be possible. All > other DML operations should throw an exception. > Design considerations: > 1) Add command {{SET STREAMING=1|ON|0|OFF}} which will enable or disable > streaming for connection. > 2) Add command {{STREAMER FLUSH}} which will force data flush. > 3) Only INSERT without SELECT works, all other DML statements should throw an > exception > 4) It should be possible to stream into several tables simultaneously (i.e. > several streamers could be opened) > 5) Any DDL statement should force flush of all currently opened streamers. -- This message was sent by Atlassian JIRA (v7.6.3#76005)