HyukjinKwon commented on a change in pull request #27561: [SPARK-30810][SQL]
Parses and convert a CSV Dataset having different column from 'value' in
csv(dataset) API
URL: https://github.com/apache/spark/pull/27561#discussion_r379225857
##########
File path:
sql/core/src/main/scala/org/apache/spark/sql/execution/datasources/csv/CSVUtils.scala
##########
@@ -33,11 +33,12 @@ object CSVUtils {
// with the one below, `filterCommentAndEmpty` but execution path is
different. One of them
// might have to be removed in the near future if possible.
import lines.sqlContext.implicits._
- val nonEmptyLines = lines.filter(length(trim($"value")) > 0)
Review comment:
@MaxGekk and @cloud-fan, I came up with a better idea to avoid relying on
string format in `col`. Can you take a look again? I think this way is safer.
----------------------------------------------------------------
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]