Github user zero323 commented on a diff in the pull request: https://github.com/apache/spark/pull/16537#discussion_r95486026 --- 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 -- Sounds good. I think it should also provide a suggestion that one can use literals (`lit`, `array`, `struct` and `create_map`).
--- 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 infrastruct...@apache.org or file a JIRA ticket with INFRA. --- --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org