Github user yijieshen commented on a diff in the pull request:
https://github.com/apache/spark/pull/6871#discussion_r32795179
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/math.scala
---
@@ -258,6 +258,10 @@ case class Pow(left: Expression, right: Expression)
case class Logarithm(left: Expression, right: Expression)
extends BinaryMathExpression((c1, c2) => math.log(c2) / math.log(c1),
"LOG") {
+
+ /**
+ * Natural log, i.e. using e as the base.
+ */
def this(child: Expression) = {
this(EulerNumber(), child)
}
--- End diff --
I'd prefer to remove this single parameter constructor, because this would
make both `ln` and `log(c)` express the same meaning in a SQL expression.
And also complex the binary log here to check its first argument branch in
both `eval` & `genCode`
---
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]