protected function _traverseClause(Query $query, $name = '', $config = [])
    {
        $clause = $query->clause($name);
        if (!$clause || !$clause->count()) {
            return false;
        }

        $alias = $config['hasOneAlias'];
        $fields = $this->_translationFields();
        $mainTableAlias = $config['mainTableAlias'];
        $mainTableFields = $this->_mainFields();
        $joinRequired = false;

        $clause->traverse(function ($expression) use ($fields, $alias, $mainTableAlias, $mainTableFields, &$joinRequired) {
            if (!($expression instanceof FieldInterface)) {
                return;
            }
            $field = $expression->getField();
            if (!is_string($field) || strpos($field, '.')) {
                return;
            }

            if (in_array($field, $fields)) {
                $joinRequired = true;
                $expression->setField("$alias.$field");

                return;
            }

            if (in_array($field, $mainTableFields)) {
                $expression->setField("$mainTableAlias.$field");
            }
        });

        return $joinRequired;
    }