github.com/cockroachdb/cockroachdb-parser@v0.23.3-0.20240213214944-911057d40c9a/patches/0003-use-function-name.patch (about)

     1  From 486ec4ba7b334a1e549fa90cb00efcacdb685983 Mon Sep 17 00:00:00 2001
     2  From: Oliver Tan <otan@cockroachlabs.com>
     3  Date: Mon, 15 May 2023 13:31:05 +1000
     4  Subject: [PATCH] use-function-name
     5  
     6  ---
     7   pkg/sql/sem/tree/function_name.go | 7 +++++--
     8   1 file changed, 5 insertions(+), 2 deletions(-)
     9  
    10  diff --git a/pkg/sql/sem/tree/function_name.go b/pkg/sql/sem/tree/function_name.go
    11  index 3b0ac48..5e29921 100644
    12  --- a/pkg/sql/sem/tree/function_name.go
    13  +++ b/pkg/sql/sem/tree/function_name.go
    14  @@ -19,7 +19,6 @@ import (
    15   	"github.com/cockroachdb/cockroachdb-parser/pkg/sql/pgwire/pgerror"
    16   	"github.com/cockroachdb/cockroachdb-parser/pkg/sql/sem/catconstants"
    17   	"github.com/cockroachdb/errors"
    18  -	"github.com/cockroachdb/redact"
    19   	"github.com/lib/pq/oid"
    20   )
    21   
    22  @@ -146,7 +145,11 @@ func (ref *ResolvableFunctionReference) Resolve(
    23   func WrapFunction(n string) ResolvableFunctionReference {
    24   	fd, ok := FunDefs[n]
    25   	if !ok {
    26  -		panic(errors.AssertionFailedf("function %s() not defined", redact.Safe(n)))
    27  +		return ResolvableFunctionReference{
    28  +			FunctionReference: &FunctionDefinition{
    29  +				Name: n,
    30  +			},
    31  +		}
    32   	}
    33   	return ResolvableFunctionReference{FunctionReference: fd}
    34   }
    35  -- 
    36  2.39.2 (Apple Git-143)
    37