Skip to content

Commit 9ab2e81

Browse files
authoredNov 7, 2024
Fix arrayMap macro
1 parent 40f740f commit 9ab2e81

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎chsql/src/chsql_extension.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ static DefaultMacro chsql_macros[] = {
8888
{DEFAULT_SCHEMA, "match", {"string", "token"}, {{nullptr, nullptr}}, R"(string LIKE token)"},
8989
// -- Array macros
9090
{DEFAULT_SCHEMA, "arrayExists", {"needle", "haystack", nullptr}, {{nullptr, nullptr}}, R"(haystack @> ARRAY[needle])"},
91-
{DEFAULT_SCHEMA, "arrayMap", {"e", "arr", nullptr}, {{nullptr, nullptr}}, R"(array_transform(arr, e -> (e * e)))"},
91+
{DEFAULT_SCHEMA, "arrayMap", {"x", "arr", nullptr}, {{nullptr, nullptr}}, R"(array_transform(arr, x))"},
9292
// Date and Time Functions
9393
{DEFAULT_SCHEMA, "toYear", {"date_expression", nullptr}, {{nullptr, nullptr}}, R"(EXTRACT(YEAR FROM date_expression))"},
9494
{DEFAULT_SCHEMA, "toMonth", {"date_expression", nullptr}, {{nullptr, nullptr}}, R"(EXTRACT(MONTH FROM date_expression))"},

0 commit comments

Comments
 (0)
Failed to load comments.