@@ -39,7 +39,7 @@ case class CSVScan(
39
39
readDataSchema : StructType ,
40
40
readPartitionSchema : StructType ,
41
41
options : CaseInsensitiveStringMap ,
42
- filters : Seq [Filter ])
42
+ pushedFilters : Array [Filter ])
43
43
extends TextBasedFileScan (sparkSession, fileIndex, readDataSchema, readPartitionSchema, options) {
44
44
45
45
private lazy val parsedOptions : CSVOptions = new CSVOptions (
@@ -87,6 +87,20 @@ case class CSVScan(
87
87
// The partition values are already truncated in `FileScan.partitions`.
88
88
// We should use `readPartitionSchema` as the partition schema here.
89
89
CSVPartitionReaderFactory (sparkSession.sessionState.conf, broadcastedConf,
90
- dataSchema, readDataSchema, readPartitionSchema, parsedOptions, filters)
90
+ dataSchema, readDataSchema, readPartitionSchema, parsedOptions, pushedFilters)
91
+ }
92
+
93
+ override def equals (obj : Any ): Boolean = obj match {
94
+ case o : CSVScan =>
95
+ fileIndex == o.fileIndex && dataSchema == o.dataSchema &&
96
+ readDataSchema == o.readDataSchema && readPartitionSchema == o.readPartitionSchema &&
97
+ options == o.options && equivalentFilters(pushedFilters, o.pushedFilters)
98
+ case _ => false
99
+ }
100
+
101
+ override def hashCode (): Int = getClass.hashCode()
102
+
103
+ override def description (): String = {
104
+ super .description() + " , PushedFilters: " + pushedFilters.mkString(" [" , " , " , " ]" )
91
105
}
92
106
}
0 commit comments