hjtran commented on PR #35521:
URL: https://github.com/apache/beam/pull/35521#issuecomment-3081460952

   > > > R: @liferoad since this came out of #28061
   > > > I'm somewhat ambivalent about this one. I've seen issues where this 
warning has or would have helped. I've also seen people get confused by the 
wording.
   > > > Instead of removing the warning, could we clarify the text so that it 
is obvious that you can ignore it if it is intentional?
   > > 
   > > 
   > > It'd be nice if there was an easy way to discriminate between whether 
this case might be an accident or if it's actually intended. As it stands, I'm 
not sure there's an obvious way to silence this warning as a DoFn author who 
really doesn't want to yield anything (I suppose they can just yield and empty 
generator but I wouldn't call that obvious)
   > 
   > I would argue the good practice is to return something.
   
   I think it might not be a very known good practice. I for one didnt realize 
it was good practice and have written a decent number of side effect 
transforms. These warnings also don't account for dofns that yield elements in 
`finish_bundle` or yield batches.
   
   I tried turning the warning into an error to see which dofns currently don't 
yield anything and here's a partial list:
   
   - _BeamRowsToArrowTable
   - RemoveExtractedFiles
   - apache_beam.io.gcp.bigquery_file_loads.UpdateDestinationSchema'
   - apache_beam.io.mongodbio._WriteMongoFn
   - 
apache_beam.transforms.ptransform._AddMaterializationTransforms._materialize_transform.<locals>._MaterializeValuesDoFn
   - apache_beam.io.gcp.bigtableio._BigTableWriteFn
   - apache_beam.runners.direct.direct_runner._DirectWriteToPubSubFn
   - apache_beam.testing.test_stream._TestStreamFormatter
   - apache_beam.dataframe.convert.RowsToDataFrameFn
   
   I think the noise-to-signal ratio might be high enough that the warnings get 
ignored.


-- 
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: github-unsubscr...@beam.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to