cloud-fan commented on a change in pull request #23667: [SPARK-26745][SQL]
Revert count optimization in JSON datasource by SPARK-24959
URL: https://github.com/apache/spark/pull/23667#discussion_r252552978
##########
File path:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/csv/UnivocityParser.scala
##########
@@ -188,11 +188,19 @@ class UnivocityParser(
}
}
+ private val doParse = if (requiredSchema.nonEmpty) {
+ (input: String) => convert(tokenizer.parseLine(input))
+ } else {
+ // If `columnPruning` enabled and partition attributes scanned only,
+ // `schema` gets empty.
+ (_: String) => InternalRow.empty
Review comment:
It's too long ago and I can't remember the details. Does it mean we still
have this count optimization for CSV? does it work in multiline mode?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on 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]