apache / apache/iotdb

[Bug] In version 1.3.3 of IoTDB, The trend calculation function DIFF does not correctly handle the non-ignore null-value attribute.

Đang mở
#14,525 1 bình luận 0 reaction 0 người được giao Xem trên GitHub
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

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!

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Hướng nghiên cứu

Bắt đầu bằng cách chạy các truy vấn tái hiện tối thiểu cho DIFF trên IoTDB 1.3.3 và xác định phần triển khai hàm DIFF cùng các kiểm thử hiện có của nó. So sánh hành vi khi ignoreNull được bật và tắt; hoàn tất khi Query 2 trả về null, null, null, 1, null trong khi Query 1 vẫn trả về null, 2, 1.

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, sql
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

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.