1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/parser/qualified_name_set.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/parser/qualified_name.hpp"
12#include "duckdb/common/types/hash.hpp"
13#include "duckdb/common/unordered_set.hpp"
14
15namespace duckdb {
16
17struct QualifiedColumnHashFunction {
18 uint64_t operator()(const QualifiedColumnName &a) const {
19 std::hash<std::string> str_hasher;
20 return str_hasher(a.schema) ^ str_hasher(a.table) ^ str_hasher(a.column);
21 }
22};
23
24struct QualifiedColumnEquality {
25 bool operator()(const QualifiedColumnName &a, const QualifiedColumnName &b) const {
26 return a.schema == b.schema && a.table == b.table && a.column == b.column;
27 }
28};
29
30using qualified_column_set_t = unordered_set<QualifiedColumnName, QualifiedColumnHashFunction, QualifiedColumnEquality>;
31
32} // namespace duckdb
33