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
spanner/spansql: generated columns #3618
Comments
a strange thing |
The problem is not with generated columns, but with the limited support for builtin functions. Note that generated columns remain a TODO for spannertest (see |
We use UPPER in our configuration already, now this gives an error to parse :-) It would be nice if this succeeds |
Sure, no problem. Easy enough to flesh out the list of string funcs at least. See #3625. |
thanks ! spansql works very good |
This doesn't implement them, but only declares them for accurate parsing. Fixes #3618.
I have test with NameLen INT64 AS (UPPER(Name)) STORED, -> this works perfect, thanks |
example this still gives error |
Ah, that's an array function rather than a string function, but I can add those too. |
As with a previous change, this doesn't implement these but permits correct parsing. Fixes #3618.
David thanks it works |
Client
spansql Version v1.13.0
Environment
windows
Go Environment
$ go version : go version go1.13 windows/amd64
$ go env
If you extract the following example
CREATE TABLE users (
Id STRING(20) NOT NULL,
FirstName STRING(50),
LastName STRING(50),
Age INT64 NOT NULL,
FullName STRING(100) AS (ARRAY_TO_STRING([FirstName, LastName], " ")) STORED,
) PRIMARY KEY (Id);
You got error : ParseDDL("CREATE TABLE users (\n\tId STRING(20) NOT NULL,\n\tFirstName STRING(50),\n\tLastName STRING(50),\n\tAge INT64 NOT NULL,\n\tFullName STRING(100) AS (ARRAY_TO_STRING([FirstName, LastName], " ")) STORED,\n) PRIMARY KEY (Id);"): filename:6: got "(" while expecting ")"
The text was updated successfully, but these errors were encountered: