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

PHOENIX-4315 function Greatest/Least #456

Closed
wants to merge 1 commit into from

Conversation

yanxinyi
Copy link
Contributor

@yanxinyi yanxinyi commented Mar 7, 2019

Currently, COALESCE supports only 2 arguments.
For instance, the GREATEST(expr1, expr2) is supported but GREATEST(expr1, expr2, expr3, ...) is not.
Only implemented GREATEST for now, but if the list of arguments uses cases are needed from the open source community, We can do the optimization later.
If everyone is ok with this approach, I will create another patch for Least feature.
:)

Copy link
Contributor

@dbwong dbwong left a comment

Choose a reason for hiding this comment

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

Why are we limiting/testing the types for Greatest or is this JIRA specifically for that subset of types?
See other implementations: https://www.postgresql.org/docs/8.1/functions-conditional.html https://www.techonthenet.com/oracle/functions/greatest.php which handle multiple data types outside of the ones allowed.

There are some concerns for handling data types that are more precise than a java double (Standard SQL decimal type). As well as non-double based comparisons.

Second outside of end to end tests which use the mini cluster likley we can also make a smaller unit test for GreatestFunction

@yanxinyi yanxinyi closed this Apr 19, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants