MCPcopy Create free account
hub / github.com/brimdata/super / compileUDFCall

Method compileUDFCall

compiler/rungen/expr.go:272–286  ·  view source on GitHub ↗
(tag string, f *dag.FuncDef)

Source from the content-addressed store, hash-verified

270}
271
272func (b *Builder) compileUDFCall(tag string, f *dag.FuncDef) (expr.Function, error) {
273 if fn, ok := b.compiledUDFs[tag]; ok { //XXX this doesn't work for stateful things
274 return fn, nil
275 }
276 fn := expr.NewUDF(b.sctx(), b.funcs[tag].Name, f.Params)
277 // We store compiled UDF calls here so as to avoid stack overflows on
278 // recursive calls.
279 b.compiledUDFs[tag] = fn
280 var err error
281 if fn.Body, err = b.compileExpr(f.Expr); err != nil {
282 return nil, err
283 }
284 delete(b.compiledUDFs, tag)
285 return fn, nil
286}
287
288func (b *Builder) compileMapCall(a *dag.MapCallExpr) (expr.Evaluator, error) {
289 e, err := b.compileExpr(a.Expr)

Callers 1

compileCallMethod · 0.95

Implementers 15

DynamicBuildervector/builder.go
recordBuildervector/builder.go
arraySetBuildervector/builder.go
mapBuildervector/builder.go
unionBuildervector/builder.go
fusionBuildervector/builder.go
enumBuildervector/builder.go
intBuildervector/builder.go
uintBuildervector/builder.go
floatBuildervector/builder.go
boolBuildervector/builder.go
bytesStringTypeBuildervector/builder.go

Calls 3

sctxMethod · 0.95
compileExprMethod · 0.95
NewUDFFunction · 0.92

Tested by

no test coverage detected