HyukjinKwon commented on code in PR #50683:
URL: https://github.com/apache/spark/pull/50683#discussion_r2057823576


##########
sql/core/src/main/scala/org/apache/spark/sql/avro/AvroOptions.scala:
##########
@@ -146,6 +147,37 @@ private[sql] class AvroOptions(
       RECURSIVE_FIELD_MAX_DEPTH,
       s"Should not be greater than $RECURSIVE_FIELD_MAX_DEPTH_LIMIT.")
   }
+
+  /**
+   * [[hadoop.conf.Configuration]] is not comparable so we turn it into a map 
for [[equals]] and
+   * [[hashCode]].
+   */
+  private lazy val comparableConf = {
+    val iter = conf.iterator()

Review Comment:
   no biggie but we could also do:
   
   ```scala
   import scala.jdk.CollectionConverters._
   
   ...
   
   private lazy val comparableConf = conf.iterator.asScala.map(e => e.getKey -> 
e.getValue).toMap
   ```
   
   But as is seems fine.



##########
sql/core/src/main/scala/org/apache/spark/sql/avro/AvroOptions.scala:
##########
@@ -146,6 +147,37 @@ private[sql] class AvroOptions(
       RECURSIVE_FIELD_MAX_DEPTH,
       s"Should not be greater than $RECURSIVE_FIELD_MAX_DEPTH_LIMIT.")
   }
+
+  /**
+   * [[hadoop.conf.Configuration]] is not comparable so we turn it into a map 
for [[equals]] and

Review Comment:
   Let's fix up the docs.



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

Reply via email to