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 8
8
9
9
final readonly class Limit implements Transformation
10
10
{
11
- public function __construct (private int $ limit )
11
+ public function __construct (private ? int $ limit )
12
12
{
13
13
}
14
14
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
36
36
self ::assertCount (9 , $ rows );
37
37
}
38
38
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
-
54
39
public function test_fetch_with_limit () : void
55
40
{
56
41
$ rows = df ()
@@ -130,6 +115,21 @@ public function test_limit_below_0() : void
130
115
df ()->read (from_rows (\Flow \ETL \DSL \rows ()))->limit (-1 );
131
116
}
132
117
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
+
133
133
public function test_limit_when_transformation_is_expanding_rows_extracted_from_extractor () : void
134
134
{
135
135
$ rows = df ()
You can’t perform that action at this time.
0 commit comments