Abacn commented on code in PR #25701:
URL: https://github.com/apache/beam/pull/25701#discussion_r1128284597
##########
sdks/java/io/google-cloud-platform/src/main/java/org/apache/beam/sdk/io/gcp/datastore/DatastoreV1.java:
##########
@@ -1542,12 +1542,27 @@ 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 {
+ LOG.warning("Mutation %s does not have an operation type set.", m);
+ return "";
Review Comment:
ah need to return a Key.getDefaultInstance()
--
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]