Abacn commented on code in PR #38206:
URL: https://github.com/apache/beam/pull/38206#discussion_r3101028441


##########
sdks/python/apache_beam/coders/coder_impl.py:
##########
@@ -850,6 +850,22 @@ def estimate_size(self, unused_value, nested=False):
     return 2
 
 
+class ByteCoderImpl(StreamCoderImpl):
+  """For internal use only; no backwards-compatibility guarantees."""
+  def encode_to_stream(self, value, out, nested):
+    # type: (int, create_OutputStream, bool) -> None
+    out.write_byte(value)
+
+  def decode_from_stream(self, in_stream, nested):
+    # type: (create_InputStream, bool) -> float
+    return in_stream.read_byte()
+
+  def estimate_size(self, unused_value, nested=False):
+    # type: (Any, bool) -> int
+    # A short is encoded as 2 bytes, regardless of nesting.

Review Comment:
   Thanks for catching that. Cleaned up copy-paste leftover (and fixed another 
pre-existing leftover in BigEndianShortCoderImpl)



-- 
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]

Reply via email to