robertwb commented on PR #31558: URL: https://github.com/apache/beam/pull/31558#issuecomment-2166214597
Taking a step back, is the problem that you're trying to solve is that those transforms that come from a `[Typed]SchemaTransformProvider` we already have a `(identifier + configRow) -> [Schema]Transform` mapping, and we should be able to automatically derive the inverse `[Schema]Transform -> (identifier + configRow)` mapping for these transforms? 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. (But maybe that's good enough sometimes?) Might be cleaner in that case to just have a separate (weakref) mapping (registrar) from PTransform instances to their corresponding configs rather add a register method and private members to `[Schema]Transform` itself. Separately it'd be good to make defining this pair of mappings so easy that it's "just how users write PTransforms" (maybe working it into builder patterns or providing a good annotation or something like that) and we get their externalization and semantic graph representation for free. But this is likely a larger project. -- 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]
