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_r398895069
##########
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:
It's effectively memoized with SCHEMA_REGISTRY inside
`typing_from_runner_api`. We could short-circuit it here as well though
----------------------------------------------------------------
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