-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
Dynamic splits in SDF in Go are performed on ProcessSizedElementsAndRestrictions transforms, and therefore when encoding the split elements for a SplitResponse (to eventually be sent as a BundleApplication proto) it should be using the input coder of the ProcessSizedElementsAndRestrictions. However, right now a shortcut is taken. Since a DataSource currently always precedes a ProcessSizedElementsAndRestrictions transform, and has identical input and output coders, we currently encode split elements with the existing DataSource input coders.
However, this will eventually lead to issues if any other transforms are ever placed preceding the ProcessSizedElementsAndRestrictions, so it's important to eventually fix this to use the correct input coder.
Implementation-wise, this requires adding code to create an input coder for the ProcessSizedElementsAndRestrictions transform based on its input type, and then to provide access for encoding elements with that coder (probably through the SplittableUnit interface).
Imported from Jira BEAM-10579. Original Jira may contain additional context.
Reported by: danoliveira.