This section contains some ideas for troubleshooting common problems experienced with hyperfunctions.
When you have a query that uses a last observation carried forward (locf)
function, the query carries forward NULL values by default. If you want the
function to ignore NULL values instead, you can set treat_null_as_missing=TRUE
as the second parameter in the query. For example:
dev=# select * FROM (select time_bucket_gapfill(4, time,-5,13), locf(avg(v)::int,treat_null_as_missing:=true) FROM (VALUES (0,0),(8,NULL)) v(time, v) WHERE time BETWEEN 0 AND 10 GROUP BY 1) i ORDER BY 1 DESC;time_bucket_gapfill | locf---------------------+------12 | 08 | 04 | 00 | 0-4 |-8 |(6 rows)
Keywords
Found an issue on this page?Report an issue or Edit this page in GitHub.