-
Notifications
You must be signed in to change notification settings - Fork 3.5k
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 request] DOT aggregate functionality or arithmetic inside of aggregates #5095
Comments
Do you mean
|
Yes that is correct, although I admit I don't really follow your example in R. I'm looking for something similar to In [1]: import numpy
In [2]: a = 1, 2, 3, 4, 5
In [3]: b = 2, 4, 6, 8, 10
In [4]: dot = numpy.dot(a, b)
In [5]: dot
Out[5]: 110 |
@amancevice both |
@mjdesa Apologies I must not be explaining myself. Say I have a query that looks like this: SELECT DOT(valueA, valueB) AS dot FROM my_measurement GROUP BY time(1d) I would expect InfluxDB to select So, if one of the groups in my series looked like this:
I would expect the aggregate row to look like this:
Does that make sense? Perhaps there is already a way to get this result but I thought including a |
@amancevice ah I see what you're saying. Would the following query work? SELECT sum(valueA * valueB) AS dot FROM my_measurement GROUP BY time(1d) |
I get the following error trying
|
Ah thats a problem. Looks like we don't support arithmetic in aggregate functions. |
Great, thanks for opening the feature request! |
Any idea when this might make it into a release? The ability to do arithmetic in queries -- specifically I'm thinking of continuous queries -- is something of a deal-breaker for using InfluxDB in production. |
@amancevice at the moment we're rewriting our query engine which will serve as the foundation for building out this sort of functionality. Once the query engine has been rewritten, we'd gladly accept a PR for the functionality you're looking for. |
Sounds good |
As mentioned in my post to the mailing list we are experimenting with simplifying our open GitHub Issues. This feature request has been rolled into an aggregate issue for all function requests, so that we can close this issue until we are ready to work on it. You may continue to make comments here. Closing the issue does not mean we are rejecting this idea. |
It would be nice if InfluxDB offered a dot-product functionality, specifically for continuous queries. Something like:
The text was updated successfully, but these errors were encountered: