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 it 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:
[email protected]
With regards,
Apache Git Services
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]