public function walkIndexBy($indexBy)
    {
        $pathExpression = $indexBy->simpleStateFieldPathExpression;
        $alias          = $pathExpression->identificationVariable;
        $field          = $pathExpression->field;

        if (isset($this->scalarFields[$alias][$field])) {
            $this->rsm->addIndexByScalar($this->scalarFields[$alias][$field]);

            return;
        }

        $this->rsm->addIndexBy($alias, $field);
    }