def _eval(self, context: RuleContext) -> Optional[LintResult]:
    'Outermost query should produce known number of columns.'
    start_types = ['select_statement', 'set_expression', 'with_compound_statement']
    if (context.segment.is_type(*start_types) and (not context.functional.parent_stack.any(sp.is_type(*start_types)))):
        crawler = SelectCrawler(context.segment, context.dialect)
        if crawler.query_tree:
            try:
                return self._analyze_result_columns(crawler.query_tree)
            except RuleFailure as e:
                return LintResult(anchor=e.anchor)
    return None
Outermost query should produce known number of columns.
def _eval(self, context: RuleContext) -> Optional[LintResult]:
    
    start_types = ['select_statement', 'set_expression', 'with_compound_statement']
    if (context.segment.is_type(*start_types) and (not context.functional.parent_stack.any(sp.is_type(*start_types)))):
        crawler = SelectCrawler(context.segment, context.dialect)
        if crawler.query_tree:
            try:
                return self._analyze_result_columns(crawler.query_tree)
            except RuleFailure as e:
                return LintResult(anchor=e.anchor)
    return None