forked from apache/datafusion-comet
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Use IfExpr to check when input to log2 is <=0 and return null (apache…
…#506) ## Which issue does this PR close? Closes apache#485 ## Rationale for this change Compatibility with how Spark handles logarithms of values <=0. ## What changes are included in this PR? Use IfExpr to check when input to log2 is <=0 and return null. This is done to match Spark's behavior, which in turn is implemented to match Hive's behavior. ## How are these changes tested? The existing test for `ln`, `log2` and `log10` was modified so that it includes negative numbers as part of the inputs being tested.
- Loading branch information
1 parent
de8c55e
commit 6f9b56a
Showing
3 changed files
with
15 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters