BenWhitehead commented on a change in pull request #15005:
URL: https://github.com/apache/beam/pull/15005#discussion_r666363059
##########
File path:
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/firestore/FirestoreDoFn.java
##########
@@ -46,6 +46,22 @@
@StartBundle
public abstract void startBundle(DoFn<InT, OutT>.StartBundleContext context)
throws Exception;
+ abstract static class NonWindowAwareDoFn<InT, OutT> extends
FirestoreDoFn<InT, OutT> {
+ /**
+ * {@link ProcessContext#element() context.element()} must be non-null,
otherwise a
+ * NullPointerException will be thrown.
Review comment:
Apologies, I will need to rename this class. I'm leaning toward the new
name being `ImplicitlyWindowedDoFn`, because output will exclusively use
`DoFn.WindowedContext#output(OutputT)` whereas the `WindowAwareDoFn` may also
output during `@FinishBundle` and must explicitly provide the window via
`DoFn.FinishBundleContext#output(OutputT, org.joda.time.Instant,
org.apache.beam.sdk.transforms.windowing.BoundedWindow)`
--
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]