Skip to content

Commit

Permalink
Minior: Add negative tests about log function (#9245)
Browse files Browse the repository at this point in the history
* Minior: Add negative tests about log function

* Minior: Add negative tests about log function
  • Loading branch information
caicancai authored Feb 19, 2024
1 parent b2a0451 commit 5f55b6e
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions datafusion/sqllogictest/test_files/scalar.slt
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,12 @@ select log(null, null) a, log(null) b;
----
NULL NULL

# log scalar fraction
query RR rowsort
select log(2, 2.0/3) a, log(10, 2.0/3) b;
----
-0.584962500721 -0.176091259056

# log scalar ops with zero edgecases
# please see https://github.com/apache/arrow-datafusion/pull/5245#issuecomment-1426828382
query RR rowsort
Expand Down Expand Up @@ -614,6 +620,12 @@ select log10(null);
----
NULL

# log10 scalar fraction
query R rowsort
select log10(2.0/3);
----
-0.176091259056

# log10 scalar ops with zero edgecases
# please see https://github.com/apache/arrow-datafusion/pull/5245#issuecomment-1426828382
query R rowsort
Expand Down Expand Up @@ -644,6 +656,12 @@ select log2(null);
----
NULL

# log2 scalar fraction
query R rowsort
select log2(2.0/3);
----
-0.584962500721

# log2 scalar ops with zero edgecases
# please see https://github.com/apache/arrow-datafusion/pull/5245#issuecomment-1426828382
query R rowsort
Expand Down

0 comments on commit 5f55b6e

Please sign in to comment.