[Bug] 使用insertTablets插入,当MeasurementSchema 的TSDataType 是TSDataType.TEXT 时,不支持空值插入,指定了bitmap也不行
- 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
- [ ] I searched in the [issues](https://github.com/apache/iotdb/issues) and found nothing similar.
### Version
1.1.0
### Describe the bug and provide the minimal reproduce step
1、构建Table schemas ,指定TSDataType 类型是TSDataType.TEXT
2、构造模拟数据插入空值
```java
if (containNull && i % 9 == 0) {
tablet.bitMaps[i].mark((int) row);
}else{
tablet.addValue(schemaList.get(i).getMeasurementId(),row,random.nextDouble()*1000+"");
}
```
3、插入 sessionPool.insertTablets(tabletMap, false); 报错
Exception in thread "main" java.lang.NullPointerException
at org.apache.iotdb.tsfile.write.record.Tablet.calOccupationOfOneColumn(Tablet.java:341)
### What did you expect to see?
希望正常入库
### What did you see instead?
Exception in thread "main" java.lang.NullPointerException
at org.apache.iotdb.tsfile.write.record.Tablet.calOccupationOfOneColumn(Tablet.java:341)
source code: Tablet l ine:252
for(int rowIndex = 0; rowIndex < this.rowSize; ++rowIndex) {
valueOccupation += ### binaries[rowIndex].getLength();
}
### 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 với Tablet.calOccupationOfOneColumn quanh dòng 341 của Tablet.java, sau đó tái hiện vấn đề bằng cách sử dụng một TEXT MeasurementSchema, một giá trị null được đánh dấu trong bitmap và sessionPool.insertTablets. Theo dõi việc truy cập binaries[rowIndex].getLength(); hoàn thành khi tablet được chèn thành công mà không xảy ra NullPointerException đối với các giá trị TEXT null.
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
- 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
- Đặc tả rõ ràng
- Mức phù hợp với người mới
- 38/100