From a603b0d64aaa098fc88ce03b7829c099e3d4aed2 Mon Sep 17 00:00:00 2001 From: Laurens Kuiper Date: Thu, 5 Sep 2024 12:55:59 +0200 Subject: [PATCH] apply patch to substrait for std::unordered_map --- .github/config/out_of_tree_extensions.cmake | 1 + .../extensions/substrait/stl_allocator.patch | 26 +++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 .github/patches/extensions/substrait/stl_allocator.patch diff --git a/.github/config/out_of_tree_extensions.cmake b/.github/config/out_of_tree_extensions.cmake index edd9ad14ffb4..7685e3353c61 100644 --- a/.github/config/out_of_tree_extensions.cmake +++ b/.github/config/out_of_tree_extensions.cmake @@ -132,6 +132,7 @@ if (NOT WIN32) LOAD_TESTS DONT_LINK GIT_URL https://github.com/duckdb/substrait GIT_TAG 55922a3e77756054abbe3e04dae17ccf4203ad6f + APPLY_PATCHES ) endif() diff --git a/.github/patches/extensions/substrait/stl_allocator.patch b/.github/patches/extensions/substrait/stl_allocator.patch new file mode 100644 index 000000000000..251d2452ff95 --- /dev/null +++ b/.github/patches/extensions/substrait/stl_allocator.patch @@ -0,0 +1,26 @@ +diff --git a/src/from_substrait.cpp b/src/from_substrait.cpp +index eeccd60..79ab3bc 100644 +--- a/src/from_substrait.cpp ++++ b/src/from_substrait.cpp +@@ -26,7 +26,7 @@ + #include "duckdb/main/client_data.hpp" + + namespace duckdb { +-const std::unordered_map SubstraitToDuckDB::function_names_remap = { ++const unordered_map SubstraitToDuckDB::function_names_remap = { + {"modulus", "mod"}, {"std_dev", "stddev"}, {"starts_with", "prefix"}, + {"ends_with", "suffix"}, {"substring", "substr"}, {"char_length", "length"}, + {"is_nan", "isnan"}, {"is_finite", "isfinite"}, {"is_infinite", "isinf"}, +diff --git a/src/to_substrait.cpp b/src/to_substrait.cpp +index 39044a2..3271038 100644 +--- a/src/to_substrait.cpp ++++ b/src/to_substrait.cpp +@@ -20,7 +20,7 @@ + #include "duckdb/execution/index/art/art_key.hpp" + + namespace duckdb { +-const std::unordered_map DuckDBToSubstrait::function_names_remap = { ++const unordered_map DuckDBToSubstrait::function_names_remap = { + {"mod", "modulus"}, + {"stddev", "std_dev"}, + {"prefix", "starts_with"},