[
https://issues.apache.org/jira/browse/BEAM-7443?focusedWorklogId=251084&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-251084
]
ASF GitHub Bot logged work on BEAM-7443:
----------------------------------------
Author: ASF GitHub Bot
Created on: 30/May/19 16:34
Start Date: 30/May/19 16:34
Worklog Time Spent: 10m
Work Description: lukecwik commented on pull request #8641: [BEAM-7443]
Create a BoundedSource -> SDF wrapper in Python SDK
URL: https://github.com/apache/beam/pull/8641#discussion_r289068759
##########
File path: sdks/python/apache_beam/runners/portability/fn_api_runner_test.py
##########
@@ -478,6 +479,22 @@ def process(
self.assertEqual(1, len(counters))
self.assertEqual(counters[0].committed, len(''.join(data)))
+ def test_sdf_wrap_range_source(self):
+ with self.create_pipeline() as p:
+ from apache_beam.options.pipeline_options import DebugOptions
+ experiments = (p._options.view_as(DebugOptions).experiments or [])
+
+ # Setup experiment option to enable using SDFBoundedSourceWrapper
+ if not 'use_sdf_bounded_source' in experiments:
+ experiments.append('use_sdf_bounded_source')
+
+ p._options.view_as(DebugOptions).experiments = experiments
+
+ actual = (
+ p | beam.io.Read(RangeSource(0, 4))
+ )
+ assert_that(actual, equal_to([0, 1, 2, 3]))
Review comment:
This won't verify that the PTransform replacement actually occurred since if
the replacement didn't occur, you would still get the same pipeline result.
----------------------------------------------------------------
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]
Issue Time Tracking
-------------------
Worklog Id: (was: 251084)
Time Spent: 50m (was: 40m)
> BoundedSource->SDF needs a wrapper in Python SDK
> -------------------------------------------------
>
> Key: BEAM-7443
> URL: https://issues.apache.org/jira/browse/BEAM-7443
> Project: Beam
> Issue Type: New Feature
> Components: sdk-py-core
> Reporter: Boyuan Zhang
> Assignee: Boyuan Zhang
> Priority: Major
> Time Spent: 50m
> Remaining Estimate: 0h
>
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)