summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/complete/analysis/global/base_visitor.cpp
blob: e89091a83312412cf787687c6bd9521f7ff41c02 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#include "base_visitor.h"

namespace NSQLComplete {

    std::any TSQLv1BaseVisitor::VisitNullable(antlr4::ParserRuleContext* ctx) {
        if (ctx == nullptr) {
            return {};
        }
        return visit(ctx);
    }

    std::any TSQLv1BaseVisitor::aggregateResult(std::any aggregate, std::any nextResult) {
        if (nextResult.has_value()) {
            return nextResult;
        }
        return aggregate;
    }

} // namespace NSQLComplete