From 57a830d04363a118767f8c0fbe30f83be7d58e1a Mon Sep 17 00:00:00 2001 From: Dirkjan Bussink Date: Thu, 19 Oct 2023 18:09:48 +0200 Subject: [PATCH] evalengine: Use the right unknown type to initialize We need to start off here with the unknown type, not the null type which is the default for `0`. Signed-off-by: Dirkjan Bussink --- go/vt/vtgate/evalengine/translate.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/go/vt/vtgate/evalengine/translate.go b/go/vt/vtgate/evalengine/translate.go index 82d22083039..84d8a2c4f10 100644 --- a/go/vt/vtgate/evalengine/translate.go +++ b/go/vt/vtgate/evalengine/translate.go @@ -193,7 +193,7 @@ func (ast *astCompiler) translateBindVar(arg *sqlparser.Argument) (Expr, error) } func (ast *astCompiler) translateColOffset(col *sqlparser.Offset) (Expr, error) { - var typ Type + typ := UnknownType() if ast.cfg.ResolveType != nil { typ, _ = ast.cfg.ResolveType(col.Original) } @@ -216,7 +216,7 @@ func (ast *astCompiler) translateColName(colname *sqlparser.ColName) (Expr, erro if err != nil { return nil, err } - var typ Type + typ := UnknownType() if ast.cfg.ResolveType != nil { typ, _ = ast.cfg.ResolveType(colname) }