final class CoalescePartition
    implements StandaloneCommand
    uses Snapshot
Public API: explicitly declared with @visibility public.

COALESCE PARTITION [NO_WRITE_TO_BINLOG] n: a request to merge away n partitions of a HASH or KEY table.

Mirrors PT_alter_table_coalesce_partition. LOCAL and NO_WRITE_TO_BINLOG are synonyms. Source: https://dev.mysql.com/doc/refman/8.4/en/partitioning-management-hash-key.html.

Removing two hash partitionsdoctest
(new \SqlSemantics\Platform\MySql\Semantics())->analyze('ALTER TABLE t COALESCE PARTITION 2')->statement->commands[0]->count->text // => '2'

Properties§

public bool $local
public Numeral $count

Methods§

public function __construct(public bool $local, public Numeral $count)

Parameters

$localboolWhether NO_WRITE_TO_BINLOG or LOCAL is written
$countNumeralThe number of partitions to remove
public function deriveCommand(Derivation $derivation, Environment $scope): void

Derives nothing: the action holds no expression.

Parameters

$derivationDerivation
$scopeEnvironment
public function render(Output $out): void

Writes the action.

Parameters

$outOutput
Calls 2

Test cases 1§

Test cases that cover or call this symbol, from the coverage report and from the analyzed test sources.

Dedicated tests 1

Relations§

Instantiated in 1