Github user rdblue commented on a diff in the pull request:
https://github.com/apache/spark/pull/16537#discussion_r95484969
--- Diff: python/pyspark/sql/functions.py ---
@@ -1848,6 +1848,12 @@ def __del__(self):
self._broadcast = None
def __call__(self, *cols):
+ for c in cols:
+ if not isinstance(c, (Column, str)):
+ raise TypeError(
+ "All arguments should be Columns or strings
representing column names. "
--- End diff --
"All arguments" is a little vague, since this is going to be called later
in code than the UDF definition. What about an error message like "Invalid UDF
argument, not a String or Column: {0} of type {1}"
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]