SQLLine 1.12.0: !tables no longer works due to JDBCThinResultSet#isClosed() reporting metadata ResultSet as closed
- Dominant language
- Java
- Stars
- 5.1k
- Forks
- 1.9k
- Avg merge
- 3d 2h
- Merged PRs (30d)
- 46
Description
After the upgrade to **SQLLine 1.12.0** introduced by commit 25ab91529c9f0b327ad677af90cdfa4e5a0c17e8 @zstan , SQLLine commands that rely on JDBC metadata result sets, such as !tables, no longer work correctly with the Ignite thin JDBC driver.
### Root Cause
Starting with SQLLine 1.12.0, SQLLine performs an explicit `ResultSet.isClosed()` check before reading from the result set.
For metadata queries, Ignite creates a JdbcThinResultSet with a null statement reference (stmt == null).
However, `JdbcThinResultSet.isClosed()` currently returns:
```
@Override public boolean isClosed() throws SQLException {
return closed || stmt == null || stmt.connection().isClosed();
}
```
As a result, any metadata ResultSet created without an associated statement is immediately reported as closed, even though it is perfectly usable.
Consequently, SQLLine 1.12.0 refuses to process the metadata result set and commands such as: `!tables` returns empty result
and this is the change in sqlline that introduced the check on the ResultSet isClosed
https://github.com/julianhyde/sqlline/commit/e0f9e9a1eb714a05988ae1323ff5e3bd463f64fb
Contributor guide
Assessment
This issue has not been assessed yet.