dongjoon-hyun commented on a change in pull request #24005: [SPARK-27085][SQL]
Migrate CSV to File Data Source V2
URL: https://github.com/apache/spark/pull/24005#discussion_r267997633
##########
File path:
sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala
##########
@@ -329,27 +329,27 @@ class FileBasedDataSourceSuite extends QueryTest with
SharedSQLContext with Befo
test("SPARK-24204 error handling for unsupported Interval data types - csv,
json, parquet, orc") {
withTempDir { dir =>
val tempDir = new File(dir, "files").getCanonicalPath
+ // TODO: test file source V2 after write path is fixed.
Seq(true).foreach { useV1 =>
val useV1List = if (useV1) {
- "orc"
+ "orc,csv"
} else {
""
}
- def errorMessage(format: String, isWrite: Boolean): String = {
- if (isWrite && (useV1 || format != "orc")) {
- "cannot save interval data type into external storage."
- } else {
- s"$format data source does not support calendarinterval data type."
- }
+ def validateErrorMessage(msg: String): Unit = {
+ val msg1 = "cannot save interval data type into external storage."
+ val msg2 = "data source does not support calendarinterval data type."
+ assert(msg.toLowerCase(Locale.ROOT).contains(msg1) ||
+ msg.toLowerCase(Locale.ROOT).contains(msg2))
Review comment:
Got it.
----------------------------------------------------------------
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]