Skip to content

Commit

Permalink
Fix arrayMap macro
Browse files Browse the repository at this point in the history
  • Loading branch information
lmangani authored Nov 7, 2024
1 parent 40f740f commit 9ab2e81
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion chsql/src/chsql_extension.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ static DefaultMacro chsql_macros[] = {
{DEFAULT_SCHEMA, "match", {"string", "token"}, {{nullptr, nullptr}}, R"(string LIKE token)"},
// -- Array macros
{DEFAULT_SCHEMA, "arrayExists", {"needle", "haystack", nullptr}, {{nullptr, nullptr}}, R"(haystack @> ARRAY[needle])"},
{DEFAULT_SCHEMA, "arrayMap", {"e", "arr", nullptr}, {{nullptr, nullptr}}, R"(array_transform(arr, e -> (e * e)))"},
{DEFAULT_SCHEMA, "arrayMap", {"x", "arr", nullptr}, {{nullptr, nullptr}}, R"(array_transform(arr, x))"},
// Date and Time Functions
{DEFAULT_SCHEMA, "toYear", {"date_expression", nullptr}, {{nullptr, nullptr}}, R"(EXTRACT(YEAR FROM date_expression))"},
{DEFAULT_SCHEMA, "toMonth", {"date_expression", nullptr}, {{nullptr, nullptr}}, R"(EXTRACT(MONTH FROM date_expression))"},
Expand Down

0 comments on commit 9ab2e81

Please sign in to comment.