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

Implement trigonometry functions #9424

Closed
jsternberg opened this issue Feb 9, 2018 · 2 comments
Closed

Implement trigonometry functions #9424

jsternberg opened this issue Feb 9, 2018 · 2 comments

Comments

@jsternberg
Copy link
Contributor

Feature Request

Proposal: Implement the trigonometry functions: sin(), cos(), tan().

Current behavior: They are not implemented.

Desired behavior: They would be implemented.

Use case: Using the trigonometry functions.

Earlier versions of the query engine had a problem with implementing trigonometry functions because these would be a new class of functions labeled transform functions. A transform function gets parsed as a call, but it is effectively another binary operator so query validation works differently. Since earlier versions of the query parser relied on assuming that a call was a selector or an aggregator, this was difficult or impossible.

In 1.4, I changed the query compilation so this assumption is no longer made... as frequently. I think there are a few places where this assumption is still made, but they should be reasonably easy to remove and then we can implement the query engine to handle these calls as part of the normal processing of a binary operator.

@epa095
Copy link

epa095 commented Feb 26, 2018

Hi, if you also implement atan2 you make it possible to take the average of circular quantities (e.g. average heading).

@jsternberg
Copy link
Contributor Author

Yea, we can do that. The primary difficulty is supporting the first. After that, they are all decently easy to implement.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants