File tree Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Expand file tree Collapse file tree 1 file changed +14
-7
lines changed Original file line number Diff line number Diff line change @@ -755,13 +755,20 @@ def test_execution_plan(aggregate_df):
755755 assert "CsvExec:" in indent
756756
757757 ctx = SessionContext ()
758- stream = ctx .execute (plan , 0 )
759- # get the one and only batch
760- batch = stream .next ()
761- assert batch is not None
762- # there should be no more batches
763- with pytest .raises (StopIteration ):
764- stream .next ()
758+ rows_returned = 0
759+ for idx in range (0 , plan .partition_count ):
760+ stream = ctx .execute (plan , idx )
761+ try :
762+ batch = stream .next ()
763+ assert batch is not None
764+ rows_returned += len (batch .to_pyarrow ()[0 ])
765+ except StopIteration :
766+ # This is one of the partitions with no values
767+ pass
768+ with pytest .raises (StopIteration ):
769+ stream .next ()
770+
771+ assert rows_returned == 5
765772
766773
767774def test_repartition (df ):
You can’t perform that action at this time.
0 commit comments