HyukjinKwon 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_r252559932
##########
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:
Yes, it does for CSV when multiline is off and, for miltiline mode it
executes a different code path.
`UnivocityParser.parseStream` -> `UnivocityParser.convert`
----------------------------------------------------------------
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]