zhengruifeng commented on code in PR #57911:
URL: https://github.com/apache/spark/pull/57911#discussion_r3819595707


##########
python/pyspark/sql/conversion.py:
##########
@@ -742,6 +763,12 @@ def convert_binary(value: Any) -> Any:
                     if not nullable:
                         raise PySparkValueError(f"input for {dataType} must 
not be None")
                     return None
+                elif type(value) is bytes:

Review Comment:
   shall we also use `isinstance`? 
   
   and then remove `bytes` from following `assert isinstance(value, (bytes, 
bytearray))`?



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