Skip to content

Commit 951e2f9

Browse files
committed
fix linter
1 parent 88d682c commit 951e2f9

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

python/pyspark/sql/tests/arrow/test_arrow_cogrouped_map.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -335,6 +335,8 @@ def summarize(key, left, right):
335335
}
336336
)
337337

338+
schema = "key long, left_rows long, left_columns long, right_rows long, right_columns long"
339+
338340
expected = [
339341
Row(key=0, left_rows=5000000, left_columns=12, right_rows=25000, right_columns=22),
340342
Row(key=1, left_rows=5000000, left_columns=12, right_rows=25000, right_columns=22),
@@ -353,10 +355,7 @@ def summarize(key, left, right):
353355
result = (
354356
df1.groupby("key")
355357
.cogroup(df2.groupby("key"))
356-
.applyInArrow(
357-
summarize,
358-
schema="key long, left_rows long, left_columns long, right_rows long, right_columns long",
359-
)
358+
.applyInArrow(summarize, schema=schema)
360359
.sort("key")
361360
.collect()
362361
)

python/pyspark/sql/tests/pandas/test_pandas_cogrouped_map.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -682,6 +682,8 @@ def summarize(key, left, right):
682682
}
683683
)
684684

685+
schema = "key long, left_rows long, left_columns long, right_rows long, right_columns long"
686+
685687
expected = [
686688
Row(key=0, left_rows=5000000, left_columns=12, right_rows=25000, right_columns=22),
687689
Row(key=1, left_rows=5000000, left_columns=12, right_rows=25000, right_columns=22),
@@ -700,10 +702,7 @@ def summarize(key, left, right):
700702
result = (
701703
df1.groupby("key")
702704
.cogroup(df2.groupby("key"))
703-
.applyInPandas(
704-
summarize,
705-
schema="key long, left_rows long, left_columns long, right_rows long, right_columns long",
706-
)
705+
.applyInPandas(summarize, schema=schema)
707706
.sort("key")
708707
.collect()
709708
)

0 commit comments

Comments
 (0)