We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent ed14eab commit 4619bffCopy full SHA for 4619bff
1 file changed
python/tests/test_dataframe.py
@@ -1464,6 +1464,16 @@ def test_empty_to_pandas(df):
1464
assert set(pandas_df.columns) == {"a", "b", "c"}
1465
1466
1467
+def test_show_no_batches(capsys):
1468
+ """Ensure showing a query with no batches still prints headers."""
1469
+ ctx = SessionContext()
1470
+ df = ctx.sql("SELECT 1 AS a WHERE 1=0")
1471
+ df.show()
1472
+ captured = capsys.readouterr()
1473
+ assert "| a |" in captured.out
1474
+ assert "Empty DataFrame" not in captured.out
1475
+
1476
1477
def test_show_empty_dataframe(df, capsys):
1478
"""Ensure showing an empty DataFrame prints a helpful message."""
1479
empty_df = df.limit(0)
0 commit comments