[GitHub] [beam] robertwb commented on a change in pull request #12391: [BEAM-9839] OnTimerContext should not create a new one when processing each element/timer in FnApiDoFnRunner

2020-08-03 Thread GitBox


robertwb commented on a change in pull request #12391:
URL: https://github.com/apache/beam/pull/12391#discussion_r464538362



##
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java
##
@@ -2118,8 +2113,8 @@ public TimeDomain timeDomain(DoFn doFn) {
 }
 
 @Override
-public K key() {
-  return key;
+public Object key() {

Review comment:
   Due to type erasure, we don't have to know it at initialization time, 
but we do know it when passed to the user (and it'd be better to give them 
something properly typed.) 





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




[GitHub] [beam] robertwb commented on a change in pull request #12391: [BEAM-9839] OnTimerContext should not create a new one when processing each element/timer in FnApiDoFnRunner

2020-07-29 Thread GitBox


robertwb commented on a change in pull request #12391:
URL: https://github.com/apache/beam/pull/12391#discussion_r461870594



##
File path: 
sdks/java/harness/src/main/java/org/apache/beam/fn/harness/FnApiDoFnRunner.java
##
@@ -2118,8 +2113,8 @@ public TimeDomain timeDomain(DoFn doFn) {
 }
 
 @Override
-public K key() {
-  return key;
+public Object key() {

Review comment:
   It seems a regression to not return the typed key. Can OnTimerContext 
still be typed (necessitating perhaps a cast here)? 





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