[Bug] 使用insertTablets插入,当MeasurementSchema 的TSDataType 是TSDataType.TEXT 时,不支持空值插入,指定了bitmap也不行
- Vorherrschende Sprache
- Java
- Sterne
- 6.4k
- Forks
- 1.2k
- Ø Merge
- 1 T. 23 Std.
- Gemergte PRs (30 T.)
- 115
Beschreibung
### 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!
Beitragsleitfaden
Rechercherichtung
Beginne mit Tablet.calOccupationOfOneColumn ungefähr bei Zeile 341 in Tablet.java und reproduziere dann das Problem mit einem TEXT MeasurementSchema, einem im Bitmap als null markierten Wert und sessionPool.insertTablets. Verfolge den Zugriff auf binaries[rowIndex].getLength(); die Aufgabe ist abgeschlossen, wenn das Tablet erfolgreich eingefügt wird, ohne dass für null TEXT-Werte eine NullPointerException auftritt.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- java
- Bereich
- databases
- Issue-Typ
- Bug
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Klar beschrieben
- Anfängerfreundlichkeit
- 38/100