This is an automated email from the ASF dual-hosted git repository.

kileysok pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/beam.git


The following commit(s) were added to refs/heads/master by this push:
     new c2cdd75  Revert "[BEAM-14190] Python sends dataflow schema field"
     new 13230c8  Merge pull request #17255 from kileys/test-revert
c2cdd75 is described below

commit c2cdd75a3745a8e54cf869024553d03e18f56d84
Author: kileys <kiley...@google.com>
AuthorDate: Sat Apr 2 00:15:01 2022 +0000

    Revert "[BEAM-14190] Python sends dataflow schema field"
    
    This reverts commit c50f56274c86f75b2edad1b51dbe8c2ddaab2019.
---
 sdks/python/apache_beam/coders/row_coder.py      |  9 ---------
 sdks/python/apache_beam/coders/row_coder_test.py | 11 -----------
 2 files changed, 20 deletions(-)

diff --git a/sdks/python/apache_beam/coders/row_coder.py 
b/sdks/python/apache_beam/coders/row_coder.py
index 077da8e..815dcd0 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 @@ class RowCoder(FastCoder):
   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 43ce040..7b4b769 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 @@ import unittest
 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 @@ class RowCoderTest(unittest.TestCase):
     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)

Reply via email to