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

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

commit 8386cdfce3249a6e1e7219e3a15b17869761f786
Author: Tian Jiang <[email protected]>
AuthorDate: Wed Sep 16 16:48:32 2026 +0800

    tmp
---
 .../iotdb/session/pool/TableSessionWrapper.java    | 31 ++++++++++++++++++++++
 1 file changed, 31 insertions(+)

diff --git 
a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionWrapper.java
 
b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionWrapper.java
index 9478c35d3cb..627501a3200 100644
--- 
a/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionWrapper.java
+++ 
b/iotdb-client/session/src/main/java/org/apache/iotdb/session/pool/TableSessionWrapper.java
@@ -29,10 +29,13 @@ import org.apache.iotdb.session.Session;
 import org.apache.iotdb.session.TableSession;
 import org.apache.iotdb.session.i18n.SessionMessages;
 
+import org.apache.tsfile.enums.ColumnCategory;
+import org.apache.tsfile.enums.TSDataType;
 import org.apache.tsfile.write.record.Tablet;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import java.util.List;
 import java.util.Objects;
 import java.util.concurrent.atomic.AtomicBoolean;
 
@@ -49,12 +52,15 @@ public class TableSessionWrapper implements ITableSession {
 
   private Session session;
 
+  private final TableSession tableSession;
+
   private final SessionPool sessionPool;
 
   private final AtomicBoolean closed;
 
   protected TableSessionWrapper(Session session, SessionPool sessionPool) {
     this.session = session;
+    this.tableSession = new TableSession(session);
     this.sessionPool = sessionPool;
     this.closed = new AtomicBoolean(false);
   }
@@ -83,6 +89,31 @@ public class TableSessionWrapper implements ITableSession {
     }
   }
 
+  @Override
+  public NumericRowPreparedStatement prepareInsertNumericRow(
+      String tableName,
+      List<String> columnNames,
+      List<TSDataType> dataTypes,
+      List<ColumnCategory> columnCategories)
+      throws StatementExecutionException, IoTDBConnectionException {
+    return tableSession.prepareInsertNumericRow(
+        tableName, columnNames, dataTypes, columnCategories);
+  }
+
+  @Override
+  public void executePreparedInsertNumericRow(
+      NumericRowPreparedStatement prepared, long timestamp, long[] values, 
String[] tagValues)
+      throws StatementExecutionException, IoTDBConnectionException {
+    try {
+      tableSession.executePreparedInsertNumericRow(prepared, timestamp, 
values, tagValues);
+    } catch (IoTDBConnectionException e) {
+      sessionPool.cleanSessionAndMayThrowConnectionException(session);
+      closed.set(true);
+      session = null;
+      throw e;
+    }
+  }
+
   @Override
   public SessionDataSet executeQueryStatement(String sql)
       throws StatementExecutionException, IoTDBConnectionException {

Reply via email to