[Bug] 使用insertTablets插入,当MeasurementSchema 的TSDataType 是TSDataType.TEXT 时,不支持空值插入,指定了bitmap也不行
- Langage dominant
- Java
- Étoiles
- 6.4k
- Forks
- 1.2k
- Merge moyen
- 1 j 23 h
- PR mergées (30 j)
- 115
Description
### 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!
Guide de contribution
Ouvrir le guide de contribution
Piste de recherche
Commencez par Tablet.calOccupationOfOneColumn autour de la ligne 341 de Tablet.java, puis reproduisez le problème avec un TEXT MeasurementSchema, une valeur null marquée dans le bitmap et sessionPool.insertTablets. Suivez l’accès à binaries[rowIndex].getLength(); le travail est terminé lorsque le tablet est inséré avec succès sans NullPointerException pour les valeurs TEXT null.
Rédigé par le modèle d'indexation à partir du texte de l'issue.
Évaluation
- Stack technique
- java
- Domaine
- databases
- Type d'issue
- Bug
- Difficulté
- 3/5
- Temps estimé
- 1-2 jours
- Activité
- À l'abandon
- Clarté
- Clairement spécifiée
- Accessibilité débutants
- 38/100