Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 0 additions & 9 deletions sdks/python/apache_beam/coders/row_coder.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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())

Expand Down
11 changes: 0 additions & 11 deletions sdks/python/apache_beam/coders/row_coder_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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)
Expand Down