HyukjinKwon commented on a change in pull request #24095: [SPARK-27163][PYTHON] 
Cleanup and consolidate Pandas UDF functionality
URL: https://github.com/apache/spark/pull/24095#discussion_r265812341
 
 

 ##########
 File path: python/pyspark/worker.py
 ##########
 @@ -123,15 +120,9 @@ def wrapped(key_series, value_series):
                 "Number of columns of the returned pandas.DataFrame "
                 "doesn't match specified schema. "
                 "Expected: {} Actual: {}".format(len(return_type), 
len(result.columns)))
+        return result
 
-        # Assign result columns by schema name if user labeled with strings, 
else use position
-        if assign_cols_by_name and any(isinstance(name, basestring) for name 
in result.columns):
 
 Review comment:
   Oops, okie. The logic was actually duplicated with `_create_batch`.

----------------------------------------------------------------
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:
us...@infra.apache.org


With regards,
Apache Git Services

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

Reply via email to