Skip to content
New issue

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 are not supported #201

Open
will-arxed opened this issue Dec 18, 2024 · 0 comments
Open

Lambda expressions are not supported #201

will-arxed opened this issue Dec 18, 2024 · 0 comments

Comments

@will-arxed
Copy link

will-arxed commented Dec 18, 2024

Against a Spanner emulator, the following command:

gcloud spanner databases create testdatabase --instance=testinstance --ddl="CREATE TABLE TestTable (
        ID INT64,
        Numbers ARRAY<INT64> NOT NULL,
        CONSTRAINT TestTableNumbersNotNullCheck CHECK (
                NOT ARRAY_INCLUDES (
                        Numbers,
                        number -> number IS NULL
                )
        ),
) PRIMARY KEY (ID);"

returns the following error:

ERROR: (gcloud.spanner.databases.create) HTTPError 400: {"code":3, "message":"Error parsing expression 'NOT ARRAY_INCLUDES (\n\t\t\tNumbers,\n\t\t\tnumber -> number IS NULL\n\t\t)' from check constraint 'TestTableNumbersNotNullCheck' in table 'TestTable': Lambda is not supported [at 3:25]\n                        number -> number IS NULL\n                        ^"}

Against a Spanner instance, the same command succeeds.

Is support planned for lambda expressions in the Spanner emulator? Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant