HyukjinKwon commented on code in PR #46324:
URL: https://github.com/apache/spark/pull/46324#discussion_r1586922452


##########
python/pyspark/sql/avro/functions.py:
##########
@@ -80,6 +81,25 @@ def from_avro(
     from py4j.java_gateway import JVMView
     from pyspark.sql.classic.column import _to_java_column
 
+    if not isinstance(data, (Column, str)):
+        raise PySparkTypeError(
+            error_class="INVALID_TYPE",
+            message_parameters={
+                "arg_name": "data",
+                "arg_type": ":class:`~pyspark.sql.Column` or str",

Review Comment:
   `:class:...` is sphinx directive so we won't need to expose it in error 
message.
   
   ```suggestion
                   "pyspark.sql.Column or str",
   ```



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