We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 1a6730b commit 11af5fdCopy full SHA for 11af5fd
1 file changed
python/tests/test_dataframe.py
@@ -1267,6 +1267,20 @@ def test_optimized_logical_plan(aggregate_df):
1267
assert expected == plan.display_indent()
1268
1269
1270
+def test_optimize_idempotent(aggregate_df):
1271
+ """Running optimize twice should yield the same plan.
1272
+
1273
+ Requires PyArrow >=21.0.0 to match CI environment."""
1274
1275
+ optimized_once = aggregate_df.optimize()
1276
+ optimized_twice = optimized_once.optimize()
1277
1278
+ assert (
1279
+ optimized_once.logical_plan().display_indent()
1280
+ == optimized_twice.logical_plan().display_indent()
1281
+ )
1282
1283
1284
def test_execution_plan(aggregate_df):
1285
plan = aggregate_df.execution_plan()
1286
0 commit comments