summaryrefslogtreecommitdiffstats
path: root/yql/essentials/sql/v1/complete/analysis/global/base_visitor.cpp
blob: 38a20d0a9bb40b0afec3a171e1d6341c8946250a (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