diff --git a/sdks/python/apache_beam/coders/row_coder.py b/sdks/python/apache_beam/coders/row_coder.py index 077da8ed5164..815dcd0cd740 100644 --- a/sdks/python/apache_beam/coders/row_coder.py +++ b/sdks/python/apache_beam/coders/row_coder.py @@ -17,8 +17,6 @@ # pytype: skip-file -from google.protobuf import json_format - from apache_beam.coders import typecoders from apache_beam.coders.coder_impl import LogicalTypeCoderImpl from apache_beam.coders.coder_impl import RowCoderImpl @@ -87,13 +85,6 @@ def as_deterministic_coder(self, step_label, error_message=None): def to_type_hint(self): return self._type_hint - def as_cloud_object(self, coders_context=None): - value = super().as_cloud_object(coders_context) - - value['schema'] = json_format.MessageToJson(self.schema).encode('utf-8') - - return value - def __hash__(self): return hash(self.schema.SerializeToString()) diff --git a/sdks/python/apache_beam/coders/row_coder_test.py b/sdks/python/apache_beam/coders/row_coder_test.py index 43ce0403b01d..7b4b76950cb6 100644 --- a/sdks/python/apache_beam/coders/row_coder_test.py +++ b/sdks/python/apache_beam/coders/row_coder_test.py @@ -22,7 +22,6 @@ from itertools import chain import numpy as np -from google.protobuf import json_format import apache_beam as beam from apache_beam.coders import RowCoder @@ -374,16 +373,6 @@ def test_row_coder_fail_early_bad_schema(self): self.assertRaisesRegex( ValueError, "type_with_no_typeinfo", lambda: RowCoder(schema_proto)) - def test_row_coder_cloud_object_schema(self): - schema_proto = schema_pb2.Schema() - schema_proto_json = json_format.MessageToJson(schema_proto).encode('utf-8') - - coder = RowCoder(schema_proto) - - cloud_object = coder.as_cloud_object() - - self.assertEqual(schema_proto_json, cloud_object['schema']) - if __name__ == "__main__": logging.getLogger().setLevel(logging.INFO)