apache / apache/iotdb

[Bug]

オープン
#16,230 コメント 1 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
Java
スター
6.4k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
115

説明

### 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!

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

まず、Cursor.py の Cursor.execute() の動作と、失敗したステートメントのエラーパスを調査します。報告された測定値と値の個数の不一致を再現し、その後、返されたエラーを CLI の完全な診断結果と比較します。呼び出し元のコードがエラーを受け取り、メッセージに CLI の出力と同等の詳細が含まれていれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
java, python
領域
api, databases
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。