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

[Canvas] Comparison Canvas Functions have wonky comparison operators #35433

Closed
clintandrewhall opened this issue Apr 22, 2019 · 2 comments
Closed
Labels
chore Feature:Canvas loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas

Comments

@clintandrewhall
Copy link
Contributor

clintandrewhall commented Apr 22, 2019

Comparison Functions in Canvas, like compare, gt, etc, do some strange mathematical comparisons, considering either the context or the value is allowed to be null.

https://github.com/elastic/kibana/blob/master/x-pack/plugins/canvas/canvas_plugin_src/functions/common/compare.js#L48-L62

We're basically relying on JS to determine this, and Typescript doesn't allow for < or > tests of null, (and for good reason).

We need to fix this at some point. I'm logging this to track, as it may affect backwards compatibility and should be a separate PR.

@clintandrewhall clintandrewhall added Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas chore labels Apr 22, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-canvas

@clintandrewhall clintandrewhall changed the title [Canvas] compare Function has wonky comparison operators [Canvas] Comparison Canvas Functions have wonky comparison operators Apr 22, 2019
@cqliu1 cqliu1 added the loe:small Small Level of Effort label Apr 30, 2019
@cqliu1
Copy link
Contributor

cqliu1 commented Jul 12, 2019

Fixed in #37305.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Feature:Canvas loe:small Small Level of Effort Team:Presentation Presentation Team for Dashboard, Input Controls, and Canvas
Projects
None yet
Development

No branches or pull requests

4 participants