You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ha...@apache.org on 2024/11/25 07:07:33 UTC

(iotdb) branch refector_py_table_session updated (ff4dc098e23 -> f5e9f88e5e0)

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

haonan pushed a change to branch refector_py_table_session
in repository https://gitbox.apache.org/repos/asf/iotdb.git


    from ff4dc098e23 refector py table session
     new 233e9413683 fix python 3.6
     new f5e9f88e5e0 fix IY

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 iotdb-client/client-py/iotdb/table_session.py                |  2 +-
 .../client-py/tests/integration/test_relational_session.py   |  8 ++++++--
 .../client-py/tests/integration/test_tablemodel_insert.py    | 12 +++++++++---
 3 files changed, 16 insertions(+), 6 deletions(-)


(iotdb) 02/02: fix IY

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit f5e9f88e5e00ac7a36e7fecbb3ad6f225602121a
Author: HTHou <hh...@outlook.com>
AuthorDate: Mon Nov 25 15:07:14 2024 +0800

    fix IY
---
 .../client-py/tests/integration/test_relational_session.py   |  8 ++++++--
 .../client-py/tests/integration/test_tablemodel_insert.py    | 12 +++++++++---
 2 files changed, 15 insertions(+), 5 deletions(-)

diff --git a/iotdb-client/client-py/tests/integration/test_relational_session.py b/iotdb-client/client-py/tests/integration/test_relational_session.py
index 75a4294bc8f..d57de62cebc 100644
--- a/iotdb-client/client-py/tests/integration/test_relational_session.py
+++ b/iotdb-client/client-py/tests/integration/test_relational_session.py
@@ -55,13 +55,17 @@ def session_test(use_session_pool=False):
 
             session_pool = TableSessionPool(
                 config={
-                    "node_urls": f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}"
+                    "node_urls": [
+                        f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}",
+                    ]
                 }
             )
         else:
             session = TableSession(
                 config={
-                    "node_urls": f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}"
+                    "node_urls": [
+                        f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}",
+                    ]
                 }
             )
 
diff --git a/iotdb-client/client-py/tests/integration/test_tablemodel_insert.py b/iotdb-client/client-py/tests/integration/test_tablemodel_insert.py
index d711b10e035..8d1d68ae393 100644
--- a/iotdb-client/client-py/tests/integration/test_tablemodel_insert.py
+++ b/iotdb-client/client-py/tests/integration/test_tablemodel_insert.py
@@ -32,7 +32,9 @@ def test_insert_use_tablet():
         db: IoTDBContainer
         session = TableSession(
             config={
-                "node_urls": f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}"
+                "node_urls": [
+                    f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}",
+                ]
             }
         )
 
@@ -623,7 +625,9 @@ def test_insert_relational_tablet_use_numpy_tablet():
         db: IoTDBContainer
         session = TableSession(
             config={
-                "node_urls": f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}"
+                "node_urls": [
+                    f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}",
+                ]
             }
         )
 
@@ -1106,7 +1110,9 @@ def test_insert_relational_tablet_auto_create():
         db: IoTDBContainer
         session = TableSession(
             config={
-                "node_urls": f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}"
+                "node_urls": [
+                    f"{db.get_container_host_ip()}:{db.get_exposed_port(6667)}",
+                ]
             }
         )
 


(iotdb) 01/02: fix python 3.6

Posted by ha...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit 233e941368399e889dc9507f0975acf1deeac901
Author: HTHou <hh...@outlook.com>
AuthorDate: Mon Nov 25 14:55:02 2024 +0800

    fix python 3.6
---
 iotdb-client/client-py/iotdb/table_session.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/iotdb-client/client-py/iotdb/table_session.py b/iotdb-client/client-py/iotdb/table_session.py
index 2dac840dffd..849f7c53ad1 100644
--- a/iotdb-client/client-py/iotdb/table_session.py
+++ b/iotdb-client/client-py/iotdb/table_session.py
@@ -47,7 +47,7 @@ class TableSession(object):
         else:
             self.__session = self.__session_pool.get_session()
 
-    def insert(self, tablet: Union[Tablet | NumpyTablet]):
+    def insert(self, tablet: Union[Tablet, NumpyTablet]):
         self.__session.insert_relational_tablet(tablet)
 
     def execute_non_query_statement(self, sql: str):