influxdata/flux

Nullable types but missing null value

FStefanni opened this issue · 2 comments

Hi,

I am missing a simple point: how to return null from a custom function?
I am missing a null value/constant.
In the documentation I see "Null types" (https://docs.influxdata.com/flux/v0.x/spec/types/), "Nullable constraint" (same page), but if in the flux code I try to write null, I get an error ("undefined identifier null").

So how can I return/generate a null value?

I need this since in my case, not having a value at specific time (i.e. "null") is different from having a value (0 is a valid value)

Thank you,
regards

@FStefanni You can use debug.null() to return a null value: https://docs.influxdata.com/flux/v0.x/data-types/basic/null/

Hi,

thank you, I missed it.

Regards