From 3ecf899276071c7ce569ef67aff0919e01bbfd2b Mon Sep 17 00:00:00 2001 From: James Cor Date: Mon, 24 Feb 2025 10:44:15 -0800 Subject: [PATCH 1/2] overload colname for stored proc constants --- go/vt/sqlparser/ast.go | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/go/vt/sqlparser/ast.go b/go/vt/sqlparser/ast.go index a8dbd2bac06..41a1617734e 100644 --- a/go/vt/sqlparser/ast.go +++ b/go/vt/sqlparser/ast.go @@ -6070,11 +6070,7 @@ func (node BoolVal) replace(from, to Expr) bool { // ColName represents a column name. type ColName struct { - // Metadata is not populated by the parser. - // It's a placeholder for analyzers to store - // additional data, typically info about which - // table or column this node references. - Metadata interface{} + Metadata *SQLVal // Hacky solution for stored procedures Name ColIdent Qualifier TableName } From a36df89b80842b2bfb2065f71afd7b7c23830ff4 Mon Sep 17 00:00:00 2001 From: James Cor Date: Thu, 13 Mar 2025 11:25:51 -0700 Subject: [PATCH 2/2] using Expr instead --- go/vt/sqlparser/ast.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/go/vt/sqlparser/ast.go b/go/vt/sqlparser/ast.go index 957c77778a1..bc353f6336f 100644 --- a/go/vt/sqlparser/ast.go +++ b/go/vt/sqlparser/ast.go @@ -6073,9 +6073,11 @@ func (node BoolVal) replace(from, to Expr) bool { // ColName represents a column name. type ColName struct { - Metadata *SQLVal // Hacky solution for stored procedures Name ColIdent Qualifier TableName + + // Hacky solution for stored procedures + StoredProcVal Expr } // NewColName returns a simple ColName with no table qualifier