deniskuzZ commented on code in PR #4902: URL: https://github.com/apache/hive/pull/4902#discussion_r1615625492
########## jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java: ########## @@ -271,8 +299,18 @@ private void setSchema(List<String> colNames, List<String> colTypes, colNames.forEach(i -> normalizedColumnNames.add(i.toLowerCase())); } + private void InitEmptyIterator() throws SQLException { + try { + fetchedRows = RowSetFactory.create(new TRowSet(), protocol); + fetchedRowsItr = fetchedRows.iterator(); + } catch (TException e) { + throw new SQLException(e); + } + } + @Override public void close() throws SQLException { + ShutdownPool(); Review Comment: please use `camel-case` namings ########## jdbc/src/java/org/apache/hive/jdbc/HiveQueryResultSet.java: ########## @@ -290,7 +328,7 @@ public void close() throws SQLException { client = null; stmtHandle = null; isClosed = true; - operationStatus = null; + InitEmptyIterator(); Review Comment: `camel-case` why do we need to init empty iterator, but not set them to null? -- 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. To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: gitbox-unsubscr...@hive.apache.org For additional commands, e-mail: gitbox-h...@hive.apache.org