gengliangwang commented on a change in pull request #24369: [SPARK-27459][SQL] 
Revise the exception message of schema inference failure in file source V2
URL: https://github.com/apache/spark/pull/24369#discussion_r275168989
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/test/DataFrameReaderWriterSuite.scala
 ##########
 @@ -428,7 +428,7 @@ class DataFrameReaderWriterSuite extends QueryTest with 
SharedSQLContext with Be
     val message = intercept[AnalysisException] {
       testRead(spark.read.csv(), Seq.empty, schema)
     }.getMessage
-    assert(message.toLowerCase(Locale.ROOT).contains("unable to infer schema 
for csv"))
+    assert(message.contains("Unable to infer schema for CSV. It must be 
specified manually."))
 
 Review comment:
   Because both V1 and V2 show exactly the same message. 
   `toLowerCase(Locale.ROOT)` was added in the migration of CSV V2 
https://github.com/apache/spark/pull/24005/files#diff-b9ddfbc9be8d83ecf100b3b8ff9610b9R431
 

----------------------------------------------------------------
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]

Reply via email to