pabloem commented on code in PR #25701:
URL: https://github.com/apache/beam/pull/25701#discussion_r1128268864
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1.java:
##########
@@ -1542,12 +1542,26 @@ public void startBundle(StartBundleContext c) {
}
}
+ private static com.google.datastore.v1.Key getKey(Mutation m) {
+ if (m.hasUpsert()) {
+ return m.getUpsert().getKey();
+ } else if (m.hasInsert()) {
+ return m.getInsert().getKey();
+ } else if (m.hasDelete()) {
+ return m.getDelete();
+ } else if (m.hasUpdate()) {
+ return m.getUpdate().getKey();
+ } else {
+ throw new IllegalArgumentException(String.format("Mutation %s is not
valid.", m));
Review Comment:
ok I've done that. Thanks Yi!
--
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]