simonepri commented on a change in pull request #12393:
URL: https://github.com/apache/beam/pull/12393#discussion_r462068120



##########
File path: sdks/go/pkg/beam/create.go
##########
@@ -34,31 +34,44 @@ func Create(s Scope, values ...interface{}) PCollection {
 }
 
 // CreateList inserts a fixed set of values into the pipeline from a slice or
-// array. It is a convenience wrapper over Create.
+// array. Differently from Create this supports the creation of an empty
+// PCollection.
 func CreateList(s Scope, list interface{}) PCollection {
-       var ret []interface{}
        val := reflect.ValueOf(list)
+       var ret []interface{}
+       for i := 0; i < val.Len(); i++ {

Review comment:
       You are right, thanks for spotting this.




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


Reply via email to