-
Notifications
You must be signed in to change notification settings - Fork 28
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove covered filters from
FilterRowsTransformer
(#516)
* Remove covered filters from `FilterRowsTransformer` * Add new `IsNumeric` & `IsNotNumeric` expressions
- Loading branch information
Showing
23 changed files
with
82 additions
and
701 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/core/etl/src/Flow/ETL/Row/Reference/Expression/IsNotNumeric.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flow\ETL\Row\Reference\Expression; | ||
|
||
use Flow\ETL\Row; | ||
use Flow\ETL\Row\Reference\Expression; | ||
|
||
final class IsNotNumeric implements Expression | ||
{ | ||
public function __construct( | ||
private readonly Expression $ref | ||
) { | ||
} | ||
|
||
public function eval(Row $row) : bool | ||
{ | ||
return !\is_numeric($this->ref->eval($row)); | ||
} | ||
} |
21 changes: 21 additions & 0 deletions
21
src/core/etl/src/Flow/ETL/Row/Reference/Expression/IsNumeric.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
namespace Flow\ETL\Row\Reference\Expression; | ||
|
||
use Flow\ETL\Row; | ||
use Flow\ETL\Row\Reference\Expression; | ||
|
||
final class IsNumeric implements Expression | ||
{ | ||
public function __construct( | ||
private readonly Expression $ref | ||
) { | ||
} | ||
|
||
public function eval(Row $row) : bool | ||
{ | ||
return \is_numeric($this->ref->eval($row)); | ||
} | ||
} |
58 changes: 0 additions & 58 deletions
58
src/core/etl/src/Flow/ETL/Transformer/Filter/Filter/EntryEqualsTo.php
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
src/core/etl/src/Flow/ETL/Transformer/Filter/Filter/EntryExists.php
This file was deleted.
Oops, something went wrong.
50 changes: 0 additions & 50 deletions
50
src/core/etl/src/Flow/ETL/Transformer/Filter/Filter/EntryNotEqualsTo.php
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
src/core/etl/src/Flow/ETL/Transformer/Filter/Filter/EntryNotNull.php
This file was deleted.
Oops, something went wrong.
35 changes: 0 additions & 35 deletions
35
src/core/etl/src/Flow/ETL/Transformer/Filter/Filter/EntryNotNumber.php
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.