[Bug]
- Ngôn ngữ chính
- Java
- Star
- 6.4k
- Fork
- 1.2k
- Merge trung bình
- 1 ngày 23 giờ
- Pull request đã merge (30 ngày)
- 115
Mô tả
### Search before asking
- [x] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.
### Version
2.0.4
### Describe the bug and provide the minimal reproduce step
Cursor.py Cursor class function execute() logs an error but does not return an error
the user, that is me, has to look at the console to see the error written to the console - for my interfacing code
to see the error, the work around is, as far as I can tell, to add a logging stream handler and
then check that output after each currsor.execute() call
I'm thinking that the right thing to do would be for the execute function to return an error
Note also the logged error is not as complete as it could be, that is, the error message is vague when
the logged message is failed to execute statement
the cli message is, for my failed case returned from copying the sql statement into the cli is:
INSERT INTO root.db.haystack.ops.mhr_uhf_tca_power_data.data(timestamp,name,ts,ip,hbe,hbp,state,info)values(1755791127,2.300911,5.917624,8.158934,14.789080,18.413770,22.073236,24.537928,29.037948,32.026225,37.750438,42.648634,45.208809)
Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 701: the measurementList's size 7 is not consistent with the valueList's size 12
So I'm asking for two things:
1. return an error to the calling function when there is an error
2. return equal information to what the cli returns
thank you
bob s
### What did you expect to see?
I expected the calling function to return an error
### What did you see instead?
no error returned
### Anything else?
_No response_
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
Hướng dẫn đóng góp
Hướng nghiên cứu
Bắt đầu bằng cách kiểm tra hành vi của Cursor.execute() trong Cursor.py và đường dẫn lỗi đối với các câu lệnh thất bại. Tái hiện sự không khớp về số lượng measurement/value đã được báo cáo, sau đó so sánh lỗi được trả về với chẩn đoán đầy đủ của CLI. Công việc được hoàn tất khi mã gọi nhận được một lỗi và thông báo chứa mức độ chi tiết tương đương với đầu ra của CLI.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Đánh giá
- Công nghệ
- java, python
- Lĩnh vực
- api, databases
- Loại issue
- Lỗi
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 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
- 35/100