-
Notifications
You must be signed in to change notification settings - Fork 3.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add fill to select statements. #1925
Conversation
Fixes #1913 Add fill(none), fill(<num>), and fill(previous) options
NullFill FillOption = iota | ||
// NoFill means that empty aggregate windows will be purged from the result. | ||
NoFill | ||
// NumberFill means that empty aggregate windwos will be filled with the given number |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: typo in comment.
LGTM, nitpick feedback. |
Add fill to select statements.
fill(previous) works only on the current time span (the where statement). I expected it to use the previously logged value at or before the current time span. Say I have the value 100 logged at 2014-12-31 The I perform the query: select value from someSeries where time > '2015-01-01' group by time(24h) fill(previous) It returns I would expect it to return 100 as the value for 2015-01-01 when specifying fill(previous) even though the value 100 was logged outside of the time scope. In other historian db's you have the notion of "include bounds" which will include the last value before as well as the first value after your specified time range. These can be used to fill in manually. |
@paaland that's a valuable insight and a reasonable feature request. Can you raise it as a new issue on GitHub rather than a comment on this merged pull request? |
…eck (#1925) * Add ready checking into swagger and update the doc to match health checking * make a few minor changes to the swagger doc
Fixes #1913
Add
fill(none)
,fill(<num>)
, andfill(previous)
options for replacing null values in aggregates. The none option will remove any rows from values if there is a null value anywhere in there.