tianz101 commented on code in PR #38167:
URL: https://github.com/apache/beam/pull/38167#discussion_r3076142073


##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/spanner/changestreams/dao/ChangeStreamDao.java:
##########
@@ -95,10 +98,14 @@ public ChangeStreamResultSet changeStreamQuery(
     if (this.isPostgres()) {
       // Ensure we have determined whether change stream uses mutable key range
       if (this.isMutableChangeStream) {
-        query =
-            "SELECT * FROM \"spanner\".\"read_proto_bytes_"
-                + changeStreamName
-                + "\"($1, $2, $3, $4, null)";
+        if (tvfName == null || tvfName.equals(DEFAULT_TVF_NAME)) {
+          query =
+              "SELECT * FROM \"spanner\".\"read_proto_bytes_"
+                  + changeStreamName
+                  + "\"($1, $2, $3, $4, null)";
+        } else {
+          query = "SELECT * FROM \"spanner\".\"" + tvfName + "\"($1, $2, $3, 
$4, null)";

Review Comment:
   when the code reaches here, the tvfName has been validated already.



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