Skip to content

Conversation

@Schwarf
Copy link
Contributor

@Schwarf Schwarf commented Jan 1, 2026

Fixes duckdb/duckdb#20329

DuckDBPyRelation.select_dtypes failed for relations with column names that
require quoting (e.g., names containing spaces). The projection builder did
not correctly quote identifiers, leading to binder errors.

This change ensures identifiers are quoted consistently and adds a regression
test to cover the reported case.

@Schwarf Schwarf force-pushed the fix/select-dtypes-identifier-quoting branch from 457a873 to 75181a2 Compare January 1, 2026 14:17
@guillesd guillesd requested a review from evertlammerts January 2, 2026 10:08
@evertlammerts
Copy link
Collaborator

Thanks! DuckDB has a helper you can use for this: duckdb::KeywordHelper::WriteOptionallyQuoted. Will that suffice?

@Schwarf
Copy link
Contributor Author

Schwarf commented Jan 5, 2026

Thanks! DuckDB has a helper you can use for this: duckdb::KeywordHelper::WriteOptionallyQuoted. Will that suffice?

Thanks! I’ve switched to duckdb::KeywordHelper::WriteOptionallyQuoted as suggested and removed the custom identifier-quoting helper. The regression test continues to pass.

@evertlammerts
Copy link
Collaborator

Perfect, thanks! I'll merge without running the tests - main is currently broken.

@evertlammerts evertlammerts merged commit 0dd3514 into duckdb:main Jan 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

DuckDBPyRelation.select_dtypes fails for column names containing spaces

2 participants