def _eval(self, segment, **kwargs):
    'Join/From clauses should not contain subqueries. Use CTEs instead.\n\n        NB: No fix for this routine because it would be very complex to\n        implement reliably.\n        '
    parent_types = self._config_mapping[self.forbid_subquery_in]
    for parent_type in parent_types:
        if segment.is_type(parent_type):
            table_expression = segment.get_child('table_expression')
            if (not table_expression):
                return None
            table_expression = table_expression.get_child('main_table_expression')
            if (not table_expression):
                return None
            problem_children = ['with_compound_statement', 'set_expression', 'select_statement']
            for seg_type in problem_children:
                seg = table_expression.get_child(seg_type)
                if seg:
                    return LintResult(anchor=seg, description=f'{parent_type} clauses should not contain subqueries. Use CTEs instead')
Join/From clauses should not contain subqueries. Use CTEs instead.

NB: No fix for this routine because it would be very complex to
implement reliably.
def _eval(self, segment, **kwargs):
    'Join/From clauses should not contain subqueries. Use CTEs instead.\n\n        NB: No fix for this routine because it would be very complex to\n        implement reliably.\n        '
    parent_types = self._config_mapping[self.forbid_subquery_in]
    for parent_type in parent_types:
        if segment.is_type(parent_type):
            table_expression = segment.get_child('table_expression')
            if (not table_expression):
                return None
            table_expression = table_expression.get_child('main_table_expression')
            if (not table_expression):
                return None
            problem_children = ['with_compound_statement', 'set_expression', 'select_statement']
            for seg_type in problem_children:
                seg = table_expression.get_child(seg_type)
                if seg:
                    return LintResult(anchor=seg, description=f'{parent_type} clauses should not contain subqueries. Use CTEs instead')