Skip to content

Commit

Permalink
[BEAM-14455] Add UUID to sub-schemas for PythonExternalTransform
Browse files Browse the repository at this point in the history
  • Loading branch information
ihji committed May 10, 2022
1 parent 1215973 commit 26b16d0
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,7 @@ Row buildOrGetKwargsRow() {
Schema schema =
generateSchemaFromFieldValues(
kwargsMap.values().toArray(), kwargsMap.keySet().toArray(new String[] {}));
schema.setUUID(UUID.randomUUID());
return Row.withSchema(schema)
.addValues(convertComplexTypesToRows(kwargsMap.values().toArray()))
.build();
Expand Down Expand Up @@ -223,6 +224,7 @@ private Object[] convertComplexTypesToRows(@Nullable Object @NonNull [] values)
@VisibleForTesting
Row buildOrGetArgsRow() {
Schema schema = generateSchemaFromFieldValues(argsArray, null);
schema.setUUID(UUID.randomUUID());
Object[] convertedValues = convertComplexTypesToRows(argsArray);
return Row.withSchema(schema).addValues(convertedValues).build();
}
Expand Down

0 comments on commit 26b16d0

Please sign in to comment.