private function getAncestorIds(array $batch)
    {
        $sql = $this->getAncestorLookupSql($batch);

        $ancestorIds = array();
        foreach ($this->connection->executeQuery($sql)->fetchAll() as $data) {
            // FIXME: skip ancestors which are cached
            // Fix: Oracle returns keys in uppercase
            $ancestorIds[] = reset($data);
        }

        return $ancestorIds;
    }