You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "srowen (via GitHub)" <gi...@apache.org> on 2023/01/21 15:31:48 UTC

[GitHub] [spark] srowen commented on a diff in pull request #39688: [SPARK-42146][CORE] Refactor `Utils#setStringField` to make maven build pass when sql module use this method

srowen commented on code in PR #39688:
URL: https://github.com/apache/spark/pull/39688#discussion_r1083302080


##########
core/src/main/scala/org/apache/spark/status/protobuf/Utils.scala:
##########
@@ -17,16 +17,18 @@
 
 package org.apache.spark.status.protobuf
 
-import com.google.protobuf.MessageOrBuilder
-
 object Utils {
   def getOptional[T](condition: Boolean, result: () => T): Option[T] = if (condition) {
     Some(result())
   } else {
     None
   }
 
-  def setStringField(input: String, f: String => MessageOrBuilder): Unit = {
+
+  // TODO(SPARK-42147): Restore the signature of `f` when `f` is declared as
+  //  `f: String => MessageOrBuilder` and `setStringField` used by other modules
+  //  not cause maven build failure
+  def setStringField(input: String, f: String => Any): Unit = {

Review Comment:
   If the return value of f() doesn't matter, then this signature seems fine? no need to change it later
   Did some change actually fail to compile as a result in master?



-- 
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: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org