cloud-fan commented on a change in pull request #24327: [SPARK-27418][SQL] 
Migrate Parquet to File Data Source V2
URL: https://github.com/apache/spark/pull/24327#discussion_r279740090
 
 

 ##########
 File path: 
sql/core/src/test/scala/org/apache/spark/sql/execution/datasources/parquet/ParquetSchemaSuite.scala
 ##########
 @@ -424,16 +424,8 @@ class ParquetSchemaSuite extends ParquetSchemaTest {
 
       // Check if the physical type is reporting correctly
       val errMsg = e.getCause.getMessage
-      assert(errMsg.startsWith("Parquet column cannot be converted in file"))
-      val file = errMsg.substring("Parquet column cannot be converted in file 
".length,
-        errMsg.indexOf(". "))
-      val col = spark.read.parquet(file).schema.fields.filter(_.name == "a")
-      assert(col.length == 1)
-      if (col(0).dataType == StringType) {
-        assert(errMsg.contains("Column: [a], Expected: int, Found: BINARY"))
-      } else {
-        assert(errMsg.endsWith("Column: [a], Expected: string, Found: INT32"))
-      }
+      assert(errMsg.contains("Column: [a], Expected: int, Found: BINARY") ||
+        errMsg.endsWith("Column: [a], Expected: string, Found: INT32"))
 
 Review comment:
   why update this test?

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