From 5dedc86da88c35ab219e2e1ba2c54299160484af Mon Sep 17 00:00:00 2001 From: Yannick Welsch Date: Sun, 1 Sep 2024 07:18:06 +0200 Subject: [PATCH] Bump DuckDB to 1.1.0 snapshot --- duckdb | 2 +- src/prql_extension.cpp | 9 +++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/duckdb b/duckdb index 1f98600..08d1b8a 160000 --- a/duckdb +++ b/duckdb @@ -1 +1 @@ -Subproject commit 1f98600c2cf8722a6d2f2d805bb4af5e701319fc +Subproject commit 08d1b8aa03d410b5d935475c81dad675977686b4 diff --git a/src/prql_extension.cpp b/src/prql_extension.cpp index 6f41f6e..ce5548e 100644 --- a/src/prql_extension.cpp +++ b/src/prql_extension.cpp @@ -125,7 +125,8 @@ prql_plan(ParserExtensionInfo *, ClientContext &context, // here. This allows the planning to be picked up by prql_bind instead, but // we're not losing important context. auto prql_state = make_shared_ptr(std::move(parse_data)); - context.registered_state["prql"] = prql_state; + context.registered_state->Remove("prql"); + context.registered_state->Insert("prql", prql_state); throw BinderException("Use prql_bind instead"); } @@ -135,9 +136,9 @@ BoundStatement prql_bind(ClientContext &context, Binder &binder, case StatementType::EXTENSION_STATEMENT: { auto &extension_statement = dynamic_cast(statement); if (extension_statement.extension.parse_function == prql_parse) { - auto lookup = context.registered_state.find("prql"); - if (lookup != context.registered_state.end()) { - auto prql_state = (PrqlState *)lookup->second.get(); + auto lookup = context.registered_state->Get("prql"); + if (lookup) { + auto prql_state = (PrqlState *)lookup.get(); auto prql_binder = Binder::CreateBinder(context, &binder); auto prql_parse_data = dynamic_cast(prql_state->parse_data.get());