Skip to content
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

Merged
merged 5 commits into from
Mar 12, 2015
Merged

Add fill to select statements. #1925

merged 5 commits into from
Mar 12, 2015

Conversation

pauldix
Copy link
Member

@pauldix pauldix commented Mar 12, 2015

Fixes #1913
Add fill(none), fill(<num>), and fill(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.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit: typo in comment.

@otoolep
Copy link
Contributor

otoolep commented Mar 12, 2015

LGTM, nitpick feedback.

pauldix added a commit that referenced this pull request Mar 12, 2015
Add fill to select statements.
@pauldix pauldix merged commit b4e1795 into master Mar 12, 2015
@pauldix pauldix deleted the fill-options branch March 12, 2015 02:32
@paaland
Copy link

paaland commented May 5, 2015

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
And the value 50 logged at 2015-01-02

The I perform the query:

select value from someSeries where time > '2015-01-01' group by time(24h) fill(previous)

It returns
2015-01-01 null
2015-01-02 50
2015-01-03 50
2015-01-04 50
and so on

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.

@beckettsean
Copy link
Contributor

@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?

mark-rushakoff pushed a commit that referenced this pull request Jan 11, 2019
…eck (#1925)

* Add ready checking into swagger and update the doc to match health checking

* make a few minor changes to the swagger doc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Wire up fill options
4 participants