Skip to content

Commit 79941a4

Browse files
committed
Add test for log
1 parent 6c8f8c6 commit 79941a4

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

datafusion/tests/test_functions.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,7 @@ def test_math_functions():
133133
f.factorial(literal(6)),
134134
f.isnan(col_nav),
135135
f.iszero(col_nav),
136+
f.log(literal(3), col_v + literal(pa.scalar(1))),
136137
)
137138
batches = df.collect()
138139
assert len(batches) == 1
@@ -189,6 +190,9 @@ def test_math_functions():
189190
np.testing.assert_array_almost_equal(result.column(34), math.factorial(6))
190191
np.testing.assert_array_almost_equal(result.column(35), np.isnan(na_values))
191192
np.testing.assert_array_almost_equal(result.column(36), na_values == 0)
193+
np.testing.assert_array_almost_equal(
194+
result.column(37), np.emath.logn(3, values + 1.0)
195+
)
192196

193197

194198
def test_string_functions(df):

0 commit comments

Comments
 (0)