You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/03/11 09:44:56 UTC
[GitHub] [spark] gengliangwang commented on a change in pull request #24005:
[WIP][SPARK-27085][SQL] Migrate CSV to File Data Source V2
gengliangwang commented on a change in pull request #24005: [WIP][SPARK-27085][SQL] Migrate CSV to File Data Source V2
URL: https://github.com/apache/spark/pull/24005#discussion_r264152328
##########
File path: sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/csv/CSVSuite.scala
##########
@@ -1343,15 +1343,7 @@ class CSVSuite extends QueryTest with SharedSQLContext with SQLTestUtils with Te
.collect()
}.getMessage
assert(msg.contains("only include the internal corrupt record column"))
- intercept[org.apache.spark.sql.catalyst.errors.TreeNodeException[_]] {
- spark
- .read
- .option("columnNameOfCorruptRecord", columnNameOfCorruptRecord)
- .schema(schema)
- .csv(testFile(valueMalformedFile))
- .filter($"_corrupt_record".isNotNull)
- .count()
- }
Review comment:
For V2 will still throw `AnalysisException`, while in V1 it throws `TreeNodeException`. Should we test both behaviors? Is testing `.collect()` enough?
----------------------------------------------------------------
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:
users@infra.apache.org
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org