TheNeuralBit commented on a change in pull request #11196: [BEAM-9574] Ensure
that instances of generated NamedTuple classes can be pickled
URL: https://github.com/apache/beam/pull/11196#discussion_r398971677
##########
File path: sdks/python/apache_beam/typehints/schemas.py
##########
@@ -205,6 +218,11 @@ def typing_from_runner_api(fieldtype_proto):
pass # TODO
+def _hydrate_namedtuple_instance(encoded_schema, values):
+ return named_tuple_from_schema(
+ proto_utils.parse_Bytes(encoded_schema, schema_pb2.Schema))(*values)
+
+
def named_tuple_from_schema(schema):
Review comment:
I went ahead and merged this, let me know if you think this should be
tweaked and I can do it separately.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services