Skip to content

Commit c34b34d

Browse files
committed
test: improve join_on case
1 parent 664ae2f commit c34b34d

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

python/tests/test_dataframe.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ def test_join_on():
269269
df = ctx.create_dataframe([[batch]], "l")
270270

271271
batch = pa.RecordBatch.from_arrays(
272-
[pa.array([1, 2]), pa.array([8, 10])],
272+
[pa.array([1, 2]), pa.array([-8, 10])],
273273
names=["a", "c"],
274274
)
275275
df1 = ctx.create_dataframe([[batch]], "r")
@@ -279,7 +279,7 @@ def test_join_on():
279279
df2 = df2.sort(column("l.a"))
280280
table = pa.Table.from_batches(df2.collect())
281281

282-
expected = {"a": [1, 2], "c": [8, 10], "b": [4, 5]}
282+
expected = {"a": [1, 2], "c": [-8, 10], "b": [4, 5]}
283283
assert table.to_pydict() == expected
284284

285285
df3 = df.join_on(
@@ -291,8 +291,7 @@ def test_join_on():
291291
df3.show()
292292
df3 = df3.sort(column("l.a"))
293293
table = pa.Table.from_batches(df3.collect())
294-
295-
expected = {"a": [1, 2], "c": [8, 10], "b": [4, 5]}
294+
expected = {"a": [2], "c": [10], "b": [5]}
296295
assert table.to_pydict() == expected
297296

298297

0 commit comments

Comments
 (0)