damccorm commented on code in PR #36722:
URL: https://github.com/apache/beam/pull/36722#discussion_r2742459568
##########
sdks/python/apache_beam/transforms/sideinputs_test.py:
##########
@@ -489,6 +491,32 @@ def process(
assert_that(results, equal_to([(num_records, expected_fingerprint)]))
pipeline.run()
+ def test_default_window_mapping_fn_source_window(self):
Review Comment:
Looks like this is failing in CI with:
```
<testcase classname="apache_beam.transforms.sideinputs_test.SideInputsTest"
name="test_default_window_mapping_fn_source_window" time="0.001">
<failure message="TypeError: Can't instantiate abstract class
StringIDWindows with abstract method get_window_coder">self =
<apache_beam.transforms.sideinputs_test.SideInputsTest
testMethod=test_default_window_mapping_fn_source_window> def
test_default_window_mapping_fn_source_window(self): """Test that the default
window mapping function will propagate the source window when attempting to
assign context. """ class StringIDWindow(window.BoundedWindow): """A window
defined by an arbitrary string ID.""" def __init__(self, window_id: str):
super().__init__(self._getTimestampFromProto()) self.id = window_id class
StringIDWindows(window.NonMergingWindowFn): """ A windowing function that
assigns each element a window with ID.""" def assign( self, assign_context:
window.WindowFn.AssignContext ) -> Iterable[StringIDWindow]: if
assign_context.element is None: return [assign_context.window] return
[StringIDWindow(str(assign_context.element))] > mapping_fn =
sideinputs.default_window_mapping
_fn(StringIDWindows()) E TypeError: Can't instantiate abstract class
StringIDWindows with abstract method get_window_coder
apache_beam/transforms/sideinputs_test.py:513: TypeError</failure>
</testcase>
```
Could you please take a look?
--
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.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]