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

justinchen 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 ea4fd1a8177 [To dev/1.3] Pipe: Fixed the problem of null pointer and 
incorrect Tablet format being modified during TSFile construction (#15602) 
(#15623)
ea4fd1a8177 is described below

commit ea4fd1a8177fa19e25fdfb9cbe84fe5dd0a067ec
Author: Zhenyu Luo <[email protected]>
AuthorDate: Thu Jun 5 10:16:44 2025 +0800

    [To dev/1.3] Pipe: Fixed the problem of null pointer and incorrect Tablet 
format being modified during TSFile construction (#15602) (#15623)
---
 .../payload/evolvable/batch/PipeTabletEventTsFileBatch.java   | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/payload/evolvable/batch/PipeTabletEventTsFileBatch.java
 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/payload/evolvable/batch/PipeTabletEventTsFileBatch.java
index d839f422f03..a03f2bd970a 100644
--- 
a/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/payload/evolvable/batch/PipeTabletEventTsFileBatch.java
+++ 
b/iotdb-core/datanode/src/main/java/org/apache/iotdb/db/pipe/connector/payload/evolvable/batch/PipeTabletEventTsFileBatch.java
@@ -549,10 +549,9 @@ public class PipeTabletEventTsFileBatch extends 
PipeTabletEventBatch {
       for (int i = 0, size = tabletList.size(); i < size; ++i) {
         final Tablet tablet = tabletList.get(i);
 
-        // convert date value to int
-        // refer to
+        // convert date value to int refer to
         // 
org.apache.iotdb.db.storageengine.dataregion.memtable.WritableMemChunk.writeNonAlignedTablet
-        final Object[] values = tablet.values;
+        final Object[] values = Arrays.copyOf(tablet.values, 
tablet.values.length);
         for (int j = 0; j < tablet.getSchemas().size(); ++j) {
           final MeasurementSchema schema = tablet.getSchemas().get(j);
           if (Objects.nonNull(schema)
@@ -573,16 +572,16 @@ public class PipeTabletEventTsFileBatch extends 
PipeTabletEventBatch {
                 new PartialPath(tablet.deviceId),
                 isTabletAlignedList.get(i),
                 tablet.getSchemas().stream()
-                    .map(MeasurementSchema::getMeasurementId)
+                    .map(m -> Objects.nonNull(m) ? m.getMeasurementId() : null)
                     .toArray(String[]::new),
                 tablet.getSchemas().stream()
-                    .map(MeasurementSchema::getType)
+                    .map(m -> Objects.nonNull(m) ? m.getType() : null)
                     .toArray(TSDataType[]::new),
                 // TODO: cast
                 tablet.getSchemas().toArray(new MeasurementSchema[0]),
                 tablet.timestamps,
                 tablet.bitMaps,
-                tablet.values,
+                values,
                 tablet.rowSize);
 
         final int start = 0;

Reply via email to