Skip to content

Commit 0c84be7

Browse files
committed
Minior: Add negative tests about log function
1 parent e07a79c commit 0c84be7

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

datafusion/sqllogictest/test_files/scalar.slt

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -561,8 +561,15 @@ select log(2, 64) a, log(100) b union all select log(2, 8), log(10);
561561
query RR rowsort
562562
select log(null, 64) a, log(null) b;
563563
----
564+
-0.584962500721 -0.176091259056
565+
566+
# log scalar nulls
567+
query RR rowsort
568+
select log(2, 2.0/3) a, log(10, 2.0/3) b;
569+
----
564570
NULL NULL
565571

572+
566573
# log scalar nulls #1
567574
query RR rowsort
568575
select log(2, null) a, log(null) b;
@@ -614,6 +621,12 @@ select log10(null);
614621
----
615622
NULL
616623

624+
# log10 scalar Fraction
625+
query R rowsort
626+
select log10(2.0/3);
627+
----
628+
-0.176091259056
629+
617630
# log10 scalar ops with zero edgecases
618631
# please see https://github.com/apache/arrow-datafusion/pull/5245#issuecomment-1426828382
619632
query R rowsort
@@ -644,6 +657,12 @@ select log2(null);
644657
----
645658
NULL
646659

660+
# log2 scalar Fraction
661+
query R rowsort
662+
select log2(2.0/3);
663+
----
664+
-0.584962500721
665+
647666
# log2 scalar ops with zero edgecases
648667
# please see https://github.com/apache/arrow-datafusion/pull/5245#issuecomment-1426828382
649668
query R rowsort

0 commit comments

Comments
 (0)