Skip to content

Commit 64bd2a2

Browse files
committed
added applying server version in the client
1 parent ceac311 commit 64bd2a2

File tree

1 file changed

+3
-1
lines changed
  • client-v2/src/main/java/com/clickhouse/client/api

1 file changed

+3
-1
lines changed

client-v2/src/main/java/com/clickhouse/client/api/Client.java

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -184,6 +184,8 @@ private Client(Set<String> endpoints, Map<String,String> configuration, boolean
184184
} else {
185185
this.lz4Factory = LZ4Factory.fastestJavaInstance();
186186
}
187+
188+
this.serverVersion = configuration.getOrDefault(ClientConfigProperties.SERVER_VERSION.getKey(), "unknown");
187189
}
188190

189191
/**
@@ -2188,7 +2190,7 @@ public String getUser() {
21882190
}
21892191

21902192
public String getServerVersion() {
2191-
return this.serverVersion == null ? "unknown" : this.serverVersion;
2193+
return this.serverVersion;
21922194
}
21932195

21942196
public String getServerTimeZone() {

0 commit comments

Comments
 (0)