zhztheplayer commented on a change in pull request #1132: [CALCITE-2955] SQL
queries after first query in same statement have no results returned
URL: https://github.com/apache/calcite/pull/1132#discussion_r278133449
##########
File path: core/src/main/java/org/apache/calcite/jdbc/CalciteMetaImpl.java
##########
@@ -608,6 +608,8 @@ public MetaResultSet getTableTypes(ConnectionHandle ch) {
new ArrayList<List<Object>>());
boolean done = fetchMaxRowCount == 0 || rows.size() < fetchMaxRowCount;
@SuppressWarnings("unchecked") List<Object> rows1 = (List<Object>) rows;
+ // Set ResultSet to null for supporting multi queries in same statement.
+ stmt.setResultSet(null);
Review comment:
This is too aggressive :(
The iterator is not released after a call ended because it might not be
fully read. If I'm not wrong, setting it to null would cause infinite loop when
result row count is large enough.
----------------------------------------------------------------
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