We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Lambda expressions have not yet been supported.
Syntax
https://cloud.google.com/spanner/docs/reference/standard-sql/functions-reference#lambdas
(arg[, ...]) -> body_expression
arg -> body_expression
Examples
https://cloud.google.com/spanner/docs/reference/standard-sql/array_functions#array_filter
SELECT ARRAY_FILTER([1 ,2, 3], e -> e > 1) AS a1, ARRAY_FILTER([0, 2, 3], (e, i) -> e > i) AS a2; /*-------+-------* | a1 | a2 | +-------+-------+ | [2,3] | [2,3] | *-------+-------*/
https://cloud.google.com/spanner/docs/reference/standard-sql/array_functions#array_includes
SELECT ARRAY_INCLUDES([1, 2, 3], e -> e > 3) AS a1, ARRAY_INCLUDES([1, 2, 3], e -> e > 0) AS a2; /*-------+------* | a1 | a2 | +-------+------+ | false | true | *-------+------*/
https://cloud.google.com/spanner/docs/reference/standard-sql/array_functions#array_transform
SELECT ARRAY_TRANSFORM([1, 2, 3], e -> e + 1) AS a1, ARRAY_TRANSFORM([1, 2, 3], (e, i) -> e + i) AS a2; /*---------+---------* | a1 | a2 | +---------+---------+ | [2,3,4] | [1,3,5] | *---------+---------*/
Reference
https://cloud.google.com/spanner/docs/release-notes#March_21_2023
The following functions and expressions have been added to the GoogleSQL dialect: ARRAY_FILTER function ARRAY_TRANSFORM function Lambda expressions
The following functions and expressions have been added to the GoogleSQL dialect:
ARRAY_FILTER
ARRAY_TRANSFORM
FYI
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Lambda expressions have not yet been supported.
Syntax
https://cloud.google.com/spanner/docs/reference/standard-sql/functions-reference#lambdas
Examples
https://cloud.google.com/spanner/docs/reference/standard-sql/array_functions#array_filter
https://cloud.google.com/spanner/docs/reference/standard-sql/array_functions#array_includes
https://cloud.google.com/spanner/docs/reference/standard-sql/array_functions#array_transform
Reference
https://cloud.google.com/spanner/docs/release-notes#March_21_2023
FYI
The text was updated successfully, but these errors were encountered: