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 adb088af0b6 fix IT
adb088af0b6 is described below
commit adb088af0b68c5851f2b12d15e2aeef7201f76c5
Author: HTHou <[email protected]>
AuthorDate: Tue Mar 25 14:30:20 2025 +0800
fix IT
---
.../client-py/iotdb/tsfile/utils/tsblock_serde.py | 17 +++++++++++------
iotdb-client/client-py/iotdb/utils/iotdb_rpc_dataset.py | 2 +-
2 files changed, 12 insertions(+), 7 deletions(-)
diff --git a/iotdb-client/client-py/iotdb/tsfile/utils/tsblock_serde.py
b/iotdb-client/client-py/iotdb/tsfile/utils/tsblock_serde.py
index a09c73793e6..abdd19e0d0b 100644
--- a/iotdb-client/client-py/iotdb/tsfile/utils/tsblock_serde.py
+++ b/iotdb-client/client-py/iotdb/tsfile/utils/tsblock_serde.py
@@ -220,18 +220,23 @@ def read_run_length_column(buffer, data_type,
position_count):
column, null_indicators, buffer = read_column(encoding[0], buffer,
data_type, 1)
return (
repeat(column, data_type, position_count),
- None if null_indicators is None else null_indicators * position_count,
+ (
+ None
+ if null_indicators is None
+ else np.full(position_count, null_indicators[0])
+ ),
buffer,
)
def repeat(column, data_type, position_count):
if data_type in (0, 5):
- return (
- np.full(position_count, column[0])
- if column.size == 1
- else np.array(column * position_count, dtype=object)
- )
+ if column.size == 1:
+ return np.full(
+ position_count, column[0], dtype=(bool if data_type == 0 else
object)
+ )
+ else:
+ return np.array(column * position_count, dtype=object)
else:
res = bytearray()
for _ in range(position_count):
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 3ace4c1903d..aa3099d2984 100644
--- a/iotdb-client/client-py/iotdb/utils/iotdb_rpc_dataset.py
+++ b/iotdb-client/client-py/iotdb/utils/iotdb_rpc_dataset.py
@@ -287,7 +287,7 @@ class IoTDBRpcDataSet(object):
# FLOAT, DOUBLE
elif data_type == 3 or data_type == 4:
tmp_array = np.full(
- array_length, np.nan, dtype=data_array.dtype
+ array_length, np.nan, dtype=data_type.np_dtype()
)
# TEXT, STRING, BLOB, DATE
elif (