HeartSaVioR commented on code in PR #50348: URL: https://github.com/apache/spark/pull/50348#discussion_r2011147337
########## connector/kafka-0-10-sql/src/main/scala/org/apache/spark/sql/kafka010/KafkaOffsetReaderAdmin.scala: ########## @@ -535,7 +535,7 @@ private[kafka010] class KafkaOffsetReaderAdmin( var attempt = 1 var lastException: Throwable = null while (result.isEmpty && attempt <= maxOffsetFetchAttempts - && !Thread.currentThread().isInterrupted) { + && !Thread.currentThread.isInterrupted) { Review Comment: I think this is arguably not super clear style rule. Only "pure" parameterless method can remove the paren from the best practice of Scala (it's not that you can remove the paren as long as the method does not take any param), but there are arguments of what is "pure" method. Here is the post which starts with very simple question got distracted with what is pure method. https://users.scala-lang.org/t/paramterless-functions-with-and-without-parentheses-different/9939/3 In addition, Scala 3 will enforce the defined method with paren to "always" call with paren, regardless of parameterless, "pure" method, etcetc. So I don't think this is an obvious style fix - someone could argue that we are going to break the style. -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org