diff --git a/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py b/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py index d575caf8a09a..e9621bf81b96 100644 --- a/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py +++ b/iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py @@ -216,17 +216,7 @@ def construct_one_data_frame(self): data_array.dtype.newbyteorder("<") ) if len(data_array) < total_length: - # INT32, INT64, BOOLEAN, TIMESTAMP, DATE - if ( - data_type == 0 - or data_type == 1 - or data_type == 2 - or data_type == 8 - or data_type == 9 - ): - tmp_array = np.full(total_length, np.nan, np.float32) - else: - tmp_array = np.full(total_length, None, dtype=object) + tmp_array = np.full(total_length, None, dtype=object) bitmap_buffer = self.__query_data_set.bitmapList[location] buffer = _to_bitbuffer(bitmap_buffer) diff --git a/iotdb-client/client-py/tests/integration/test_new_data_types.py b/iotdb-client/client-py/tests/integration/test_new_data_types.py index 3452d6c1b7bd..ce89b5b83165 100644 --- a/iotdb-client/client-py/tests/integration/test_new_data_types.py +++ b/iotdb-client/client-py/tests/integration/test_new_data_types.py @@ -153,5 +153,32 @@ def session_test(use_session_pool=False): assert rows == 10 assert columns == 5 + session.insert_records( + [device_id, device_id], + [11, 12], + [measurements_new_type, ["s_02", "s_03", "s_04"]], + [ + data_types_new_type, + [ + TSDataType.TIMESTAMP, + TSDataType.BLOB, + TSDataType.STRING, + ], + ], + [ + [date(1971, 1, 1), 11, b"\x12\x34", "test11"], + [12, b"\x12\x34", "test12"], + ], + ) + + with session.execute_query_statement( + "select s_01,s_02,s_03,s_04 from root.sg_test_01.d_04 where time > 10" + ) as dataset: + cnt = 0 + while dataset.has_next(): + cnt += 1 + print(dataset.next()) + assert cnt == 2 + # close session connection. session.close()