1#include "duckdb/parser/tableref/table_function_ref.hpp"
2
3#include "duckdb/common/serializer.hpp"
4
5using namespace duckdb;
6using namespace std;
7
8bool TableFunctionRef::Equals(const TableRef *other_) const {
9 if (!TableRef::Equals(other_)) {
10 return false;
11 }
12 auto other = (TableFunctionRef *)other_;
13 return function->Equals(other->function.get());
14}
15
16void TableFunctionRef::Serialize(Serializer &serializer) {
17 TableRef::Serialize(serializer);
18 function->Serialize(serializer);
19}
20
21unique_ptr<TableRef> TableFunctionRef::Deserialize(Deserializer &source) {
22 auto result = make_unique<TableFunctionRef>();
23
24 result->function = ParsedExpression::Deserialize(source);
25
26 return move(result);
27}
28
29unique_ptr<TableRef> TableFunctionRef::Copy() {
30 auto copy = make_unique<TableFunctionRef>();
31
32 copy->function = function->Copy();
33 copy->alias = alias;
34
35 return move(copy);
36}
37