ahmedabu98 commented on PR #31558: URL: https://github.com/apache/beam/pull/31558#issuecomment-2173835219
Yep that’s the main problem being solved here. To be clear though, transforms that come from *any* `SchemaTransformProvider` (doesn’t have to be `[Typed]`) already have an identifier and configRow (implicitly) attached. This PR makes this attachment explicit and available for translation. > In this case, it's a bit odd because it seems we can only derive the inverse for the specific instances that we created, not generally for all instances of that class By design, these SchemaTransforms are always created using the corresponding `SchemaTransformProvider.from(configRow)`. We never instantiate the SchemaTransform directly (there are no public SchemaTransform implementations). So we can safely assume any SchemaTransform instantiation will have come from a SchemaTransformProvider that we created. I share the aversion towards adding unnecessary things to SchemaTransform though. I’ve been trying to cut things down as I go, but there’s probably still a better solution. > Might be cleaner in that case to just have a separate (weakref) mapping (registrar) from PTransform instances to their corresponding configs Thanks! Will take a stab at this -- 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. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected]
