[Bug] 使用insertTablets插入,当MeasurementSchema 的TSDataType 是TSDataType.TEXT 时,不支持空值插入,指定了bitmap也不行
- 主要言語
- Java
- スター
- 6.4k
- フォーク
- 1.2k
- 平均マージ
- 1日 23時間
- マージ済み PR(30日)
- 115
説明
### 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!
コントリビューションガイド
調査の方向性
Tablet.java の 341 行目付近にある Tablet.calOccupationOfOneColumn から始め、TEXT MeasurementSchema、bitmap で null としてマークされた値、sessionPool.insertTablets を使って問題を再現します。binaries[rowIndex].getLength(); へのアクセスを追跡します。null の TEXT 値に対して NullPointerException が発生せず、tablet が正常に挿入されれば完了です。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- java
- 領域
- databases
- issue の種類
- バグ
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- 明確に書かれている
- 初心者へのやさしさ
- 38/100