shunping commented on code in PR #34566:
URL: https://github.com/apache/beam/pull/34566#discussion_r2031793582
##########
sdks/go/pkg/beam/runners/prism/internal/preprocess.go:
##########
@@ -106,7 +106,21 @@ func (p *preprocessor) preProcessGraph(comps
*pipepb.Components, j *jobservices.
// If there's an unknown urn, and it's not composite,
simply add it to the leaves.
if len(t.GetSubtransforms()) == 0 {
- leaves[tid] = struct{}{}
+ shouldAdd := true
+
+ // However, if it is an empty transform with
identical input/output pcollections,
+ // it will be discarded.
+ if len(t.GetInputs()) == 1 &&
len(t.GetOutputs()) == 1 {
+ inputID := getOnlyValue(t.GetInputs())
+ outputID := getOnlyValue(t.GetOutputs())
+ if inputID == outputID {
+ shouldAdd = false
Review Comment:
Fixed.
--
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]