[Bug] In version 1.3.3 of IoTDB, The time series function TIME_DIFFERENCE returns an index out of bounds error.
- 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, 1);
# query 1
SELECT TIME_DIFFERENCE(c0) FROM root.db0.t1 WHERE c0 < 0;
# query 2
SELECT TIME_DIFFERENCE(c0) FROM root.db0.t1 WHERE time != time;
```
### What did you expect to see?
The expected result set for Query 1 is: **empty set**
The expected result set for Query 2 is: **empty set**
### What did you see instead?
The actual result set returned by Query 1 is: **empty set**
The actual result set returned by Query 2 is: **Msg: org.apache.iotdb.jdbc.IoTDBSQLException: 301: Index 1 out of bounds for length 1**
### Anything else?
Dear IoTDB team, In the above queries, both Query 1 and Query 2 are unable to retrieve any data, so they both perform the `TIME_DIFFERENCE` operation on empty sets. However, Query 2 triggers an index out of bounds error during execution. This should be considered a crash error.
### 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 chạy bản tái hiện tối thiểu trên IoTDB 1.3.3, đồng thời so sánh Query 1 và Query 2. Theo dõi đường đi thực thi của TIME_DIFFERENCE đối với kết quả rỗng do Query 2 tạo ra; được xem là hoàn tất khi cả hai truy vấn đều trả về một tập rỗng mà không có ngoại lệ index-out-of-bounds. Issue không nêu tên tệp mã nguồn hoặc bài kiểm thử hiện có nào.
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ó
- 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