This is an automated email from the ASF dual-hosted git repository.

jiangtian pushed a commit to branch cp_measurement_check
in repository https://gitbox.apache.org/repos/asf/iotdb.git

commit 7c29964687475ee05fd88a2c09cedf7dba5a7a84
Author: libo <[email protected]>
AuthorDate: Mon May 26 11:31:24 2025 +0800

    Add a judgment in order to avoid occur NPE when one value of 
measurementSchemas is null (#15574)
---
 .../iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java      | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java
index 410ac5376c9..c29eb15371c 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/resource/memory/InsertNodeMemoryEstimator.java
@@ -574,6 +574,10 @@ public class InsertNodeMemoryEstimator {
         RamUsageEstimator.alignObjectSize(
             NUM_BYTES_ARRAY_HEADER + NUM_BYTES_OBJECT_REF * values.length);
     for (int i = 0; i < values.length; i++) {
+      if (measurementSchemas[i] == null || measurementSchemas[i].getType() == 
null) {
+        size += NUM_BYTES_OBJECT_HEADER;
+        continue;
+      }
       switch (measurementSchemas[i].getType()) {
         case INT64:
         case TIMESTAMP:

Reply via email to