ColinLeeo commented on code in PR #739:
URL: https://github.com/apache/tsfile/pull/739#discussion_r2958750712


##########
python/tsfile/tsfile_writer.pyx:
##########
@@ -125,12 +125,15 @@ cdef class TsFileWriterPy:
         finally:
             free_c_tablet(ctablet)
 
-    def write_arrow_batch(self, table_name: str, data):
+    def write_arrow_batch(self, table_name: str, data, time_col_index: int = 
-1):
         """
         Write an Arrow RecordBatch or Table into tsfile using Arrow C Data
         Interface for efficient batch writing without Python-level row loops.
         table_name: target table name (must be registered)
         data: pyarrow.RecordBatch or pyarrow.Table
+        time_col_index: index of the time column in the Arrow schema.
+            >= 0: use the specified column as the time column.
+            <  0: auto-detect by Arrow timestamp type (default).

Review Comment:
   Fixed



##########
cpp/src/cwrapper/tsfile_cwrapper.h:
##########
@@ -719,9 +719,13 @@ ERRNO _tsfile_writer_write_tablet(TsFileWriter writer, 
Tablet tablet);
 ERRNO _tsfile_writer_write_table(TsFileWriter writer, Tablet tablet);
 
 // Write Arrow C Data Interface batch into a table (Arrow -> Tablet -> write).
+// time_col_index: index of the time column in the Arrow struct.
+//   >= 0: use the specified column as the time column.
+//   <  0: auto-detect by Arrow format "tsn:" (TIMESTAMP type).

Review Comment:
   Fixed



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to