TennyZhuang commented on code in PR #5324:
URL: https://github.com/apache/opendal/pull/5324#discussion_r1844975194
##########
bindings/python/src/operator.rs:
##########
@@ -184,15 +200,21 @@ impl Operator {
}
pub fn capability(&self) -> PyResult<capability::Capability> {
- Ok(capability::Capability::new(self.0.info().full_capability()))
+ Ok(capability::Capability::new(
+ self.core.info().full_capability(),
+ ))
}
pub fn to_async_operator(&self) -> PyResult<AsyncOperator> {
- Ok(AsyncOperator(self.0.clone().into()))
+ Ok(AsyncOperator {
+ core: self.core.clone().into(),
+ __scheme: self.__scheme.clone(),
+ __map: self.__map.clone(),
+ })
}
fn __repr__(&self) -> String {
Review Comment:
I prefer don’t implement __hash__ and __eq__ for Operator, and remove the
equal assertion based on __repr__.
(schema, map) can’t identify an Operator, leave __eq__ and __empty__ empty
is better. Only the ID of PyObject can identify the Operator.
--
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]