protected function assembleResult(Query $query, ResponseInterface $response): Result
    {
        $response = $response->getBody()->getContents();

        try {
            $result = \GuzzleHttp\json_decode($response, true);

            $statistic = new QueryStatistic(
                $result['statistics']['rows_read'] ?? 0,
                $result['statistics']['bytes_read'] ?? 0,
                $result['statistics']['elapsed'] ?? 0,
                $result['rows_before_limit_at_least'] ?? null
            );

            return new Result($query, $result['data'] ?? [], $statistic);
        } catch (\Exception $e) {
            throw TransportException::malformedResponseFromServer($response);
        }
    }