wengh commented on code in PR #50531: URL: https://github.com/apache/spark/pull/50531#discussion_r2032220968
########## sql/core/src/main/scala/org/apache/spark/sql/execution/python/MapInBatchEvaluatorFactory.scala: ########## @@ -75,6 +77,12 @@ class MapInBatchEvaluatorFactory( val unsafeProj = UnsafeProjection.create(output, output) columnarBatchIter.flatMap { batch => + // Ensure the schema matches the expected schema + val actualSchema = batch.column(0).dataType() + if (!outputSchema.sameType(actualSchema)) { // Ignore nullability mismatch for now Review Comment: Yeah, not ignoring nullability breaks many of existing tests (e.g. where expected field is not nullable but actual field is nullable but there's no null values, so the actual schema is technically wrong but not causing any problems) -- 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-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org