File tree Expand file tree Collapse file tree 2 files changed +16
-16
lines changed
src/Flow/ETL/Transformation
tests/Flow/ETL/Tests/Integration/DataFrame Expand file tree Collapse file tree 2 files changed +16
-16
lines changed Original file line number Diff line number Diff line change 88
99final readonly class Limit implements Transformation
1010{
11- public function __construct (private int $ limit )
11+ public function __construct (private ? int $ limit )
1212 {
1313 }
1414
Original file line number Diff line number Diff line change @@ -36,21 +36,6 @@ public function test_exceeding_the_limit_in_one_rows_set() : void
3636 self ::assertCount (9 , $ rows );
3737 }
3838
39- public function test_limit_null () : void
40- {
41- $ rows = df ()
42- ->read (from_array (
43- \array_map (
44- fn (int $ id ) : array => ['id ' => $ id ],
45- \range (1 , 10 )
46- )
47- ))
48- ->limit (null )
49- ->fetch ();
50-
51- self ::assertCount (10 , $ rows );
52- }
53-
5439 public function test_fetch_with_limit () : void
5540 {
5641 $ rows = df ()
@@ -130,6 +115,21 @@ public function test_limit_below_0() : void
130115 df ()->read (from_rows (\Flow \ETL \DSL \rows ()))->limit (-1 );
131116 }
132117
118+ public function test_limit_null () : void
119+ {
120+ $ rows = df ()
121+ ->read (from_array (
122+ \array_map (
123+ fn (int $ id ) : array => ['id ' => $ id ],
124+ \range (1 , 10 )
125+ )
126+ ))
127+ ->limit (null )
128+ ->fetch ();
129+
130+ self ::assertCount (10 , $ rows );
131+ }
132+
133133 public function test_limit_when_transformation_is_expanding_rows_extracted_from_extractor () : void
134134 {
135135 $ rows = df ()
You can’t perform that action at this time.
0 commit comments