WeichenXu123 commented on code in PR #37734:
URL: https://github.com/apache/spark/pull/37734#discussion_r1016111000


##########
python/pyspark/ml/functions.py:
##########
@@ -522,7 +529,11 @@ def predict_columnar(x1: np.ndarray, x2: np.ndarray) -> 
Mapping[str, np.ndarray]
         output), a dictionary of named numpy arrays (for multiple outputs), or 
a row-oriented list
         of dictionaries (for multiple outputs).
     return_type : :class:`pspark.sql.types.DataType` or str.
-        Spark SQL datatype for the expected output.
+        Spark SQL datatype for the expected output:
+        - ArrayType --> 2-dim numpy array.
+        - StructType --> dict with keys matching struct fields.
+        - StructType --> list of dict with keys matching struct fields, for 
models like the

Review Comment:
   One more comment: pls also add description for the scalar type ( IntegerType 
/ DoubleType etc.) case.



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