[
https://issues.apache.org/jira/browse/BEAM-5264?focusedWorklogId=142137&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-142137
]
ASF GitHub Bot logged work on BEAM-5264:
----------------------------------------
Author: ASF GitHub Bot
Created on: 07/Sep/18 11:34
Start Date: 07/Sep/18 11:34
Worklog Time Spent: 10m
Work Description: robertwb commented on a change in pull request #6304:
[BEAM-5264] Reference DirectRunner implementation of Python User State and
Timers API
URL: https://github.com/apache/beam/pull/6304#discussion_r215929118
##########
File path: sdks/python/apache_beam/runners/common.py
##########
@@ -498,6 +550,17 @@ def _invoke_per_window(
else:
args_for_process, kwargs_for_process = (
self.args_for_process, self.kwargs_for_process)
+
+ # Extract key in the case of a stateful DoFn.
+ if self.user_state_context:
+ try:
+ key, unused_value = windowed_value.value
+ except (TypeError, ValueError):
+ raise ValueError(
+ ('Input value to a stateful DoFn must be a KV tuple; instead, '
+ 'got %s.') % (windowed_value.value,))
+ window, = windowed_value.windows
Review comment:
Do we know that sliding windows were already exploded? Perhaps we should be
setting self.has_windowed_inputs and relying on the window assignment from
above.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 142137)
Time Spent: 3h 50m (was: 3h 40m)
> Reference DirectRunner implementation of Python user state and timers API
> -------------------------------------------------------------------------
>
> Key: BEAM-5264
> URL: https://issues.apache.org/jira/browse/BEAM-5264
> Project: Beam
> Issue Type: Improvement
> Components: sdk-py-core
> Affects Versions: 2.6.0
> Reporter: Charles Chen
> Assignee: Charles Chen
> Priority: Major
> Time Spent: 3h 50m
> Remaining Estimate: 0h
>
> This issue tracks the reference DirectRunner implementation of the Beam
> Python User State and Timer API, described here:
> [https://s.apache.org/beam-python-user-state-and-timers].
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)