Skip to content

Commit d38c31b

Browse files
authored
Merge pull request #2655 from Destrolaric/support-read-primary-keys-for-legacy
[jdbc-v2] fix backward compatibility for getPrimaryKeys
2 parents 39bd998 + 28187c0 commit d38c31b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

jdbc-v2/src/main/java/com/clickhouse/jdbc/metadata/DatabaseMetaDataImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -987,7 +987,7 @@ public ResultSet getPrimaryKeys(String catalog, String schema, String table) thr
987987
"system.tables.database AS TABLE_SCHEM, " +
988988
"system.tables.name AS TABLE_NAME, " +
989989
"trim(c.1) AS COLUMN_NAME, " +
990-
"c.2::Int16 AS KEY_SEQ, " +
990+
"CAST(c.2 AS Int16) AS KEY_SEQ, " +
991991
"'PRIMARY' AS PK_NAME " +
992992
"FROM system.tables " +
993993
"ARRAY JOIN arrayZip(splitByChar(',', primary_key), arrayEnumerate(splitByChar(',', primary_key))) as c " +

0 commit comments

Comments
 (0)