JozoVilcek commented on a change in pull request #13166:
URL: https://github.com/apache/beam/pull/13166#discussion_r514257586
##########
File path:
sdks/java/io/hadoop-format/src/main/java/org/apache/beam/sdk/io/hadoop/format/HadoopFormatIO.java
##########
@@ -437,6 +445,12 @@
.build();
}
+ /** Transforms the keys read from the source using the given key
translation function. */
+ public Read<K, V> withKeyTranslation(SimpleFunction<?, K> function,
Coder<K> coder) {
Review comment:
I did try to pass in `SerializableFunction` but inner code of
HadoopFormat does require input and output types for the function for
validation, e.g. that input format value class does match translation function
input class. I choose to stick with `SimpleFunction` but just allow to pass in
the specific coder.
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]