bharadwaj-aditya commented on code in PR #40489:
URL: https://github.com/apache/beam/pull/40489#discussion_r4256053474


##########
sdks/java/io/google-cloud-platform/src/test/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIOWriteTest.java:
##########
@@ -319,6 +319,57 @@ public void runBatchQueryTestWithMaxCommitDelay() {
                 }));
   }
 
+  @Test
+  public void runBatchQueryTestWithExcludeTxnFromChangeStreams() {
+    SpannerIO.Write write =
+        SpannerIO.write()
+            .withSpannerConfig(SPANNER_CONFIG)
+            .withServiceFactory(serviceFactory)
+            .withExcludeTxnFromChangeStreams(true);

Review Comment:
   There is no test to check the false value of this flag. Please add that as 
well.



##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/SpannerIO.java:
##########
@@ -2937,6 +2972,14 @@ private Options.TransactionOption[] 
getTransactionOptions() {
                   ? Options.maxCommitDelay(
                       java.time.Duration.ofMillis(
                           spannerConfig.getMaxCommitDelay().get().getMillis()))
+                  : null,
+              spannerConfig.getExcludeTxnFromChangeStreams() != null
+                      && 
Boolean.TRUE.equals(spannerConfig.getExcludeTxnFromChangeStreams().get())

Review Comment:
    In this case we set it only if the flag is true. Shouldnt this be a !=null 
check for the get() as well - similar to the priority flag



-- 
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]

Reply via email to