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

Add boolean and Timestamp to min max #4245

Merged
merged 4 commits into from
Jun 15, 2023

Conversation

griffio
Copy link
Contributor

@griffio griffio commented Jun 7, 2023

closes #4174

The error is caused as Boolean is not a specified return type in the dialect functions.

The min and max functions currently only return Numeric and Character types.

Extend this for Boolean and Timestamps as well

Sqlite and MySql don't have a native boolean type

Postgres has a boolean type and doesn't allow '1' or '0' to be treated as boolean

Note: As min and max are nullable return types, will be a custom result rather than a primitive

Todo - mysql
consider #4211
#4243

@griffio griffio force-pushed the add-types-to-aggregate-functions branch 2 times, most recently from a23ec0b to 15117e0 Compare June 7, 2023 18:18
@griffio griffio marked this pull request as ready for review June 9, 2023 12:26
@griffio griffio force-pushed the add-types-to-aggregate-functions branch 2 times, most recently from ab17587 to 348461a Compare June 9, 2023 17:37
@griffio griffio force-pushed the add-types-to-aggregate-functions branch from 348461a to 09b90c9 Compare June 10, 2023 18:14
@hfhbd
Copy link
Collaborator

hfhbd commented Jun 11, 2023

Note: As min and max are nullable return types, will be a custom result rather than a primitive

Yes, this is the current design, or do I miss something?

Copy link
Collaborator

@hfhbd hfhbd left a comment

Choose a reason for hiding this comment

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

Thank you.

@AlecKazakova AlecKazakova merged commit e6efe08 into cashapp:master Jun 15, 2023
5 checks passed
@griffio griffio deleted the add-types-to-aggregate-functions branch June 16, 2023 08:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Failed to compile aggregate functions on fields defined as custom primitives
3 participants