lukecwik commented on a change in pull request #11199: [BEAM-9562] Update Timer encoding with respect of dynamic timers URL: https://github.com/apache/beam/pull/11199#discussion_r402411530
########## File path: model/fn-execution/src/main/resources/org/apache/beam/model/fnexecution/v1/standard_coders.yaml ########## @@ -28,6 +28,23 @@ # one of a few standard JSON types such as numbers, strings, dicts that map naturally # to the type encoded by the coder. # +# Java code snippet to generate example bytes: +# Coder<Timer<String>> coder = Timer.Coder.of(StringUtf8Coder.of(), GlobalWindow.Coder.INSTANCE); +# Instant now = new Instant(1000L); +# Timer<String> timer = Timer.of( +# "key", +# "tag", +# now, +# now, +# Collections.singletonList(GlobalWindow.INSTANCE), +# PaneInfo.NO_FIRING); +# byte[] byets = CoderUtils.encodeToByteArray(coder, timer); +# String str = new String(byets, java.nio.charset.StandardCharsets.ISO_8859_1); Review comment: You sure the charset needs to be ISO_8859_1? ```suggestion # byte[] bytes = CoderUtils.encodeToByteArray(coder, timer); # String str = new String(bytes, java.nio.charset.StandardCharsets.ISO_8859_1); ``` ---------------------------------------------------------------- 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: us...@infra.apache.org With regards, Apache Git Services