org.apache.beam.sdk.transforms.FlattenTest.testFlattenMultipleCoders
and
org.apache.beam.sdk.transforms.FlattenTest.testFlattenWithDifferentInputAndOutputCoders2
Fail SDK side with a sort of crash or a stream corrupted issue. Likely there's something strange going on with coders.
Solved via full Flatten unzipping in the pipeline optimizer. which avoids the coder issue entirely/removes the flatten, or by investigating the root cause around the coder handling in the Java SDK.