Github user rxin commented on a diff in the pull request:
https://github.com/apache/spark/pull/5750#discussion_r29306545
--- 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):
--- End diff --
not sure if you got my previous comment. it might be easier if is_math just
takes a jvm object, rather than using an extra _function_obj
---
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]