Skip to content

Commit 325fb95

Browse files
vladimirg-dbMaxGekk
authored andcommitted
[SPARK-51662][SQL] Make OrcFileFormat comparable
### What changes were proposed in this pull request? Make OrcFileFormat comparable. ### Why are the changes needed? This is important to correctly compare fixed-point/single-pass Analyzer logical plans with `HadoopFsRelation`s. ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Existing tests. ### Was this patch authored or co-authored using generative AI tooling? No. Closes #50454 from vladimirg-db/vladimir-golubev_data/make-orc-file-format-comparable. Authored-by: Vladimir Golubev <[email protected]> Signed-off-by: Max Gekk <[email protected]>
1 parent 825682d commit 325fb95

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

Diff for: sql/hive/src/main/scala/org/apache/spark/sql/hive/orc/OrcFileFormat.scala

+4
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,10 @@ class OrcFileFormat extends FileFormat with DataSourceRegister with Serializable
6161

6262
override def toString: String = "ORC"
6363

64+
override def hashCode(): Int = getClass.hashCode()
65+
66+
override def equals(other: Any): Boolean = other.isInstanceOf[OrcFileFormat]
67+
6468
override def inferSchema(
6569
sparkSession: SparkSession,
6670
options: Map[String, String],

0 commit comments

Comments
 (0)