blob: 24e4efe3cbc530f9ac95e8d2353d9e6bd800f174 (
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
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
#pragma once
#include "unaryfunctionnode.h"
namespace search {
namespace attribute { class IAttributeVector; }
namespace expression {
class InterpolatedLookup : public UnaryFunctionNode
{
public:
DECLARE_EXPRESSIONNODE(InterpolatedLookup);
DECLARE_NBO_SERIALIZE;
InterpolatedLookup();
~InterpolatedLookup();
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 setDocId(DocId docId) { _docId = docId; }
private:
bool onExecute() const override;
void onPrepareResult() override;
void wireAttributes(const search::attribute::IAttributeContext &attrCtx) override;
vespalib::string _attributeName;
const search::attribute::IAttributeVector * _attribute;
DocId _docId;
};
}
}
|