Pass user specified destination type to UpdateSchemaDestination
Fixes #22543
When using multiple partitions for a BigQuery FILE_LOADS write, the user's dynamic destination type isn't properly passed into UpdateSchemaDestination. This leads to a ClassCastException when attempting to get the table and schema using the dynamic destination object.
The user's dynamic destination object is configured with a particular parameter type (represented by DestinationT) for getTable() and getSchema (see here). The current implementation from #17365 doesn't respect this user type and instead passes in a fixed TableDestination argument.
Run PostCommit_Java_DataflowV2
R: @johnjcasey
Stopping reviewer notifications for this pull request: review requested by someone other than the bot, ceding control
Run PostCommit_Java_DataflowV2
This LGTM. Have you retried the original failing custom dynamic destinations?
Yup, left a comment in #22543