Columns names outputs are inconsistents and case sensitive
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 55/100
Research direction
Start by running the supplied Python reproduction against the current DuckDB Python package and compare rel.pl(), rel.df(), the Arrow conversions, and the lazy result. Trace the Python relation-to-Polars and relation-to-pandas entry points, then add or update regression coverage so equivalent outputs handle the case-variant columns consistently.
Written by the indexing model from the issue text.
Description
What happens?
Output of the code block:
PS C:\Users\tibo\python_codes\pql> uv run t.py
relation.columns: ['foo', 'Foo']
to_arrow_table: ['foo', 'Foo']
pl.from_arrow: ['foo', 'Foo']
relation.pl eager: ['foo', 'Foo_1']
relation.pl lazy: ['foo', 'Foo']
pandas result: ['foo', 'Foo_1']
arrow query result: ['foo', 'Foo']
PS C:\Users\tibo\python_codes\pql>
pandas and polars dataframe don't give the same results as the rest.
To Reproduce
import duckdb
import polars as pl
rel = duckdb.from_query("select 1 as foo, 2 as Foo")
print("relation.columns:", rel.columns)
print("to_arrow_table:", rel.to_arrow_table().column_names)
print("pl.from_arrow:", pl.from_arrow(rel.to_arrow_table()).columns)
print("relation.pl eager:", rel.pl().columns)
print("relation.pl lazy:", rel.pl(lazy=True).collect().columns)
print("pandas result:", list(rel.df().columns))
print("arrow query result:", rel.to_arrow_reader().read_all().column_names)
OS:
Windows
DuckDB Package Version:
1.5.1
Python Version:
3.13.7
Full Name:
Stettler Thibaud
Affiliation:
University of Geneva
What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
1.5.2.dev40
Did you include all relevant data sets for reproducing the issue?
Yes
Did you include all code required to reproduce the issue?
- Yes, I have
Did you include all relevant configuration to reproduce the issue?
- Yes, I have
- Dominant language
- Python
- Stars
- 186
- Forks
- 113
- Avg merge
- 20h 58m
- Merged PRs (30d)
- 11
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from duckdb/duckdb-python
-
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
duckdb/duckdb-python#627 ·
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
duckdb/duckdb-python#576 · 3 comments ·
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
duckdb/duckdb-python#534 ·
-
needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
duckdb/duckdb-python#386 ·
-
needs triage
Difficulty 4/5 3-5 days Newbie friendliness 48/100
duckdb/duckdb-python#622 ·
All issues in duckdb/duckdb-python
Similar issues
-
bug
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
use-agent-os/agent-os#3314 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
BasedHardware/omi#15662 · 1 comment ·
-
documentation help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 90/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
AiursoftWeb/AnduinOS-2#19 ·