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

critas 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 1f24444a868 Fix timestamp type data conversion issue in exported data 
of table model (#15918)
1f24444a868 is described below

commit 1f24444a868bcc6b65f957cd5fbdd18e0d846847
Author: Summer <[email protected]>
AuthorDate: Mon Jul 14 12:06:01 2025 +0800

    Fix timestamp type data conversion issue in exported data of table model 
(#15918)
    
    Co-authored-by: 2b3c511 <[email protected]>
---
 .../src/main/java/org/apache/iotdb/tool/data/ExportDataTable.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ExportDataTable.java
 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ExportDataTable.java
index afe7f1dbd48..4bb67cb3ea5 100644
--- 
a/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ExportDataTable.java
+++ 
b/iotdb-client/cli/src/main/java/org/apache/iotdb/tool/data/ExportDataTable.java
@@ -243,9 +243,6 @@ public class ExportDataTable extends AbstractExportData {
       int i = 0;
       while (i++ < linesPerFile) {
         RowRecord rowRecord = sessionDataSet.next();
-        if (rowRecord.getTimestamp() != 0) {
-          csvPrinterWrapper.print(timeTrans(rowRecord.getTimestamp()));
-        }
         rowRecord
             .getFields()
             .forEach(
@@ -255,6 +252,8 @@ public class ExportDataTable extends AbstractExportData {
                     if ((field.getDataType() == TSDataType.TEXT
                         || field.getDataType() == TSDataType.STRING)) {
                       fieldStringValue = "\"" + fieldStringValue + "\"";
+                    } else if (field.getDataType() == TSDataType.TIMESTAMP) {
+                      fieldStringValue = timeTrans(field.getLongV());
                     }
                     csvPrinterWrapper.print(fieldStringValue);
                   } else {

Reply via email to