-
Notifications
You must be signed in to change notification settings - Fork 614
Closed
Description
Description
The ResultSet#findColumn method returns 0 for any column.
Steps to reproduce
- Obtain ResultSet
- Call
findColumnfor either of the columns' labels.
Expected Behaviour
The method should return an actual column's index.
Code Example
Let's assume it's the flow inside some jdbc result mapper:
ResultSet _rs = ...
int _idx_uuid = _rs.findColumn("uuid"); // returns 0
String uuid = _rs.getString(_idx_uuid) // throws NoSuchColumnExceptionThe code above throws NoSuchColumnException since getString expects the index parameter to start from 1. Given that findColumn returns 0, it'll always throw an Exception.
Configuration
Client Configuration
Environment
- Client version: jdbc-v2-0.8.5
- Language version: Java 17
- OS: Windows 10
ClickHouse Server
- ClickHouse Server version: 25.4