aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib/src/vespa/searchlib/expression/interpolatedlookupfunctionnode.h
blob: 9d067681da9d164001c6bd349922f3746e325d33 (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
// Copyright Yahoo. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once

#include "attributenode.h"

namespace search::attribute { class IAttributeVector; }

namespace search::expression {

class InterpolatedLookup : public AttributeNode
{
public:
    DECLARE_EXPRESSIONNODE(InterpolatedLookup);
    DECLARE_NBO_SERIALIZE;

    InterpolatedLookup() noexcept;
    ~InterpolatedLookup() override;
    InterpolatedLookup(const vespalib::string &attribute, ExpressionNode::UP arg);
    InterpolatedLookup(const search::attribute::IAttributeVector &attr, ExpressionNode::UP lookupArg);
    InterpolatedLookup(const InterpolatedLookup &rhs);
    InterpolatedLookup & operator= (const InterpolatedLookup &rhs);
    void visitMembers(vespalib::ObjectVisitor & visitor) const override;
    void selectMembers(const vespalib::ObjectPredicate & predicate, vespalib::ObjectOperation & operation) override;
private:
    std::pair<std::unique_ptr<ResultNode>, std::unique_ptr<Handler>>
    createResultHandler(bool preserveAccurateType, const attribute::IAttributeVector & attribute) const override;
    ExpressionNode::CP  _lookupExpression;
};

}