damccorm commented on code in PR #41216:
URL: https://github.com/apache/beam/pull/41216#discussion_r4700792847
##########
sdks/python/apache_beam/coders/coder_impl.py:
##########
@@ -1148,6 +1148,14 @@ def __init__(self, coder_impls):
for c in coder_impls:
assert isinstance(c, CoderImpl), c
self._coder_impls = tuple(coder_impls)
+ self._num_coders = len(self._coder_impls)
+ self._is_kv = self._num_coders == 2
+ if self._is_kv:
Review Comment:
Add a comment explaining that:
1) We unroll kv coders for performance reasons since this is the most common
usage of AbstractComponentCoderImpl
2) There is no functional difference in how these are actually
encoded/decoded
--
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]