googleapis / googleapis/google-cloud-go

spanner: spansql.ParseDLL error by parsing String functions DDL

Open
#11,685 0 comments 0 reactions 1 assignee Assigned to @rahul2393 View on GitHub
api: spanner triage me
Dominant language
Go
Stars
4.5k
Forks
1.6k
Avg merge
1d 13h
Merged PRs (30d)
109

Description

## Client

- go
- `cloud.google.com/go/spanner/spansql v1.76.1`

## Environment

## Code and Dependencies

```sql
CREATE TABLE `Posts` (
`Id` STRING(26) NOT NULL,
`Title` STRING(256) NOT NULL,
`TitleSoundex` STRING(MAX) AS (LOWER(SOUNDEX(Title))),
`TitleSoundex_Tokens` TOKENLIST AS (TOKEN(TitleSoundex)) HIDDEN
) PRIMARY KEY (`Id`)
```

Then parse: `spansql.ParseDDL("filename", test.sql)`

## Expected behavior

Works just like in https://console.cloud.google.com/

## Actual behavior

Error: `panic: 01-Posts.sql:4: got "(", want ")" or ","`

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.