lostluck commented on a change in pull request #12066: URL: https://github.com/apache/beam/pull/12066#discussion_r446333101
########## File path: learning/katas/go/Core Transforms/Side Output/Side Output/task.md ########## @@ -0,0 +1,50 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +# Side Output + +While ParDo always produces a main output PCollection (as the return value from apply), you can +also have your ParDo produce any number of additional output PCollections. If you choose to have +multiple outputs, your ParDo returns all of the output PCollections (including the main output) +bundled together. Review comment: What's the "main output" ? Consider removing the paranthetical, I don't think it adds anything. DoFns in BeamGo don't have a "main" output, and we do not use that term in the GoDoc (which has problems, but this isn't one of them). They have the first, second, third etc outputs. DoFn return outputs only have two properties, if present, they're always the first one, and they require the DoFn to always return an element (or abort with an error). ########## File path: learning/katas/go/Core Transforms/Side Output/Side Output/task.md ########## @@ -0,0 +1,50 @@ +<!-- + ~ Licensed to the Apache Software Foundation (ASF) under one + ~ or more contributor license agreements. See the NOTICE file + ~ distributed with this work for additional information + ~ regarding copyright ownership. The ASF licenses this file + ~ to you under the Apache License, Version 2.0 (the + ~ "License"); you may not use this file except in compliance + ~ with the License. You may obtain a copy of the License at + ~ + ~ http://www.apache.org/licenses/LICENSE-2.0 + ~ + ~ Unless required by applicable law or agreed to in writing, software + ~ distributed under the License is distributed on an "AS IS" BASIS, + ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + ~ See the License for the specific language governing permissions and + ~ limitations under the License. + --> + +# Side Output Review comment: Overall, my main concern is calling these "Side Outputs" . The Beam model doesn't have Side Outputs, it has multiple or Additional Outputs. https://beam.apache.org/documentation/programming-guide/#additional-outputs I'd recommend going with Additional Outputs, which is in the programing guide, and the godoc. https://pkg.go.dev/github.com/apache/beam/sdks/go/pkg/beam?tab=doc#hdr-Additional_Outputs Side Inputs exist distinctly since they don't drive parallel execution, and behave very differently than PCollections used for Parallel input. Each output however produces a different PCollection, and that's about it. Also calling them Side Outputs ascribes extra semantics that don't exist. ---------------------------------------------------------------- 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]
