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

feat: add aggregate count functions with decimal return type #670

Merged
merged 3 commits into from
Aug 1, 2024

Conversation

scgkiran
Copy link
Contributor

No description provided.

%YAML 1.2
---
aggregate_functions:
- name: "count"
Copy link
Contributor

Choose a reason for hiding this comment

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

overloading functions based only on return type causes problems, see e.g. #606 (comment)

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 have them in a different yaml file. can this still cause problems?

Copy link
Contributor

Choose a reason for hiding this comment

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

different files should be ok.

Copy link
Contributor

Choose a reason for hiding this comment

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

I believe it'll still break substrait-java, see substrait-io/substrait-java#275

Copy link
Contributor

@jacques-n jacques-n Jul 28, 2024

Choose a reason for hiding this comment

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

I think we should fix that in substrait-java then as opposed to holding back the specification. Extensions being independent is key to extensions being extensions 😊

Copy link
Member

Choose a reason for hiding this comment

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

It's possible for us to work around duplicates in substrait-java by excluding them from the default extensions for now. See substrait-io/substrait-java#275 (comment)

@@ -0,0 +1,41 @@
%YAML 1.2
---
aggregate_functions:
Copy link
Contributor

Choose a reason for hiding this comment

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

the name of this file is weird. in other cases type names in filenames are about input types and this one is about output types. I suggest we rename file to something that is more descriptive. Maybe also add a little text to the functions clarifying how they are different than classic count functions.

Copy link
Member

@vbarua vbarua left a comment

Choose a reason for hiding this comment

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

Overall these changes look reasonable to me. Just one suggestion about the name count_star.

extensions/functions_aggregate_decimal_output.yaml Outdated Show resolved Hide resolved
@scgkiran scgkiran requested a review from vbarua July 31, 2024 23:45
Copy link
Member

@vbarua vbarua 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 good to me.

Copy link
Contributor

@jacques-n jacques-n left a comment

Choose a reason for hiding this comment

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

lgtm

@jacques-n jacques-n merged commit 2aa516b into substrait-io:main Aug 1, 2024
13 checks passed
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.

4 participants