-
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
Implement basic trigonometry functions #9499
Conversation
cefa3cb
to
db3fc6e
Compare
I'm likely going to refactor this to make use of #9511 instead of doing custom iterators. I think it will use less code and offer greater flexibility so we can shortly follow this with The idea is that all of these functions will be implemented in this project (the |
d66eb15
to
5ae10be
Compare
This adds support for math functions into the query language. Math functions are special because they are transformations and do not access the filesystem in the same way aggregate functions do. A transformation takes one point and always outputs one point making it more similar to binary expressions so these math functions follow the same rules as binary expressions. This also supports using math literals (so you can do `sin(1)`) and the math functions can be used anywhere such as in a field or an expression. Both of the following are supported: SELECT sin(value) FROM cpu SELECT value FROM cpu WHERE sin(value) > 0.5 Arguments are in radians. Degrees is not supported.
5ae10be
to
6e627cf
Compare
This has been refactored to make use of the math refactor in #9511. It's much simpler now and it will be easy to implement the other value transform iterators without advanced iterator nesting logic. |
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.
LGTM 💯
This adds support for math functions into the query language. Math
functions are special because they are transformations and do not access
the filesystem in the same way aggregate functions do. A transformation
takes one point and always outputs one point making it more similar to
binary expressions so these math functions follow the same rules as
binary expressions.
This also supports using math literals (so you can do
sin(1)
) and themath functions can be used anywhere such as in a field or an expression.
Both of the following are supported:
Arguments are in radians. Degrees is not supported.
Fixes #9424.