LuciferYang commented on code in PR #43526:
URL: https://github.com/apache/spark/pull/43526#discussion_r1407950170


##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/HDFSMetadataLog.scala:
##########
@@ -50,9 +51,10 @@ import org.apache.spark.util.ArrayImplicits._
 class HDFSMetadataLog[T <: AnyRef : ClassTag](sparkSession: SparkSession, 
path: String)
   extends MetadataLog[T] with Logging {
 
-  private implicit val formats = Serialization.formats(NoTypeHints)
+  private implicit val formats: Formats = Serialization.formats(NoTypeHints)
 
   /** Needed to serialize type T into JSON when using Jackson */
+  @nowarn

Review Comment:
   ```suggestion
     @scala.annotation.nowarn
   ```



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/state/OperatorStateMetadata.scala:
##########
@@ -64,8 +65,9 @@ case class OperatorStateMetadataV1(
 
 object OperatorStateMetadataV1 {
 
-  private implicit val formats = Serialization.formats(NoTypeHints)
+  private implicit val formats: Formats = Serialization.formats(NoTypeHints)
 
+  @nowarn

Review Comment:
   ```suggestion
     @scala.annotation.nowarn
   ```



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/CompactibleFileStreamLog.scala:
##########
@@ -49,9 +50,10 @@ abstract class CompactibleFileStreamLog[T <: AnyRef : 
ClassTag](
 
   import CompactibleFileStreamLog._
 
-  private implicit val formats = Serialization.formats(NoTypeHints)
+  private implicit val formats: Formats = Serialization.formats(NoTypeHints)
 
   /** Needed to serialize type T into JSON when using Jackson */
+  @nowarn

Review Comment:
   ```suggestion
     @scala.annotation.nowarn
   ```



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/CompactibleFileStreamLog.scala:
##########
@@ -49,9 +50,10 @@ abstract class CompactibleFileStreamLog[T <: AnyRef : 
ClassTag](
 
   import CompactibleFileStreamLog._
 
-  private implicit val formats = Serialization.formats(NoTypeHints)
+  private implicit val formats: Formats = Serialization.formats(NoTypeHints)
 
   /** Needed to serialize type T into JSON when using Jackson */
+  @nowarn

Review Comment:
   When this annotation is only needed in one place in this class, it is 
customary to use xx directly.
   



##########
sql/core/src/main/scala/org/apache/spark/sql/execution/streaming/FileStreamSourceLog.scala:
##########
@@ -36,8 +33,8 @@ class FileStreamSourceLog(
     path: String)
   extends CompactibleFileStreamLog[FileEntry](metadataLogVersion, 
sparkSession, path) {
 
-  import CompactibleFileStreamLog._
-  import FileStreamSourceLog._
+  import org.apache.spark.sql.execution.streaming.CompactibleFileStreamLog._

Review Comment:
   Why is it necessary to change to import with the full name here?



-- 
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]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to