HTHou commented on code in PR #11231:
URL: https://github.com/apache/iotdb/pull/11231#discussion_r1356005039
##########
iotdb-client/client-py/iotdb/utils/Field.py:
##########
@@ -61,71 +58,73 @@ def get_data_type(self):
def is_null(self):
return self.__data_type is None
- def set_bool_value(self, value):
- self.__bool_value = value
+ def set_bool_value(self, value: bool):
+ self.value = value
def get_bool_value(self):
if self.__data_type is None:
raise Exception("Null Field Exception!")
- return self.__bool_value
+ if self.__data_type != TSDataType.BOOLEAN:
+ return None
+ return self.value
- def set_int_value(self, value):
- self.__int_value = value
+ def set_int_value(self, value: int):
+ self.value = value
def get_int_value(self):
if self.__data_type is None:
raise Exception("Null Field Exception!")
- return self.__int_value
+ if self.__data_type != TSDataType.INT32:
+ return None
+ return np.int32(self.value)
Review Comment:
Fixed
--
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]