bottom line: Is there a way to get Function data
for free while you are executing it?
I know it’s a greedy question. I have no expectations, just want to ask!
Adding data
to a UDF is one way to add a lot of flexibility/configurability to them. Using Call(Function('doStuff'))
incurs no Read Op, but calling Get(Function('doStuff'))
inside of the function body does.
If you query simply Function('doStuff')
, you get a Ref returned. That suggests to me that Call(Function('doStuff'))
is already performing a data lookup of some sort.
Does Call
grab the whole document in the background, or just the Function body
? If the Function’s data
can come along for the ride (or is already doing do), can we have access to it?
Maybe Call
works more like a hidden Index with body
as the value. Maybe it’s done like that specifically to avoid pulling tons of unexpected data if not necessary.
In any case, if the data
were to already be there, then perhaps something like a CurrentUDF
function could provide access to it. See related question I also just posted.