[Wranglers] Lambda Function Syntax in DuckDB 1.3.0 Ossivalis

Ali, Saqib docbook.xml at gmail.com
Wed May 21 19:16:28 UTC 2025


DuckDB supported the Arrow Operator (->) for the Lambda Functions for List
operations like list_transform(). This was consistent with how it is
implemented in Snowflake.

Snowflake syntax:
SELECT TRANSFORM([1, 2, 3], x INT -> x + 1); -- output [2, 3, 4]

However with the release of 1.3.0 Ossivalis, DuckDB has changed the syntax
to
SELECT list_transform([1, 2, 3], lambda x: x + 1); -- note use of lambda
keyword instead of the Arrow Operator (->).

I wish DuckDB had kept the Lambda syntax consistent with Snowflake for SQL
portability. Thoughts?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://analyticsengineering.net/pipermail/wranglers/attachments/20250521/eb6e4d07/attachment.htm>


More information about the Wranglers mailing list