Columns names outputs are inconsistents and case sensitive
- 主要言語
- Python
- スター
- 187
- フォーク
- 112
- 平均マージ
- 13時間 29分
- マージ済み PR(30日)
- 17
説明
### What happens?
Output of the code block:
```shell
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
```python
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?
- [x] Yes, I have
### Did you include all relevant configuration to reproduce the issue?
- [x] Yes, I have
コントリビューションガイド
調査の方向性
まず、提供された Python 再現コードを現在の DuckDB Python package に対して実行し、rel.pl()、rel.df()、Arrow 変換、および lazy result を比較します。次に、Python の relation-to-Polars と relation-to-pandas のエントリーポイントを追跡し、同等の出力が大文字と小文字の異なる列を一貫して扱えるように、回帰テストのカバレッジを追加または更新します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- pandas, python
- 領域
- data, database
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 静か
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 55/100