Skip to content

Commit

Permalink
Remove deprecated Sort class
Browse files Browse the repository at this point in the history
  • Loading branch information
stloyd committed Oct 1, 2023
1 parent 0e201cd commit 9742bdf
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 54 deletions.
19 changes: 2 additions & 17 deletions src/core/etl/src/Flow/ETL/DataFrame.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@

namespace Flow\ETL;

use function Flow\ETL\DSL\ref;
use Flow\ETL\DSL\To;
use Flow\ETL\DSL\Transform;
use Flow\ETL\Exception\InvalidArgumentException;
Expand All @@ -27,7 +26,6 @@
use Flow\ETL\Row\Reference;
use Flow\ETL\Row\References;
use Flow\ETL\Row\Schema;
use Flow\ETL\Row\Sort;
use Flow\ETL\Transformer\CallbackRowTransformer;
use Flow\ETL\Transformer\CrossJoinRowsTransformer;
use Flow\ETL\Transformer\DropDuplicatesTransformer;
Expand Down Expand Up @@ -610,28 +608,15 @@ public function select(string|Reference ...$entries) : self

/**
* @lazy
*
* @psalm-suppress DeprecatedClass
*/
public function sortBy(Sort|EntryReference ...$entries) : self
public function sortBy(EntryReference ...$entries) : self
{
$this
->cache($this->context->config->id())
->run();

$this->pipeline = $this->pipeline->cleanCopy();

$sortBy = [];

foreach ($entries as $entry) {
if ($entry instanceof Sort) {
$sortBy[] = $entry->isAsc() ? ref($entry->name())->asc() : ref($entry->name())->desc();
} else {
$sortBy[] = $entry;
}
}

$this->pipeline->source($this->context->config->externalSort()->sortBy(...$sortBy));
$this->pipeline->source($this->context->config->externalSort()->sortBy(...$entries));

return $this;
}
Expand Down
37 changes: 0 additions & 37 deletions src/core/etl/src/Flow/ETL/Row/Sort.php

This file was deleted.

0 comments on commit 9742bdf

Please sign in to comment.