viirya commented on a change in pull request #25044: 
[SPARK-28198][PYTHON][FOLLOW-UP] Add a separate evaluation type for 
mapPartitionsInPandas
URL: https://github.com/apache/spark/pull/25044#discussion_r299985904
 
 

 ##########
 File path: python/pyspark/worker.py
 ##########
 @@ -295,7 +295,8 @@ def read_udfs(pickleSer, infile, eval_type):
     is_map_iter = eval_type == PythonEvalType.SQL_MAP_PANDAS_ITER_UDF
 
     if is_scalar_iter or is_map_iter:
-        assert num_udfs == 1, "One SCALAR_ITER UDF expected here."
+        assert is_scalar_iter and num_udfs == 1, "One SCALAR_ITER UDF expected 
here."
+        assert is_map_iter and num_udfs == 1, "One MAP_ITER UDF expected here."
 
 Review comment:
   Can the two `assert` both be passed? E.g., if `is_scalar_iter`, then another 
`assert` will fail?

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