This is an automated email from the ASF dual-hosted git repository.
haonan pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/iotdb.git
The following commit(s) were added to refs/heads/master by this push:
new e4366a4f5b [IOTDB-4239]fix NPE to insert a null value into a TEXT
timeseries . (#7153)
e4366a4f5b is described below
commit e4366a4f5bc456867dab2375cba688522c7ebd49
Author: Zhijia Cao <[email protected]>
AuthorDate: Thu Sep 8 09:38:52 2022 +0800
[IOTDB-4239]fix NPE to insert a null value into a TEXT timeseries . (#7153)
---
.../java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
index 44943733e6..570b97421a 100644
---
a/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
+++
b/server/src/main/java/org/apache/iotdb/db/engine/storagegroup/TsFileProcessor.java
@@ -555,7 +555,7 @@ public class TsFileProcessor {
: 0;
}
// TEXT data mem size
- if (dataTypes[i] == TSDataType.TEXT) {
+ if (dataTypes[i] == TSDataType.TEXT && values[i] != null) {
textDataIncrement += MemUtils.getBinarySize((Binary) values[i]);
}
}
@@ -610,7 +610,7 @@ public class TsFileProcessor {
* dataTypes[i].getDataTypeSize();
}
// TEXT data mem size
- if (dataTypes[i] == TSDataType.TEXT) {
+ if (dataTypes[i] == TSDataType.TEXT && values[i] != null) {
textDataIncrement += MemUtils.getBinarySize((Binary) values[i]);
}
}