Github user viirya commented on a diff in the pull request:
https://github.com/apache/spark/pull/6725#discussion_r32371084
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
@@ -1084,6 +1084,22 @@ object functions {
def log(columnName: String): Column = log(Column(columnName))
/**
+ * Returns the first argument-base logarithm of the second argument.
+ *
+ * @group math_funcs
+ * @since 1.4.0
+ */
+ def log(base: Double, a: Column): Column = Logarithm(lit(base).expr,
a.expr)
+
+ /**
+ * Returns the first argument-base logarithm of the second argument.
+ *
+ * @group math_funcs
+ * @since 1.4.0
+ */
+ def log(base: Double, a: String): Column = log(base, Column(a))
+
--- End diff --
It is suggested by @rxin. I think it is reasonable because it is hard to
have a use case to returns the logarithm of one column with another column as
base. Usually you want to compute the logarithm values for a column with the
same base.
---
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]