You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@iotdb.apache.org by ro...@apache.org on 2022/01/10 11:07:14 UTC
[iotdb] 01/01: [IOTDB-2333] Python client: the todf method throws exception
This is an automated email from the ASF dual-hosted git repository.
rong pushed a commit to branch iotdb-2333
in repository https://gitbox.apache.org/repos/asf/iotdb.git
commit 07e734c3be63915ff39b52dfd14068a4cb924819
Author: Steve Yurong Su <ro...@apache.org>
AuthorDate: Mon Jan 10 19:05:40 2022 +0800
[IOTDB-2333] Python client: the todf method throws exception
---
client-py/iotdb/utils/IoTDBConstants.py | 11 ++++++++++-
1 file changed, 10 insertions(+), 1 deletion(-)
diff --git a/client-py/iotdb/utils/IoTDBConstants.py b/client-py/iotdb/utils/IoTDBConstants.py
index 4710d70..50344d1 100644
--- a/client-py/iotdb/utils/IoTDBConstants.py
+++ b/client-py/iotdb/utils/IoTDBConstants.py
@@ -33,6 +33,9 @@ class TSDataType(Enum):
def __eq__(self, other) -> bool:
return self.value == other.value
+ def __hash__(self):
+ return self.value
+
@unique
class TSEncoding(Enum):
@@ -51,6 +54,9 @@ class TSEncoding(Enum):
def __eq__(self, other) -> bool:
return self.value == other.value
+ def __hash__(self):
+ return self.value
+
@unique
class Compressor(Enum):
@@ -66,4 +72,7 @@ class Compressor(Enum):
# this method is implemented to avoid the issue reported by:
# https://bugs.python.org/issue30545
def __eq__(self, other) -> bool:
- return self.value == other.value
\ No newline at end of file
+ return self.value == other.value
+
+ def __hash__(self):
+ return self.value