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

[[feature collection]] requested Functions and query operators #5930

Open
beckettsean opened this issue Mar 7, 2016 · 99 comments

Comments

Projects
None yet
@beckettsean
Copy link
Contributor

commented Mar 7, 2016

This issue contains a list of related feature requests that are not on the near-term roadmap. The feature requests in this issue are all new functions that have been requested. If you want to request a function not already listed please make a comment on this issue, and we will add it to the checklist.

Aggregations

  • moving averages function: #77
  • histogram #3674
  • cumulative counts #813
  • HDR histogram #739
  • histogram with log-scaled buckets #984
  • time weighted aggregations #7445
  • logarithmic mean #2482
  • integrals #1400
  • cumulative distribution function: #7261

Selectors

  • faster, slightly less accurate percentages calculation #513
  • lag variables #142
  • lead variables #143
  • upper bound, lower bound #659
  • average "gauges" with awareness of time spent in state #1115
  • mode #1823

Transformations

  • trigonometric functions (sine, cosine, etc.) #659
  • hyperloglog #717
  • dot-product #5095

Operators

  • difference #1825
  • elapsed time between events #1856
  • exponents and logarithms #659
  • ceiling and floor functions #3691
  • trend operators: linear and least square #5358
  • DIFFERENCE of two fields #761

InfluxQL enhancements

  • general support for nested functions #834
    • percentile + derivative #5150
    • percentage of values above/below given value (inverse PERCENTILE)
    • Top accepts nested functions #2467, #5345
  • CAST into different data types #2911
  • fill(previous) without GROUP BY #3633
  • User defined functions #6891
  • Boolean type cast #7562
@tbowmo

This comment has been minimized.

Copy link

commented Mar 20, 2016

Is there any timeline for these functions? (I'm very interested in the aggregate integral functions, to calculate kWh from watts). Seems that a feature request was opened a year ago.

@rkuchan rkuchan referenced this issue Mar 21, 2016

Merged

0.11 WIP #328

@beckettsean

This comment has been minimized.

Copy link
Contributor Author

commented Mar 23, 2016

There is no timeline for each specific function/feature. All work on new functions was on hold while the query engine was refactored, and that refactoring was merged into InfluxDB 0.11. We plan to introduce a few functions with each release from now on.

@timgriffiths

This comment has been minimized.

Copy link

commented Mar 28, 2016

Would also be great to get #3633 Added to your list this feature would be very useful on the client side when graphing data.

@Brausmith

This comment has been minimized.

Copy link

commented Jan 2, 2018

+1 for Histogram, the only other feature I need at the moment.

@galindro

This comment has been minimized.

Copy link

commented Jan 4, 2018

+1 for #6723

@jkschneider

This comment has been minimized.

Copy link

commented Jan 22, 2018

+1 for Histogram.

@voiprodrigo

This comment has been minimized.

Copy link

commented Mar 20, 2018

+1 for Timeshift!

@sampower06

This comment has been minimized.

Copy link

commented Mar 23, 2018

+1 for TimeShift!

@Ahmah2009 Ahmah2009 referenced this issue Mar 26, 2018

Merged

Implement floor, ceil, and round functions #9632

2 of 3 tasks complete
@yuanhuanglin

This comment has been minimized.

Copy link

commented Apr 10, 2018

+1 wish point to histogram()

@arturom

This comment has been minimized.

Copy link

commented Apr 24, 2018

I'd like to request for a new summary function specifically made for time series visualization: Largest-Triangle-Three-Buckets.

I've been using mean to downsample data, but averaging time series data results in a smooth line which does not accurately represents the underlying data.

Sveinn Steinarsson wrote a thesis titled "Downsampling Time Series for
Visual Representation" that describes and tests algorithms for that purpose. The d3fc library makes use of "Largest-Triangle-Three-Buckets" in the front end, but it would be best if InfluxDB could downsample the data to transmit and process as few bytes as possible.

@tecmatia-dp

This comment has been minimized.

Copy link

commented May 3, 2018

We are new to InfluxDB, but we are betting on using it, because it is robust and efficient. Congratulations and thank you for that.
However, there are some incomprehensible lacks for a TSDB, such as the time-weighted average, return of the previous value at the initial time of the query... In short, improve the support for data recorded by variation.
So +1 for #3633 and #7445.

@tecmatia-dp

This comment has been minimized.

Copy link

commented May 3, 2018

Boolean type cast #7562 seems easy to solve, and very important for use with Grafana for example, which does not support well the use of boolean.

@nikodc

This comment has been minimized.

Copy link

commented Jun 19, 2018

+1 wish point to histogram()

@makefu

This comment has been minimized.

Copy link

commented Jun 23, 2018

+1 for time shift

@sidgod

This comment has been minimized.

Copy link

commented Jun 25, 2018

+1 for histogram()

@charlottetucker

This comment has been minimized.

Copy link

commented Jun 26, 2018

+1 for CAST function. Seriously, why isn't this a thing?

@AnnapoorniS

This comment has been minimized.

Copy link

commented Jul 4, 2018

Is user defined function feature available in influx db? It will of great help if somebody could help me with sample in influxdb, which are similar to stored procedures. Any suggestions? Thanks in advance.

@timhallinflux

This comment has been minimized.

Copy link
Contributor

commented Jul 11, 2018

@henriklb

This comment has been minimized.

Copy link

commented Jul 23, 2018

Assuming that because #834 is checked it is seen as completed.

These functions does still not work (v.1.5.1) and would very be useful for me:
sum(non_negative_derivative(value))
sum(derivative(value))

Thanks

@balakrishnabk

This comment has been minimized.

Copy link

commented Aug 2, 2018

aggregation with respect to weekday and weeknumber based on the timestamp

@matthenning

This comment has been minimized.

Copy link

commented Aug 15, 2018

Does #3552 fit in here?

@MzazM

This comment has been minimized.

Copy link

commented Oct 10, 2018

+1 for histogram #3674

@mrungue

This comment has been minimized.

Copy link

commented Nov 14, 2018

I'd like to request for a new summary function specifically made for time series visualization: Largest-Triangle-Three-Buckets.

I've been using mean to downsample data, but averaging time series data results in a smooth line which does not accurately represents the underlying data.

Sveinn Steinarsson wrote a thesis titled "Downsampling Time Series for
Visual Representation" that describes and tests algorithms for that purpose. The d3fc library makes use of "Largest-Triangle-Three-Buckets" in the front end, but it would be best if InfluxDB could downsample the data to transmit and process as few bytes as possible.

+1

@n1nj4888

This comment has been minimized.

Copy link

commented Nov 30, 2018

👍 +1 for timeshift functions - Seems like this has been requested multiple times by a number of users

@sfitts

This comment has been minimized.

Copy link

commented Nov 30, 2018

The checklist implies that both "percentile + derivative" (#5150) and "Top accepts nested functions" (#2467, #5345) are addressed. However, the documentation says that neither percentile nor top supports nested functions (as of 1.7). So... is the checklist wrong? Can you do these without nested function support? Is the doc wrong?

@timhallinflux

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2018

Hey @sfitts! (from the Forte days?!?) ... I believe you can do these now with subqueries. So, while it's not a direct nesting, it can be done that way. The primary focus going forward in terms of extending the query surface area is going to be done via Flux. https://docs.influxdata.com/flux/v0.7/

InfluxQL will, of course, continue to be supported. But there are challenges that we are going to address at the query engine layer and then open up the ability to address so many of these requests via Flux. Have a look, let us know!

@sfitts

This comment has been minimized.

Copy link

commented Nov 30, 2018

@timhallinflux just after I wrote this it dawned on me that subqueries were probably the answer -- thanks for the confirmation. Also hadn't picked up on the fact that a query language replacement was in the works, so I'll definitely check that out.

(and yep -- I date back to Forte 👍)

@timhallinflux

This comment has been minimized.

Copy link
Contributor

commented Nov 30, 2018

Good to reconnect! I want to be super clear.... we are not going to "replace" InfluxQL. As we continue forward, InfluxQL will continue to be the primary on-ramp and supported. But, in terms of working with time series data -- we determined that a functional language can be a powerful way to manipulate the functions, results, and simplify developer code (in the end). So many of these requests were part of our design center for Flux itself and ensuring that we can deliver on them. We have been listening, observing, and attempting to address many of these for multiple years now. We started and failed at least twice...a couple of attempts that never saw the light of day and weren't "ship worthy".

With Flux, we are on the brink of breaking through and delivering on this list (and more!) while continuing to support InfluxQL. i.e. Histogram...already in. So, we maintain the easy on-ramp via InfluxQ. If that is all you need...great! But, if you need more power...and there are a number of time series use cases which certainly do -- particularly given this list, Flux will be there. In 1.7 InfluxDB, there are two query engines that run in parallel. In 2.0, the Flux engine will be the primary engine and InfluxQL will run in a compatibility mode on top of that engine. Hope that helps clarify!

@sfitts

This comment has been minimized.

Copy link

commented Nov 30, 2018

Makes sense (and thanks for the clarification).

@dgnorton dgnorton added the 1.x label Jan 7, 2019

@tecmatia-dp

This comment has been minimized.

Copy link

commented Apr 27, 2019

3 years and Boolean cast to Integer (1/0) is not yet implemented...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.