Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/pyspark/sql/connect/shell/progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,10 +174,10 @@ def update_ticks(
self._ticks = total_tasks
self._tick = completed_tasks
self._bytes_read = sum(map(lambda x: x.num_bytes_read, stages))
if self._tick is not None and self._tick >= 0:
self.output()
self._running = inflight_tasks
self._stages = stages
if self._tick is not None and self._tick >= 0:
self.output()
self._notify(False)

def finish(self) -> None:
Expand Down
1 change: 1 addition & 0 deletions python/pyspark/sql/tests/connect/shell/test_progress.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def test_simple_progress(self):
self.assertIn("50.00%", val, "Current progress is 50%")
self.assertIn("****", val, "Should use the default char to print.")
self.assertIn("Scanned 999.0 B", val, "Should contain the bytes scanned metric.")
self.assertIn("10 Tasks running", val, "Should contain current running tasks.")
self.assertFalse(val.endswith("\r"), "Line should not be empty")
p.finish()
val = buffer.getvalue()
Expand Down