Skip to content

Commit

Permalink
Optimizing streaming query performance.
Browse files Browse the repository at this point in the history
  • Loading branch information
wangweicugw committed Aug 24, 2023
1 parent e9d5536 commit 915e72e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/main/java/com/jd/jdbc/engine/RouteStream.java
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,11 @@ private VtRowList fetchOrdered(boolean wantFields) throws SQLException {
}

VtResultSet vtResultSet = new VtResultSet();
if (wantFields && vtResultSet.getFields() == null) {
if (wantFields && fields == null) {
vtResultSet.appendResult(this.routeEngine.getFields(vcursor, bindVariableMap));
fields = vtResultSet.getFields();
} else if (wantFields) {
vtResultSet.setFields(fields);
}

if (sortedValues.isEmpty()) {
Expand Down

0 comments on commit 915e72e

Please sign in to comment.