Skip to content

Commit

Permalink
GEOMESA-3294 Partitioned PostGIS - use default database schema if not…
Browse files Browse the repository at this point in the history
… specified
  • Loading branch information
elahrvivaz committed Sep 19, 2023
1 parent c784bb9 commit ed6355c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Expand Up @@ -50,6 +50,13 @@ class PartitionedPostgisDataStoreFactory extends PostgisNGDataStoreFactory with
if (!params.containsKey(PreparedStatements.key)) {
params.put(PreparedStatements.key, java.lang.Boolean.TRUE)
}
// set default schema, if not specified - postgis store doesn't actually use its own default
if (!params.containsKey(PostgisNGDataStoreFactory.SCHEMA.key)) {
// need to set it in the store, as the key has already been processed
store.setDatabaseSchema("public")
// also set in the params for consistency, although it's not used anywhere
params.put(PostgisNGDataStoreFactory.SCHEMA.key, "public")
}
val ds = super.createDataStoreInternal(store, params)
val dialect = new PartitionedPostgisDialect(ds)

Expand Down
Expand Up @@ -77,7 +77,6 @@ class PartitionedPostgisDataStoreTest extends Specification with BeforeAfterAll
"dbtype" -> PartitionedPostgisDataStoreParams.DbType.sample,
"host" -> host,
"port" -> port,
"schema" -> schema,
"database" -> "postgres",
"user" -> "postgres",
"passwd" -> "postgres",
Expand Down

0 comments on commit ed6355c

Please sign in to comment.