HyukjinKwon commented on a change in pull request #25820: [SPARK-29101][SQL]
Fix count API for csv file when DROPMALFORMED mode is selected
URL: https://github.com/apache/spark/pull/25820#discussion_r325523272
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala
##########
@@ -188,7 +188,8 @@ class UnivocityParser(
}
}
- private val doParse = if (requiredSchema.nonEmpty) {
+ // parse if the columnPruning is disabled or requiredSchema is nonEmpty
+ private val doParse = if (!options.columnPruning || requiredSchema.nonEmpty)
{
Review comment:
Can we switch the condition to:
```scala
if (options.columnPruning && requiredSchema.isEmpty) {
...
} else {
...
}
```
----------------------------------------------------------------
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.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]