Skip to content

Commit

Permalink
apply patch to substrait for std::unordered_map
Browse files Browse the repository at this point in the history
  • Loading branch information
lnkuiper committed Sep 5, 2024
1 parent cac5a82 commit a603b0d
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 0 deletions.
1 change: 1 addition & 0 deletions .github/config/out_of_tree_extensions.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,7 @@ if (NOT WIN32)
LOAD_TESTS DONT_LINK
GIT_URL https://github.com/duckdb/substrait
GIT_TAG 55922a3e77756054abbe3e04dae17ccf4203ad6f
APPLY_PATCHES
)
endif()

Expand Down
26 changes: 26 additions & 0 deletions .github/patches/extensions/substrait/stl_allocator.patch
Original file line number Diff line number Diff line change
@@ -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<std::string, std::string> SubstraitToDuckDB::function_names_remap = {
+const unordered_map<std::string, std::string> 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<std::string, std::string> DuckDBToSubstrait::function_names_remap = {
+const unordered_map<std::string, std::string> DuckDBToSubstrait::function_names_remap = {
{"mod", "modulus"},
{"stddev", "std_dev"},
{"prefix", "starts_with"},

0 comments on commit a603b0d

Please sign in to comment.