HTHou commented on code in PR #11231:
URL: https://github.com/apache/iotdb/pull/11231#discussion_r1339819129
##########
iotdb-client/client-py/iotdb/utils/IoTDBRpcDataSet.py:
##########
@@ -171,51 +178,45 @@ def resultset_to_pandas(self):
)
if time_array.dtype.byteorder == ">":
time_array = time_array.byteswap().newbyteorder("<")
- if (
- self.get_ignore_timestamp() is None
- or self.get_ignore_timestamp() is False
- ):
+ if self.ignore_timestamp is None or self.ignore_timestamp is False:
result[IoTDBRpcDataSet.TIMESTAMP_STR].append(time_array)
self.__query_data_set.time = []
total_length = len(time_array)
for i in range(len(self.__query_data_set.bitmapList)):
- if self.get_ignore_timestamp() is True:
+ if self.ignore_timestamp is True:
column_name = self.get_column_names()[i]
else:
column_name = self.get_column_names()[i + 1]
location = (
- self.__column_ordinal_dict[column_name]
- - IoTDBRpcDataSet.START_INDEX
+ self.column_ordinal_dict[column_name] -
IoTDBRpcDataSet.START_INDEX
)
if location < 0:
continue
- data_type = self.__column_type_deduplicated_list[location]
+ data_type = self.column_type_deduplicated_list[location]
value_buffer = self.__query_data_set.valueList[location]
value_buffer_len = len(value_buffer)
-
- data_array = None
- if data_type == TSDataType.DOUBLE:
+ if data_type == 4:
data_array = np.frombuffer(
value_buffer, np.dtype(np.double).newbyteorder(">")
)
- elif data_type == TSDataType.FLOAT:
+ elif data_type == 3:
Review Comment:
The test on my mac shows using the number directly is faster...
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]