.cursor() loses schema information
- 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?
Whenever .cursor is called the description says `Create a duplicate of the current connection` however it actually losses the relevant schema information and instead switches to main
### To Reproduce
```python3
con = duckdb.connect()
con.execute("CREATE SCHEMA IF NOT EXISTS other_schema")
con.execute("USE other_schema")
print(con.cursor().execute("SELECT current_schema()").fetchone())
```
### OS:
Linux x86_64
### DuckDB Package Version:
1.4.0
### Python Version:
3.11.9
### Full Name:
Julian Meyers
### Affiliation:
Independent
### What is the latest build you tested with? If possible, we recommend testing with the latest nightly build.
I have not tested with any build
### Did you include all relevant data sets for reproducing the issue?
Not applicable - the reproduction does not require a data set
### 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 báo cáo với DuckDB Python package và kiểm tra phần triển khai cùng các bài kiểm thử của connection.cursor(). Theo dõi cách schema đang hoạt động được xử lý khi cursor được tạo; hoàn tất khi con.cursor().execute("SELECT current_schema()").fetchone() vẫn báo cáo other_schema thay vì main.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- python
- Lĩnh vực
- databases
- Loại issue
- Lỗi
- Độ khó
- 3/5
- Thời gian dự kiến
- 1-2 ngày
- Mức độ hoạt động
- Đình trệ
- Độ rõ ràng
- Khá rõ ràng
- Mức phù hợp với người mới
- 45/100