Skip to content

Commit

Permalink
[SPARK-45109][SQL][CONNECT][FOLLOWUP] Fix log function in Connect
Browse files Browse the repository at this point in the history
### What changes were proposed in this pull request?
This is a follow-up PR to apache#42863, the 1 argument `log` function should also point to `ln`.

### Why are the changes needed?
Bugfix.

### Does this PR introduce _any_ user-facing change?
No, these Spark Connect functions haven't been released.

### How was this patch tested?
Exsiting UTs.

### Was this patch authored or co-authored using generative AI tooling?
No.

Closes apache#42869 from peter-toth/SPARK-45109-fix-log.

Authored-by: Peter Toth <peter.toth@gmail.com>
Signed-off-by: Peter Toth <peter.toth@gmail.com>
  • Loading branch information
peter-toth committed Sep 11, 2023
1 parent 169aa4b commit 6c3d9f5
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2632,7 +2632,7 @@ object functions {
* @group math_funcs
* @since 3.4.0
*/
def log(e: Column): Column = Column.fn("log", e)
def log(e: Column): Column = ln(e)

/**
* Computes the natural logarithm of the given column.
Expand Down
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
Project [LOG(E(), b#0) AS LOG(E(), b)#0]
Project [ln(b#0) AS ln(b)#0]
+- LocalRelation <empty>, [id#0L, a#0, b#0, d#0, e#0, f#0, g#0]
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
},
"expressions": [{
"unresolvedFunction": {
"functionName": "log",
"functionName": "ln",
"arguments": [{
"unresolvedAttribute": {
"unparsedIdentifier": "b"
Expand Down
Binary file not shown.

0 comments on commit 6c3d9f5

Please sign in to comment.