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


##########
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:
   > Using Java map here might be more performant (given the extra overhead we 
introduce just for the comparison)
   yeah that's fine to me



##########
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:
   > Using Java map here might be more performant (given the extra overhead we 
introduce just for the comparison)
   
   yeah that's fine to me



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