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

Large number handling in KQL #48835

Closed
Bargs opened this issue Oct 21, 2019 · 4 comments · Fixed by #93658
Closed

Large number handling in KQL #48835

Bargs opened this issue Oct 21, 2019 · 4 comments · Fixed by #93658
Assignees
Labels
bug Fixes for quality problems that affect the customer experience Feature:KQL KQL impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort

Comments

@Bargs
Copy link
Contributor

Bargs commented Oct 21, 2019

When a user tries to search for a number larger than Javascript can handle KQL will silently send the wrong query too Elasticsearch. This is worse than throwing an error since the user has no idea something is going wrong and they're getting incorrect results. If nothing else, we should display a helpful error that explains there is a problem and it can be worked around by surrounding the number in double quotes. Lucene doesn't have this issue because Kibana does not parse it and instead treats the whole query as a string. So we could also think about whether it's possible to handle this for the user automatically by treating large numbers as strings in KQL.

@Bargs Bargs added bug Fixes for quality problems that affect the customer experience Feature:KQL KQL labels Oct 21, 2019
@rayafratkina rayafratkina added the Team:Visualizations Visualization editors, elastic-charts and infrastructure label Oct 22, 2019
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app (Team:KibanaApp)

@timroes
Copy link
Contributor

timroes commented Oct 23, 2019

Do we have any logic on the value, why we parse it into a number on JS side? Otherwise I would agree with you, it might be better if we keep it as a string, and if there is no logic we do at the number at all, we could consider doing the same for all numbers not just > Number.MAX_SAFE_INTEGER?

@Bargs
Copy link
Contributor Author

Bargs commented Oct 23, 2019

At the moment I don't believe we have any logic on the number value, but I'd have to go through the exercise of changing it to be sure. And yeah, agreed that it would be simpler to treat all the numbers as strings if possible.

@timroes timroes added Team:AppArch and removed Team:Visualizations Visualization editors, elastic-charts and infrastructure labels Feb 20, 2020
@elasticmachine
Copy link
Contributor

Pinging @elastic/kibana-app-arch (Team:AppArch)

@lukasolson lukasolson added impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort labels Jun 23, 2020
@lukasolson lukasolson self-assigned this Mar 3, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Fixes for quality problems that affect the customer experience Feature:KQL KQL impact:medium Addressing this issue will have a medium level of impact on the quality/strength of our product. loe:small Small Level of Effort
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants