Skip to content

[fix] DuckDB mode: space in column name breaks file import (#3153) - #3156

Merged
igorDykhta merged 8 commits into
masterfrom
igr/duckdb-fix-space-in-column
Jul 10, 2025
Merged

[fix] DuckDB mode: space in column name breaks file import (#3153)#3156
igorDykhta merged 8 commits into
masterfrom
igr/duckdb-fix-space-in-column

Conversation

@igorDykhta

@igorDykhta igorDykhta commented Jul 9, 2025

Copy link
Copy Markdown
Collaborator

#3153

  • fix for space in column name
  • fix for complex table names that are already quoted
  • tests for duckDB utils

Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Copilot AI review requested due to automatic review settings July 9, 2025 22:21

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR addresses issue #3153 by ensuring column names with spaces or special characters are properly quoted in DuckDB SQL queries.

  • Introduces a quoteColumnName helper to escape double quotes.
  • Applies identifier quoting in castDuckDBTypesForKepler for all column references.
Comments suppressed due to low confidence (1)

src/duckdb/src/table/duckdb-table-utils.ts:69

  • Consider adding unit tests for quoteColumnName and castDuckDBTypesForKepler to cover edge cases like column names with spaces, quotes, or reserved words.
function quoteColumnName(columnName: string): string {

Comment thread src/duckdb/src/table/duckdb-table-utils.ts Outdated
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Comment thread src/duckdb/src/table/duckdb-table-utils.ts Outdated
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
Signed-off-by: Ihor Dykhta <dikhta.igor@gmail.com>
@igorDykhta
igorDykhta merged commit 7551f5d into master Jul 10, 2025
8 checks passed
@igorDykhta
igorDykhta deleted the igr/duckdb-fix-space-in-column branch July 10, 2025 19:08
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.

3 participants