Dan Burkert has posted comments on this change. ( http://gerrit.cloudera.org:8080/9834 )
Change subject: KUDU-2371: Add WriteOptions class and ignoreNull option to upsertRows ...................................................................... Patch Set 3: (4 comments) http://gerrit.cloudera.org:8080/#/c/9834/3/java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/DefaultSource.scala File java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/DefaultSource.scala: http://gerrit.cloudera.org:8080/#/c/9834/3/java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/DefaultSource.scala@118 PS3, Line 118: case "insert" => Insert This is a backwards incompatible change. Would it be possible to retain this functionality? http://gerrit.cloudera.org:8080/#/c/9834/3/java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/KuduContext.scala File java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/KuduContext.scala: http://gerrit.cloudera.org:8080/#/c/9834/3/java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/KuduContext.scala@a250 PS3, Line 250: Likewise, removing this will break applications. Is it possible to keep the API but transition it to use the proper write options? http://gerrit.cloudera.org:8080/#/c/9834/3/java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/KuduContext.scala@311 PS3, Line 311: KuduWriteOptions = new KuduWriteOptions()): RowErrorsAndOverflowStatus = { I think you can skip the default value here, since it's a private method (so the API can change), and it should always be passed in. http://gerrit.cloudera.org:8080/#/c/9834/3/java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/KuduWriteOptions.scala File java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/KuduWriteOptions.scala: http://gerrit.cloudera.org:8080/#/c/9834/3/java/kudu-spark/src/main/scala/org/apache/kudu/spark/kudu/KuduWriteOptions.scala@21 PS3, Line 21: private var _ignoreDuplicateRowErrors: Boolean = false This class is a very different style from the rest of the scala code we have. I think something along the lines of the following would be more idiomatic: class KuduWriteOptions( val ignoreDuplicateRowErrors: Boolean = false, val ignoreNull: Boolean = false, ) -- To view, visit http://gerrit.cloudera.org:8080/9834 To unsubscribe, visit http://gerrit.cloudera.org:8080/settings Gerrit-Project: kudu Gerrit-Branch: master Gerrit-MessageType: comment Gerrit-Change-Id: Ide908ea29f572849eca0ba850ee197c1b22a07c8 Gerrit-Change-Number: 9834 Gerrit-PatchSet: 3 Gerrit-Owner: Fengling Wang <[email protected]> Gerrit-Reviewer: Dan Burkert <[email protected]> Gerrit-Reviewer: Fengling Wang <[email protected]> Gerrit-Reviewer: Hao Hao <[email protected]> Gerrit-Reviewer: Kudu Jenkins Gerrit-Reviewer: Todd Lipcon <[email protected]> Gerrit-Reviewer: Will Berkeley <[email protected]> Gerrit-Comment-Date: Mon, 02 Apr 2018 22:27:47 +0000 Gerrit-HasComments: Yes
