Skip to content

Commit bc8edf7

Browse files
authored
revert 'Optimize data size estimation for proto coder.' (#37710)
1 parent 48ed9ad commit bc8edf7

1 file changed

Lines changed: 0 additions & 6 deletions

File tree

sdks/python/apache_beam/coders/coder_impl.py

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -316,9 +316,6 @@ def decode(self, encoded):
316316
proto_message.ParseFromString(encoded) # This is in effect "ParsePartial".
317317
return proto_message
318318

319-
def estimate_size(self, value, nested=False):
320-
return self._get_nested_size(value.ByteSize(), nested)
321-
322319

323320
class DeterministicProtoCoderImpl(ProtoCoderImpl):
324321
"""For internal use only; no backwards-compatibility guarantees."""
@@ -338,9 +335,6 @@ def encode(self, value):
338335
def decode(self, value):
339336
return self.proto_plus_type.deserialize(value)
340337

341-
def estimate_size(self, value, nested=False):
342-
return self._get_nested_size(type(value).pb(value).ByteSize(), nested)
343-
344338

345339
UNKNOWN_TYPE = 0xFF
346340
NONE_TYPE = 0

0 commit comments

Comments
 (0)