Skip to content

Commit 9bb1e95

Browse files
committed
Improve Derby JDBC driver
1 parent 159faac commit 9bb1e95

1 file changed

Lines changed: 4 additions & 10 deletions

File tree

  • crates/stackable-operator/src/crd/database/databases

crates/stackable-operator/src/crd/database/databases/derby.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,11 @@ impl JDBCDatabaseConnection for DerbyConnection {
3030
let connection_uri = format!("jdbc:derby:{location}",);
3131
let connection_uri = connection_uri.parse().context(ParseConnectionUrlSnafu)?;
3232

33-
// TODO: Think about different drivers (depending on version)
34-
// see hive-operator:
35-
// // The driver class changed for hive 4.2.0
36-
// if ["3.1.3", "4.0.0", "4.0.1", "4.1.0"].contains(&product_version) {
37-
// "org.apache.derby.jdbc.EmbeddedDriver"
38-
// } else {
39-
// "org.apache.derby.iapi.jdbc.AutoloadedDriver"
40-
// }
41-
4233
Ok(JDBCDatabaseConnectionDetails {
43-
driver: "org.apache.derby.jdbc.ClientDriver".to_owned(),
34+
// Sadly the Derby driver class name is a bit complicated, e.g. for HMS up to 4.1.x we used
35+
// "org.apache.derby.jdbc.EmbeddedDriver",
36+
// for HMS 4.2.x we used "org.apache.derby.iapi.jdbc.AutoloadedDriver".
37+
driver: "org.apache.derby.jdbc.EmbeddedDriver".to_owned(),
4438
connection_uri,
4539
username_env: None,
4640
password_env: None,

0 commit comments

Comments
 (0)