You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@beam.apache.org by GitBox <gi...@apache.org> on 2019/01/14 23:13:48 UTC
[beam] Diff for: [GitHub] chamikaramj merged pull request #7430: [BEAM-6391]
fix always true conditions
diff --git a/sdks/python/apache_beam/coders/coders.py b/sdks/python/apache_beam/coders/coders.py
index e84e08dc5133..e3293288176f 100644
--- a/sdks/python/apache_beam/coders/coders.py
+++ b/sdks/python/apache_beam/coders/coders.py
@@ -789,7 +789,7 @@ def __repr__(self):
def __eq__(self, other):
return (type(self) == type(other)
- and self._coders == self._coders)
+ and self._coders == other.coders)
def __hash__(self):
return hash(self._coders)
@@ -811,6 +811,9 @@ class TupleSequenceCoder(FastCoder):
def __init__(self, elem_coder):
self._elem_coder = elem_coder
+ def value_coder(self):
+ return self._elem_coder
+
def _create_impl(self):
return coder_impl.TupleSequenceCoderImpl(self._elem_coder.get_impl())
@@ -836,7 +839,7 @@ def __repr__(self):
def __eq__(self, other):
return (type(self) == type(other)
- and self._elem_coder == self._elem_coder)
+ and self._elem_coder == other.value_coder)
def __hash__(self):
return hash((type(self), self._elem_coder))
@@ -887,7 +890,7 @@ def __repr__(self):
def __eq__(self, other):
return (type(self) == type(other)
- and self._elem_coder == self._elem_coder)
+ and self._elem_coder == other.value_coder)
def __hash__(self):
return hash((type(self), self._elem_coder))
With regards,
Apache Git Services