twang126 commented on code in PR #25935:
URL: https://github.com/apache/beam/pull/25935#discussion_r1145174968


##########
sdks/python/apache_beam/yaml/yaml_transform_test.py:
##########
@@ -68,6 +68,25 @@ def test_chain_with_input(self):
           ''')
       assert_that(result, equal_to([41, 43, 47, 53, 61, 71, 83, 97, 113, 131]))
 
+  def test_chain_with_source_sink(self):
+    with beam.Pipeline(options=beam.options.pipeline_options.PipelineOptions(
+        pickle_library='cloudpickle')) as p:
+      elements = p | beam.Create(range(10))
+      result = elements | YamlTransform(
+          '''
+          type: chain
+          source:
+            type: Create
+            elements: [0, 1, 2, 3, 4, 5, 6, 7, 8, 9]

Review Comment:
   In this test, we seed `elements` with `beam.Create(range(10))` and then also 
add a source to the chain with what seems to be the same operation. Sorry if I 
am misunderstanding, but are both required? I would have guessed that the 
source transform in the YAML could replace having to do the manual `p | 
beam.Create(range(10))`. 



-- 
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]

Reply via email to