You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2021/07/08 16:50:50 UTC

[GitHub] [beam] BenWhitehead commented on a change in pull request #15005: [BEAM-8376] Google Cloud Firestore Connector - Add Firestore v1 Read Operations

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

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