From d23ac74a9fdc2f013b975e10af1183d6e2f337a9 Mon Sep 17 00:00:00 2001 From: Tishj Date: Fri, 20 Dec 2024 13:34:36 +0100 Subject: [PATCH] fix the json extension --- extension/json/json_scan.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/extension/json/json_scan.cpp b/extension/json/json_scan.cpp index a1dd4e0df84d..998c43e791e6 100644 --- a/extension/json/json_scan.cpp +++ b/extension/json/json_scan.cpp @@ -207,10 +207,12 @@ unique_ptr JSONGlobalTableFunctionState::Init(ClientCo } vector dummy_types(input.column_ids.size(), LogicalType::ANY); + auto local_columns = MultiFileReaderColumnDefinition::ColumnsFromNamesAndTypes(gstate.names, dummy_types); + auto global_columns = MultiFileReaderColumnDefinition::ColumnsFromNamesAndTypes(bind_data.names, dummy_types); for (auto &reader : gstate.json_readers) { MultiFileReader().FinalizeBind(reader->GetOptions().file_options, gstate.bind_data.reader_bind, - reader->GetFileName(), gstate.names, dummy_types, bind_data.names, - input.column_indexes, reader->reader_data, context, nullptr); + reader->GetFileName(), local_columns, global_columns, input.column_indexes, + reader->reader_data, context, nullptr); } return std::move(result);