allisonwang-db commented on code in PR #54362:
URL: https://github.com/apache/spark/pull/54362#discussion_r2835655587


##########
sql/core/src/test/scala/org/apache/spark/sql/execution/python/streaming/PythonStreamingDataSourceSuite.scala:
##########
@@ -444,13 +444,15 @@ class PythonStreamingDataSourceSimpleSuite extends 
PythonDataSourceSuiteBase {
     }
     assert(err.getCause.isInstanceOf[SparkException])
     val cause = err.getCause.asInstanceOf[SparkException]
+    // SPARK-55583: Python streaming data source wraps all Python exceptions as
+    // PYTHON_STREAMING_DATA_SOURCE_RUNTIME_ERROR. The underlying schema 
mismatch
+    // error (DATA_SOURCE_RETURN_SCHEMA_MISMATCH) is preserved in the message.
     checkErrorMatchPVals(
       cause,
-      condition = "ARROW_TYPE_MISMATCH",
+      condition = "PYTHON_STREAMING_DATA_SOURCE_RUNTIME_ERROR",
       parameters = Map(
-        "operation" -> "Python streaming data source read",
-        "outputTypes" -> 
"StructType\\(StructField\\(id,IntegerType,false\\)\\)",
-        "actualDataTypes" -> 
"StructType\\(StructField\\(id,StringType,true\\)\\)"
+        "action" -> "planPartitions",
+        "msg" -> "(?s).*DATA_SOURCE_RETURN_SCHEMA_MISMATCH.*"

Review Comment:
   What's the full error message here? Does it contain two error classes?



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to