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 2022/08/26 12:25:57 UTC

[GitHub] [spark] wangyum commented on a diff in pull request #37574: [SPARK-40207][SQL] Specify the column name when the data type is not supported by datasource

wangyum commented on code in PR #37574:
URL: https://github.com/apache/spark/pull/37574#discussion_r955989716


##########
sql/core/src/test/scala/org/apache/spark/sql/FileBasedDataSourceSuite.scala:
##########
@@ -257,58 +257,64 @@ class FileBasedDataSourceSuite extends QueryTest
   // Text file format only supports string type
   test("SPARK-24691 error handling for unsupported types - text") {
     withTempDir { dir =>
+      def validateErrorMessage(msg: String, column: String, dt: String, format: String): Unit = {
+        val excepted = s"column `$column` has a data type of $dt, " +
+          s"which is not supported by $format."
+        assert(msg.toLowerCase(Locale.ROOT).contains(excepted))

Review Comment:
   Why do we need `toLowerCase`?



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

To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org