# When SQL Meets Lambda Expressions

DevFeed: [When SQL Meets Lambda Expressions](<https://devfeed.tech/articles/when-sql-meets-lambda-expressions-28971.md>)

Original publisher: [Read original article](<https://blog.jooq.org/when-sql-meets-lambda-expressions/>)

Author: lukaseder

Published: 2025-03-27T13:04:44Z

Content type: tutorial

Language: en

Sources: [jOOQ](<https://devfeed.tech/sources/jooq.md>)

Topics: [SQL](<https://devfeed.tech/topics/sql.md>), [Structured-data](<https://devfeed.tech/topics/structured-data.md>), [DuckDB](<https://devfeed.tech/topics/duckdb.md>), [clickhouse](<https://devfeed.tech/topics/clickhouse.md>), [databricks](<https://devfeed.tech/topics/databricks.md>), [PostgreSQL](<https://devfeed.tech/topics/postgresql.md>)

Tags: [apply](<https://devfeed.tech/tags/apply.md>), [array](<https://devfeed.tech/tags/array.md>), [array-types](<https://devfeed.tech/tags/array-types.md>), [arrays](<https://devfeed.tech/tags/arrays.md>), [clickhouse](<https://devfeed.tech/tags/clickhouse.md>), [concatenation](<https://devfeed.tech/tags/concatenation.md>), [databricks](<https://devfeed.tech/tags/databricks.md>), [duckdb](<https://devfeed.tech/tags/duckdb.md>), [filter](<https://devfeed.tech/tags/filter.md>), [function](<https://devfeed.tech/tags/function.md>), [java](<https://devfeed.tech/tags/java.md>), [jooq](<https://devfeed.tech/tags/jooq.md>), [kotlin](<https://devfeed.tech/tags/kotlin.md>), [lambda](<https://devfeed.tech/tags/lambda.md>), [postgresql](<https://devfeed.tech/tags/postgresql.md>), [scala](<https://devfeed.tech/tags/scala.md>), [snowflake](<https://devfeed.tech/tags/snowflake.md>), [sql](<https://devfeed.tech/tags/sql.md>), [trino](<https://devfeed.tech/tags/trino.md>)

## AI overview

This article explains how SQL ARRAY types and lambda expressions are supported across several modern SQL dialects. It shows how jOOQ maps Java, Kotlin, and Scala lambda expressions to SQL expressions, including filtering arrays, and describes emulation with subqueries for dialects without lambda syntax.

## Source excerpt

ARRAY types are a part of the ISO/IEC 9075 SQL standard. The standard specifies how to: But it is very unopinionated when it comes to function support. The ISO/IEC 9075-2:2023(E) 6.47 <array value expression> specifies concatenation of arrays, whereas the 6.48 <array value function> section lists a not extremely useful TRIM_ARRAY function, exclusively (using which ... Continue reading When SQL Meets Lambda Expressions ->