File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -188,13 +188,13 @@ class UnivocityParser(
188188 }
189189 }
190190
191- // parse if the columnPruning is disabled or requiredSchema is nonEmpty
192- private val doParse = if (! options.columnPruning || requiredSchema.nonEmpty) {
193- (input : String ) => convert(tokenizer.parseLine(input))
194- } else {
191+ private val doParse = if (options.columnPruning && requiredSchema.isEmpty) {
195192 // If `columnPruning` enabled and partition attributes scanned only,
196193 // `schema` gets empty.
197194 (_ : String ) => InternalRow .empty
195+ } else {
196+ // parse if the columnPruning is disabled or requiredSchema is nonEmpty
197+ (input : String ) => convert(tokenizer.parseLine(input))
198198 }
199199
200200 /**
You can’t perform that action at this time.
0 commit comments