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

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


The following commit(s) were added to refs/heads/query_v3_py by this push:
     new f7c7f460cef fix IT
f7c7f460cef is described below

commit f7c7f460cefe9e3ac2c26eed78e4af2a6fd138b0
Author: HTHou <[email protected]>
AuthorDate: Tue Mar 25 15:20:48 2025 +0800

    fix IT
---
 iotdb-client/client-py/iotdb/utils/iotdb_rpc_dataset.py | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/iotdb-client/client-py/iotdb/utils/iotdb_rpc_dataset.py 
b/iotdb-client/client-py/iotdb/utils/iotdb_rpc_dataset.py
index aa3099d2984..878646546f9 100644
--- a/iotdb-client/client-py/iotdb/utils/iotdb_rpc_dataset.py
+++ b/iotdb-client/client-py/iotdb/utils/iotdb_rpc_dataset.py
@@ -251,6 +251,8 @@ class IoTDBRpcDataSet(object):
             self.__query_result[self.__query_result_index] = None
             self.__query_result_index += 1
             if self.ignore_timestamp is None or self.ignore_timestamp is False:
+                if time_array.dtype.byteorder == ">" and len(time_array) > 0:
+                    time_array = time_array.byteswap().newbyteorder()
                 result[0].append(time_array)
 
             for i, location in enumerate(
@@ -263,6 +265,8 @@ class IoTDBRpcDataSet(object):
                 # BOOLEAN, INT32, INT64, FLOAT, DOUBLE, TIMESTAMP, BLOB
                 if data_type in (0, 1, 2, 3, 4, 8, 10):
                     data_array = column_array
+                    if data_array.dtype.byteorder == ">" and len(data_array) > 
0:
+                        data_array = data_array.byteswap().newbyteorder()
                 # TEXT, STRING
                 elif data_type in (5, 11):
                     data_array = np.array([x.decode("utf-8") for x in 
column_array])
@@ -271,11 +275,12 @@ class IoTDBRpcDataSet(object):
                     data_array = 
pd.Series(column_array).apply(parse_int_to_date)
                 else:
                     raise RuntimeError("unsupported data type 
{}.".format(data_type))
-                tmp_array = []
+
                 null_indicator = null_indicators[location]
                 if len(data_array) < array_length or (
                     data_type == 0 and null_indicator is not None
                 ):
+                    tmp_array = []
                     # BOOLEAN, INT32, INT64, TIMESTAMP
                     if (
                         data_type == 0

Reply via email to