MCPcopy Create free account
hub / github.com/dolthub/doltgresql / memoizeFn

Method memoizeFn

postgres/parser/sem/tree/expr.go:1203–1211  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1201func (*BinaryExpr) operatorExpr() {}
1202
1203func (node *BinaryExpr) memoizeFn() {
1204 leftRet, rightRet := node.Left.(TypedExpr).ResolvedType(), node.Right.(TypedExpr).ResolvedType()
1205 fn, ok := BinOps[node.Operator].lookupImpl(leftRet, rightRet)
1206 if !ok {
1207 panic(errors.AssertionFailedf("lookup for BinaryExpr %s's BinOp failed",
1208 AsStringWithFlags(node, FmtShowTypes)))
1209 }
1210 node.Fn = fn
1211}
1212
1213// Format implements the NodeFormatter interface.
1214func (node *BinaryExpr) Format(ctx *FmtCtx) {

Callers 1

NewTypedBinaryExprFunction · 0.95

Calls 3

AsStringWithFlagsFunction · 0.85
lookupImplMethod · 0.80
ResolvedTypeMethod · 0.65

Tested by

no test coverage detected