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 ceae5b6d887 resolve the NPE problem (#15646)
ceae5b6d887 is described below
commit ceae5b6d88791cff39fef55dfaaafd7028ab699f
Author: libo <[email protected]>
AuthorDate: Thu Jun 5 08:52:23 2025 +0800
resolve the NPE problem (#15646)
---
.../db/storageengine/dataregion/memtable/WritableMemChunkGroup.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/WritableMemChunkGroup.java
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/WritableMemChunkGroup.java
index 854ca9c8d2c..56f69a447f6 100644
---
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/WritableMemChunkGroup.java
+++
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/storageengine/dataregion/memtable/WritableMemChunkGroup.java
@@ -54,7 +54,7 @@ public class WritableMemChunkGroup implements
IWritableMemChunkGroup {
int end,
TSStatus[] results) {
for (int i = 0; i < columns.length; i++) {
- if (columns[i] == null) {
+ if (columns[i] == null || schemaList.get(i) == null) {
continue;
}
IWritableMemChunk memChunk =
createMemChunkIfNotExistAndGet(schemaList.get(i));
@@ -97,7 +97,7 @@ public class WritableMemChunkGroup implements
IWritableMemChunkGroup {
@Override
public void writeRow(long insertTime, Object[] objectValue,
List<IMeasurementSchema> schemaList) {
for (int i = 0; i < objectValue.length; i++) {
- if (objectValue[i] == null) {
+ if (objectValue[i] == null || schemaList.get(i) == null) {
continue;
}
IWritableMemChunk memChunk =
createMemChunkIfNotExistAndGet(schemaList.get(i));