Grant Henke has posted comments on this change. ( http://gerrit.cloudera.org:8080/12409 )
Change subject: [Java] Add setRow to Operation ...................................................................... Patch Set 1: (3 comments) http://gerrit.cloudera.org:8080/#/c/12409/1//COMMIT_MSG Commit Message: PS1: > Not really understanding the motivation. You provided some sample code near This is useful for integration use cases where you translate from some third-party row class to Kudu's partial row and then convert it to an operation to send to kudu. Today you need to know the operation before you convert which is more tightly coupled than needed, or you need to copy the partial row over to the ops partial row which is expensive. The next 2 patches in this series are a good example of usage. Additionally I have a repartitioning patch coming up that will use this. http://gerrit.cloudera.org:8080/#/c/12409/1/java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java File java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java: http://gerrit.cloudera.org:8080/#/c/12409/1/java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java@188 PS1, Line 188: tables > table's Done http://gerrit.cloudera.org:8080/#/c/12409/1/java/kudu-client/src/main/java/org/apache/kudu/client/Operation.java@201 PS1, Line 201: Preconditions.checkArgument(row.getSchema().equals(table.getSchema()), : "The row's schema must be equal to the table schema"); > Won't this be expensive when working with many operations? There is a cost, but it's pretty low given they need to be equal by reference, not by value. I will change to using == incase the equals implementation ever changes. -- To view, visit http://gerrit.cloudera.org:8080/12409 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: I7adee20166e90249209e80700db315172669edb5 Gerrit-Change-Number: 12409 Gerrit-PatchSet: 1 Gerrit-Owner: Grant Henke <[email protected]> Gerrit-Reviewer: Adar Dembo <[email protected]> Gerrit-Reviewer: Grant Henke <[email protected]> Gerrit-Reviewer: Kudu Jenkins (120) Gerrit-Reviewer: Mike Percy <[email protected]> Gerrit-Reviewer: Will Berkeley <[email protected]> Gerrit-Comment-Date: Wed, 13 Feb 2019 17:20:07 +0000 Gerrit-HasComments: Yes
