1//===----------------------------------------------------------------------===//
2// DuckDB
3//
4// duckdb/parser/parsed_data/vacuum_info.hpp
5//
6//
7//===----------------------------------------------------------------------===//
8
9#pragma once
10
11#include "duckdb/parser/parsed_data/parse_info.hpp"
12#include "duckdb/parser/tableref.hpp"
13#include "duckdb/planner/tableref/bound_basetableref.hpp"
14#include "duckdb/common/unordered_map.hpp"
15#include "duckdb/common/optional_ptr.hpp"
16
17namespace duckdb {
18
19struct VacuumOptions {
20 VacuumOptions() : vacuum(false), analyze(false) {
21 }
22
23 bool vacuum;
24 bool analyze;
25};
26
27struct VacuumInfo : public ParseInfo {
28public:
29 explicit VacuumInfo(VacuumOptions options);
30
31 const VacuumOptions options;
32
33public:
34 bool has_table;
35 unique_ptr<TableRef> ref;
36 optional_ptr<TableCatalogEntry> table;
37 unordered_map<idx_t, idx_t> column_id_map;
38 vector<string> columns;
39
40public:
41 unique_ptr<VacuumInfo> Copy();
42
43 void Serialize(Serializer &serializer) const;
44 static unique_ptr<ParseInfo> Deserialize(Deserializer &deserializer);
45};
46
47} // namespace duckdb
48