Skip to content

[Bug]: Ducklake query view false when using Postgres Catalog #1332

@meomeocoj

Description

@meomeocoj

What happened?

Here's the corrected grammar:
"The issue is that when I query the DuckLake view in a specific schema (let's say "gold"), I found that the DBIdentifierPreparer has a function _separate that seems to work incorrectly in the case of DuckLake with Postgres Catalog:

def _separate(self, name: Optional[str]) -> Tuple[Optional[Any], Optional[str]]:
"""
Get database name and schema name from schema if it contains a database name
Format:
<db_name>.<schema_name>
db_name and schema_name are double quoted if contains spaces or double quotes
"""
database_name, schema_name = None, name
if name is not None and "." in name:
database_name, schema_name = (
max(s) for s in re.findall(r'"([^.]+)"|([^.]+)', name)
)
return database_name, schema_name

For example:
"ducklake:postgres:db=ducklake ..." returns ducklake, ducklake (database, schema) which is incorrect."

DuckDB Engine Version

0.17.0

DuckDB Version

1.3.2

SQLAlchemy Version

1.39

Relevant log output

Code of Conduct

  • I agree to follow this project's Code of Conduct

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions