Skip to content

Conversation

limotova
Copy link
Contributor

@limotova limotova commented Oct 9, 2024

Adds a hypotenuse function

Adds a hypotenuse function
Copy link
Contributor

github-actions bot commented Oct 9, 2024

Documentation preview:

Copy link
Member

@dnhatn dnhatn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes look great. Thank you, Larisa! I'd like someone from the ES|QL team to take another look.

@dnhatn dnhatn added the auto-backport Automatically create backport pull requests when merged label Oct 9, 2024
@dnhatn dnhatn marked this pull request as ready for review October 9, 2024 23:50
@elasticsearchmachine elasticsearchmachine added the Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) label Oct 9, 2024
@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/es-analytical-engine (Team:Analytics)

@elasticsearchmachine
Copy link
Collaborator

Pinging @elastic/kibana-esql (ES|QL-ui)

@elasticsearchmachine
Copy link
Collaborator

Hi @limotova, I've created a changelog YAML for you.

Copy link
Contributor

@ivancea ivancea left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

3.0 | 4.0 | 5.0
// end::hypot-result[]
;

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would add some extra cases:

  • Having null in one and both parameters
  • Another one using FROM instead of ROW, as they work differently (ROW may get folded as it's all constants, for example)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I added some tests..! I wasn't able to find any sample data with numbers specifically that would make more sense to calculate the hypotenuse of, so I hope it's alright that some of them are a little nonsensical

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

employees also has some numeric data types - integer, double, long etc., if you are looking for data types besides unsigned long. They are usable, although a little nonsensical too.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

++. It doesn't really matter if they make sense IMO, as long as they come from an index. For interesting values, there's already the function tests

@limotova limotova requested a review from ivancea October 11, 2024 01:34
Copy link
Member

@fang-xing-esql fang-xing-esql left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Thank you!

@limotova limotova merged commit 2155f1b into elastic:main Oct 11, 2024
16 checks passed
@limotova limotova deleted the add-hypot-function branch October 11, 2024 19:34
@elasticsearchmachine
Copy link
Collaborator

💚 Backport successful

Status Branch Result
8.x

limotova added a commit to limotova/elasticsearch that referenced this pull request Oct 11, 2024
elasticsearchmachine pushed a commit that referenced this pull request Oct 11, 2024
davidkyle pushed a commit to davidkyle/elasticsearch that referenced this pull request Oct 13, 2024
georgewallace pushed a commit to georgewallace/elasticsearch that referenced this pull request Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

:Analytics/ES|QL AKA ESQL auto-backport Automatically create backport pull requests when merged >enhancement ES|QL-ui Impacts ES|QL UI Team:Analytics Meta label for analytical engine team (ESQL/Aggs/Geo) v8.16.0 v9.0.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants