aboutsummaryrefslogtreecommitdiffstats
path: root/yql/providers/stat/expr_nodes/yql_stat_expr_nodes.h
blob: 97ca544354b270d991838685d29b586c94cf4939 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#pragma once

#include <yql/essentials/core/expr_nodes/yql_expr_nodes.h>
#include <yql/essentials/providers/common/provider/yql_provider_names.h>
#include <yql/providers/stat/expr_nodes/yql_stat_expr_nodes.gen.h>


namespace NYql {
namespace NNodes {

#include <yql/providers/stat/expr_nodes/yql_stat_expr_nodes.decl.inl.h>

class TStatDSource: public NGenerated::TStatDSourceStub<TExprBase, TCallable, TCoAtom> {
public:
    explicit TStatDSource(const TExprNode* node)
        : TStatDSourceStub {node}
    {
    }

    explicit TStatDSource(const TExprNode::TPtr& node)
        : TStatDSourceStub {node}
    {
    }

    static bool Match(const TExprNode* node) {
        if (!TStatDSourceStub::Match(node)) {
            return false;
        }

        if (node->Child(0)->Content() != StatProviderName) {
            return false;
        }

        return true;
    }
};


class TStatDSink: public NGenerated::TStatDSinkStub<TExprBase, TCallable, TCoAtom> {
public:
    explicit TStatDSink(const TExprNode* node)
        : TStatDSinkStub {node}
    {
    }

    explicit TStatDSink(const TExprNode::TPtr& node)
        : TStatDSinkStub {node}
    {
    }

    static bool Match(const TExprNode* node) {
        if (!TStatDSinkStub::Match(node)) {
            return false;
        }

        if (node->Child(0)->Content() != StatProviderName) {
            return false;
        }

        return true;
    }
};

#include <yql/providers/stat/expr_nodes/yql_stat_expr_nodes.defs.inl.h>

} // namespace NNodes
} // namespace NYql