Conversation
| if d == DialectDuckDB { | ||
| // To skip DuckDB dialect handling for the generic implementation, | ||
| // add an additional condition for the default database and schema | ||
| if d == DialectDuckDB && db == "main_db" && schema == "main" { |
There was a problem hiding this comment.
Is it guaranteed that motherduck can't have a db named main_db otherwise there is a chance of an edge case here ?
There was a problem hiding this comment.
@k-anshul we cannot attach main_db because our local duckdb name is also main_db we need to attach using as.
There was a problem hiding this comment.
The local db is called main<UUID> in case of motherduck:
rill/runtime/pkg/rduckdb/generic.go
Line 101 in 4576c64
There was a problem hiding this comment.
@begelundmuller Me and Anshul had the discussion. There are few options here we can have
- DialectGenericDuckDB
- type Dialect struct {
Name string
SingleSchema bool
} - type OLAPDialect struct {
Dialect Dialect
SingleSchema bool
}
Any thought on this?
There was a problem hiding this comment.
Sharing some thoughts in a DM
There was a problem hiding this comment.
@k-anshul is it okay to merge this. and will raise the separate pr for Dialect refactorying .
There was a problem hiding this comment.
Shouldn't we revisit this after Dialect refactoring ? I think we should close this and open a new one after refactoring instead.
Closes PLAT-428: Support multiple databases/schemas for Motherduck
Checklist: