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

rong pushed a commit to branch dev/1.3
in repository https://gitbox.apache.org/repos/asf/iotdb.git


The following commit(s) were added to refs/heads/dev/1.3 by this push:
     new 9c2392f2622 Pipe: Fix the null pointer caused by uninitialized 
TabletInsertionEventParser LocalDate and Binary arrays (#14058) (#14068)
9c2392f2622 is described below

commit 9c2392f26223ba8e5ccf76fa0ea22a850067183d
Author: Zhenyu Luo <[email protected]>
AuthorDate: Wed Nov 13 11:09:15 2024 +0800

    Pipe: Fix the null pointer caused by uninitialized 
TabletInsertionEventParser LocalDate and Binary arrays (#14058) (#14068)
---
 .../db/pipe/event/common/tablet/TabletInsertionDataContainer.java | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/TabletInsertionDataContainer.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/TabletInsertionDataContainer.java
index ae3925ac95f..aa1ee8e6325 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/TabletInsertionDataContainer.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/event/common/tablet/TabletInsertionDataContainer.java
@@ -641,12 +641,16 @@ public class TabletInsertionDataContainer {
         valueColumns[columnIndex] = new boolean[rowSize];
         break;
       case DATE:
-        valueColumns[columnIndex] = new LocalDate[rowSize];
+        final LocalDate[] dates = new LocalDate[rowSize];
+        Arrays.fill(dates, EMPTY_LOCALDATE);
+        valueColumns[columnIndex] = dates;
         break;
       case TEXT:
       case BLOB:
       case STRING:
-        valueColumns[columnIndex] = new Binary[rowSize];
+        final Binary[] columns = new Binary[rowSize];
+        Arrays.fill(columns, Binary.EMPTY_VALUE);
+        valueColumns[columnIndex] = columns;
         break;
       default:
         throw new UnSupportedDataTypeException(

Reply via email to