Skip to content

Commit e299daf

Browse files
committed
remove unused df fixture and fix parameter shadowing
1 parent 2d5615c commit e299daf

2 files changed

Lines changed: 8 additions & 8 deletions

File tree

python/datafusion/functions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1049,8 +1049,8 @@ def greatest(*args: Expr) -> Expr:
10491049
>>> result.collect_column("greatest")[1].as_py()
10501050
3
10511051
"""
1052-
args = [arg.expr for arg in args]
1053-
return Expr(f.greatest(*args))
1052+
exprs = [arg.expr for arg in args]
1053+
return Expr(f.greatest(*exprs))
10541054

10551055

10561056
def ifnull(x: Expr, y: Expr) -> Expr:
@@ -1130,8 +1130,8 @@ def least(*args: Expr) -> Expr:
11301130
>>> result.collect_column("least")[1].as_py()
11311131
1
11321132
"""
1133-
args = [arg.expr for arg in args]
1134-
return Expr(f.least(*args))
1133+
exprs = [arg.expr for arg in args]
1134+
return Expr(f.least(*exprs))
11351135

11361136

11371137
def left(string: Expr, n: Expr) -> Expr:

python/tests/test_functions.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1470,7 +1470,7 @@ def test_coalesce(df):
14701470
)
14711471

14721472

1473-
def test_greatest(df):
1473+
def test_greatest():
14741474
ctx = SessionContext()
14751475
batch = pa.RecordBatch.from_arrays(
14761476
[
@@ -1523,7 +1523,7 @@ def test_greatest(df):
15231523
assert result.column(0).to_pylist() == ["banana", "cherry"]
15241524

15251525

1526-
def test_least(df):
1526+
def test_least():
15271527
ctx = SessionContext()
15281528
batch = pa.RecordBatch.from_arrays(
15291529
[
@@ -1574,7 +1574,7 @@ def test_least(df):
15741574
assert result.column(0).to_pylist() == ["apple", "apricot"]
15751575

15761576

1577-
def test_nvl2(df):
1577+
def test_nvl2():
15781578
ctx = SessionContext()
15791579
batch = pa.RecordBatch.from_arrays(
15801580
[
@@ -1608,7 +1608,7 @@ def test_nvl2(df):
16081608
assert result.column(0).to_pylist() == ["not_null", "is_null"]
16091609

16101610

1611-
def test_ifnull(df):
1611+
def test_ifnull():
16121612
ctx = SessionContext()
16131613
batch = pa.RecordBatch.from_arrays(
16141614
[

0 commit comments

Comments
 (0)