Skip to content

Commit

Permalink
Add optimizerextension
Browse files Browse the repository at this point in the history
  • Loading branch information
Dtenwolde committed Feb 26, 2024
1 parent 26cadf1 commit e4df300
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
12 changes: 12 additions & 0 deletions duckpgq/include/duckpgq_extension.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,18 @@ class DuckpgqExtension : public Extension {
std::string Name() override;
};

class DuckpgqOptimizerExtension : public OptimizerExtension {
public:
DuckpgqOptimizerExtension() {
optimize_function = DuckpgqOptimizeFunction;
}

static void DuckpgqOptimizeFunction(ClientContext &context, OptimizerExtensionInfo *info,
duckdb::unique_ptr<LogicalOperator> &plan) {

}
};

struct DuckPGQParserExtensionInfo : public ParserExtensionInfo {
public:
DuckPGQParserExtensionInfo() : ParserExtensionInfo(){};
Expand Down
1 change: 1 addition & 0 deletions duckpgq/src/duckpgq_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
#include "duckpgq/duckpgq_functions.hpp"

#include "duckdb/parser/parser_extension.hpp"
#include "duckdb/optimizer/optimizer_extension.hpp"
#include "duckdb/parser/parser.hpp"

#include "duckdb/parser/tableref/table_function_ref.hpp"
Expand Down

0 comments on commit e4df300

Please sign in to comment.