apache / apache/datafusion

Add a "col_case_preserved" helper function for creating Columns with the case preserved

Open
#16,914 1 comment 0 reactions 0 assignees View on GitHub
Dominant language
Rust
Stars
9.3k
Forks
2.4k
Avg merge
3d 7h
Merged PRs (30d)
344

Description

We recently encountered a bug caused by our misuse of the `datafusion::logical_expr::col` helper function, which does not preserve the case of the column name. We’re aware that `Column::from_name` and `Column::from_qualified_name_ignore_case` are available for creating Column instances while preserving or explicitly ignoring case.

Given this, would it make sense to introduce a helper function such as `col_case_preserved` (or a better name) to create Column expressions with case sensitivity preserved by default? Alternatively, we could consider modifying the existing `col` function to accept an additional parameter, such as `ignore_case`, to give users control over case sensitivity directly.

Contributor guide

Open the contributing guide

Research direction

Start by reading the datafusion::logical_expr::col helper and the Column::from_name and Column::from_qualified_name_ignore_case APIs mentioned in the issue. Compare the proposed new helper with changing col to accept an ignore_case parameter, then confirm the chosen API preserves the intended column-name behavior and is covered by relevant tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
databases
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.