def _resolve_alias(self, field):
        """Access a field (or expression) by alias, similar to how a view works.
        """
        if field in self.base_query['select']:
            field = self.base_query['select'][field]
        return field
dataset/ETHPy150Open mozilla/addons-server/src/olympia/editors/sql_model.py/RawSQLManager._resolve_alias/original