|
1 | 1 | #include "duckdb/catalog/catalog_entry/table_function_catalog_entry.hpp" |
2 | 2 | #include "duckdb/common/multi_file/multi_file_reader.hpp" |
| 3 | +#if DUCKDB_MINOR_VERSION == 3 |
3 | 4 | #include "duckdb/main/extension_util.hpp" |
| 5 | +#else |
| 6 | +#include "duckdb/main/extension_helper.hpp" |
| 7 | +#endif |
4 | 8 | #include "duckdb/parser/tableref/table_function_ref.hpp" |
5 | 9 | #include "parquet_reader.hpp" |
6 | 10 | #include "storage/mooncake_table.hpp" |
@@ -106,7 +110,11 @@ struct MooncakeMultiFileReader : public MultiFileReader { |
106 | 110 | return make_uniq<MooncakeMultiFileReader>(table_function.function_info->Cast<MooncakeFunctionInfo>().table); |
107 | 111 | } |
108 | 112 |
|
| 113 | +#if DUCKDB_MINOR_VERSION == 3 |
109 | 114 | shared_ptr<MultiFileList> CreateFileList(ClientContext &, const vector<string> &, FileGlobOptions) override { |
| 115 | +#else |
| 116 | + shared_ptr<MultiFileList> CreateFileList(ClientContext &, const vector<string> &, const FileGlobInput &) override { |
| 117 | +#endif |
110 | 118 | return make_shared_ptr<MooncakeMultiFileList>(table); |
111 | 119 | } |
112 | 120 |
|
@@ -135,7 +143,13 @@ struct MooncakeMultiFileReader : public MultiFileReader { |
135 | 143 | }; |
136 | 144 |
|
137 | 145 | static TableFunction &GetParquetScan(ClientContext &context) { |
| 146 | +#if DUCKDB_MINOR_VERSION == 3 |
138 | 147 | return ExtensionUtil::GetTableFunction(*context.db, "parquet_scan").functions.GetFunctionReferenceByOffset(0); |
| 148 | +#else |
| 149 | + ExtensionHelper::AutoLoadExtension(*context.db, "parquet"); |
| 150 | + ExtensionLoader loader(*context.db, "mooncake"); |
| 151 | + return loader.GetTableFunction("parquet_scan").functions.GetFunctionReferenceByOffset(0); |
| 152 | +#endif |
139 | 153 | } |
140 | 154 |
|
141 | 155 | static unique_ptr<GlobalTableFunctionState> MooncakeScanInitGlobal(ClientContext &context, |
|
0 commit comments