Skip to content

Commit

Permalink
Merge pull request #167 from youngsofun/dev
Browse files Browse the repository at this point in the history
fix: remove checks in updateClientSession.
  • Loading branch information
hantmac authored Mar 5, 2024
2 parents 8ccd928 + 3631c8b commit f74c32a
Showing 1 changed file with 4 additions and 13 deletions.
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
package com.databend.jdbc;

import com.databend.client.DatabendClient;
import com.databend.client.QueryAffect;
import com.databend.client.QueryResults;
import com.databend.client.StageAttachment;
import com.databend.client.*;
import com.databend.jdbc.annotation.NotImplemented;

import java.sql.Connection;
Expand Down Expand Up @@ -168,19 +165,13 @@ private void updateClientSession(QueryResults q) {
if (q == null) {
return;
}
if (q.getAffect() == null) {
return;
}
if (q.getSession() == null) {
return;
}

if (q.getAffect().getClass() != QueryAffect.UseDB.class && q.getAffect().getClass() != QueryAffect.ChangeSettings.class) {
DatabendSession session = q.getSession();
if (session == null) {
return;
}
// current query has result on update client session
DatabendConnection connection = this.connection.get();
connection.setSession(q.getSession());
connection.setSession(session);
}

final boolean internalExecute(String sql, StageAttachment attachment) throws SQLException {
Expand Down

0 comments on commit f74c32a

Please sign in to comment.