diff --git a/src/Plugin/Sharding/DescHandler.php b/src/Plugin/Sharding/DescHandler.php index 1a5ddc3e..a8e2e7a6 100644 --- a/src/Plugin/Sharding/DescHandler.php +++ b/src/Plugin/Sharding/DescHandler.php @@ -53,7 +53,7 @@ public function run(): Task { $q = match ($this->payload->type) { 'show' => "SHOW CREATE TABLE {$shard}", - 'desc' => "DESC {$shard}", + 'desc', 'describe' => "DESC {$shard}", default => throw new RuntimeException("Unknown type: {$this->payload->type}"), }; $resp = $this->manticoreClient->sendRequest($q); diff --git a/src/Plugin/Sharding/Payload.php b/src/Plugin/Sharding/Payload.php index bc5063a9..1a407cc6 100644 --- a/src/Plugin/Sharding/Payload.php +++ b/src/Plugin/Sharding/Payload.php @@ -61,7 +61,7 @@ public static function fromRequest(Request $request): static { return match ($request->command) { 'create', 'alter' => static::fromCreate($request), 'drop' => static::fromDrop($request), - 'desc', 'show' => static::fromDesc($request), + 'desc', 'describe', 'show' => static::fromDesc($request), default => throw new QueryParseError('Failed to parse query'), }; } @@ -72,7 +72,7 @@ public static function fromRequest(Request $request): static { * @throws QueryParseError */ protected static function fromDesc(Request $request): static { - $pattern = '/(?:DESC|SHOW\s+CREATE\s+TABLE)\s+(?P