Github user rxin commented on a diff in the pull request: https://github.com/apache/spark/pull/5750#discussion_r29306565 --- Diff: python/pyspark/sql/functions.py --- @@ -33,17 +33,36 @@ __all__ = ['countDistinct', 'approxCountDistinct', 'udf'] -def _create_function(name, doc=""): +def _function_obj(sc, is_math=False): + if not is_math: + return sc._jvm.functions + else: + return sc._jvm.mathfunctions + + +def _create_function(name, doc="", is_math=False, binary=False): """ Create a function for aggregator by name""" - def _(col): + def _(col1, col2=None): --- End diff -- It is somewhat strange to have col2 be default None. I think it's easier if we just create a _create_binary_function function.
--- 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