[Bug] In version 1.3.3 of IoTDB, The trend calculation function DIFF does not correctly handle the non-ignore null-value attribute.
- 主要言語
- 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
version 1.3.3 (Build: ad95a7e)
### Describe the bug and provide the minimal reproduce step
```
DROP DATABASE root.db0.t1
CREATE DATABASE root.db0.t1
CREATE TIMESERIES root.db0.t1.c0 WITH datatype=INT32;
INSERT INTO root.db0.t1(timestamp, c0) VALUES (1641024000000, 0), (1641024005000, null), (1641024010000, 2), (1641024015000, 3), (1641024020000, null);
CREATE TIMESERIES root.db0.t1.c1 WITH datatype=INT32;
INSERT INTO root.db0.t1(timestamp, c1) VALUES (1641024000000, 0), (1641024005000, 1), (1641024010000, 2), (1641024015000, 3), (1641024020000, 4);
# query 1
select DIFF(c0) from root.db0.t1;
# query 2
select DIFF(c0, 'ignoreNull'='false') from root.db0.t1;
```
### What did you expect to see?
The expected result set for Query 1 is: **null, 2, 1**
The expected result set for Query 2 is: **null, null, null, 1, null**
### What did you see instead?
The actual result set returned by Query 1 is: **null, 2, 1**
The actual result set returned by Query 2 is: **null, 2, 1**
### Anything else?
Dear IoTDB team, In the above trend calculation function queries, Query 1 uses the `DIFF` function with the **ignore null-value** attribute enabled, while Query 2 has it disabled. However, the results returned by Query 2 indicate that null-value data was not included in the trend calculation, which does not meet expectations.
### Are you willing to submit a PR?
- [ ] I'm willing to submit a PR!
コントリビューションガイド
調査の方向性
まず IoTDB 1.3.3 に対して DIFF の最小再現クエリを実行し、DIFF 関数の実装と既存のテストを見つけてください。ignoreNull を有効にした場合と無効にした場合の動作を比較します。完了条件は、Query 2 が null, null, null, 1, null を返し、Query 1 は引き続き null, 2, 1 を返すことです。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java, sql
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 45/100