From ae3d2839bfe2b56ea510ce1b7433a34b02ea81b9 Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Sat, 1 Feb 2025 21:36:12 +0100 Subject: [PATCH] Add alter table test case as well Signed-off-by: Dirkjan Bussink --- go/vt/sqlparser/parse_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/go/vt/sqlparser/parse_test.go b/go/vt/sqlparser/parse_test.go index 5295d4503e9..6c4a6e634ec 100644 --- a/go/vt/sqlparser/parse_test.go +++ b/go/vt/sqlparser/parse_test.go @@ -1805,6 +1805,9 @@ var ( }, { input: "alter table a add spatial key indexes (column1)", output: "alter table a add spatial key `indexes` (column1)", + }, { + input: "alter table locations add lat_long point as (point(geocode->>'$.geometry.location.lat', geocode->>'$.geometry.location.lng')) SRID 4326 after geocodes", + output: "alter table locations add column lat_long point as (point(json_unquote(json_extract(geocode, '$.geometry.location.lat')), json_unquote(json_extract(geocode, '$.geometry.location.lng')))) virtual srid 4326 after geocodes", }, { input: "create table a", partialDDL: true,