Columns names outputs are inconsistents and case sensitive
- Ngôn ngữ chính
- Python
- Star
- 187
- Fork
- 112
- Merge trung bình
- 13 giờ 29 phút
- Pull request đã merge (30 ngày)
- 17
Mô tả
### 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
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách chạy bản tái hiện Python được cung cấp với gói Python DuckDB hiện tại và so sánh rel.pl(), rel.df(), các chuyển đổi Arrow và kết quả lazy. Tiếp theo, lần theo các điểm đầu vào Python relation-to-Polars và relation-to-pandas, rồi thêm hoặc cập nhật phạm vi kiểm thử hồi quy để các đầu ra tương đương xử lý nhất quán các cột khác nhau về chữ hoa chữ thường.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- pandas, python
- Lĩnh vực
- data, database
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Ít trao đổi
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 55/100