Skip to content

Commit

Permalink
Conditional include and register
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Jan 3, 2025
1 parent 5e035bc commit 0386a1b
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions chsql/src/chsql_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,11 @@
// OpenSSL linked through vcpkg
#include <openssl/opensslv.h>
#include "parquet_ordered_scan.cpp"
#include "clickhouse_scan.hpp"

#if !defined(EMSCRIPTEN) && !defined(MINGW)
#include "clickhouse_scan.hpp"
#endif

namespace duckdb {

// To add a new scalar SQL macro, add a new macro to this array!
Expand Down Expand Up @@ -230,9 +233,12 @@ static void LoadInternal(DatabaseInstance &instance) {
ExtensionUtil::RegisterFunction(instance, ReadParquetOrderedFunction());
// Flock
ExtensionUtil::RegisterFunction(instance, DuckFlockTableFunction());
// Clickhouse Scan
RegisterClickHouseScanFunction(instance);

#if !defined(EMSCRIPTEN) && !defined(MINGW)
// Clickhouse Scan for supported platforms
RegisterClickHouseScanFunction(instance);
#endif

}

void ChsqlExtension::Load(DuckDB &db) {
Expand Down

0 comments on commit 0386a1b

Please sign in to comment.