From 37ee2d95220efc1aaf0280d0aa2c01ae4b9d4c1b Mon Sep 17 00:00:00 2001 From: dfinkel Date: Mon, 27 Sep 2021 21:56:38 -0400 Subject: [PATCH] feat(spanner/spansql): fill in missing hash functions (#4808) The `spansql` package is quite useful for parsing and managing schemas, however, with the addition of `CHECK` constraints to the spanner DDL, the full set of SQL functions can now appear in schemas. Fill in the missing Hash functions to support their use. List of hash functions pulled from: https://cloud.google.com/spanner/docs/hash_functions --- spanner/spansql/keywords.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/spanner/spansql/keywords.go b/spanner/spansql/keywords.go index 927d0ac7763..72f79cda933 100644 --- a/spanner/spansql/keywords.go +++ b/spanner/spansql/keywords.go @@ -152,7 +152,9 @@ var allFuncs = []string{ "ABS", // Hash functions. + "FARM_FINGERPRINT", "SHA1", + "SHA256", "SHA512", // String functions. "BYTE_LENGTH", "CHAR_LENGTH", "CHARACTER_LENGTH",