-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Closed
Closed
Copy link
Labels
Description
What happens?
I cannot fetch ResultSet.getTime()
from the JDBC driver.
To Reproduce
Try this Java code:
import org.duckdb.DuckDBConnection;
import java.sql.DriverManager;
DuckDBConnection connection = (DuckDBConnection) DriverManager.getConnection("jdbc:duckdb:");
try (
Statement s = connection.createStatement();
ResultSet rs = s.executeQuery("select current_time")
) {
while (rs.next()) {
System.out.println(rs.getTime(1));
System.out.println(rs.getString(1));
}
}
It prints something along the lines of:
null
09:32:52.936
The problem is that java.sql.Time.valueOf(String)
doesn't accept fractional seconds. After the exception is thrown by JDBC, null
is simply returned:
return null; |
OS:
Microsoft Windows [Version 10.0.22631.3007]
DuckDB Version:
0.10.0
DuckDB Client:
JDBC
Full Name:
Lukas Eder
Affiliation:
Data Geekery
Have you tried this on the latest nightly build?
I have tested with a nightly build
Have you tried the steps to reproduce? Do they include all relevant data and configuration? Does the issue you report still appear there?
- Yes, I have