KazydubB commented on a change in pull request #1549: DRILL-6834: Introduce
option to disable result set on CTAS, create vi…
URL: https://github.com/apache/drill/pull/1549#discussion_r235770618
##########
File path: exec/jdbc/src/main/java/org/apache/drill/jdbc/impl/DrillCursor.java
##########
@@ -499,6 +500,13 @@ private boolean nextRowInternally() throws SQLException {
currentRecordNumber = 0;
+ if (qrb.getHeader().hasUpdateCount()) {
+ int updateCount = qrb.getHeader().getUpdateCount();
+ int currentUpdateCount = statement.getUpdateCount() == -1 ? 0 :
statement.getUpdateCount();
+ ((DrillStatement) statement).setUpdateCount(updateCount +
currentUpdateCount);
Review comment:
Unfortunately not, because `ResultSet` is set before actual data is queried
([AvaticaConnection](https://github.com/apache/calcite-avatica/blob/master/core/src/main/java/org/apache/calcite/avatica/AvaticaConnection.java#L660)).
However, `DrillStatement#setResultSet(AvaticaResultSet)` may be removed and
`openResultSet` (see DrillStatementImpl below) can be nullified when update
count is set with `#setUpdateCount(int)` method.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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