protected function query(Select $sql)
    {
        $cid = $this->getId($sql);
        $collection = $this->repository
            ->getCollectionsMap()
            ->get($cid, false);

        if (false === $collection) {
            $collection = $this->getCollection($sql, $cid);
        }

        return $collection;
    }