Skip to content

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

Merged
jacques-n merged 3 commits intosubstrait-io:mainfrom
scgkiran:SD-7536
Aug 1, 2024
Merged

feat: add aggregate count functions with decimal return type#670
jacques-n merged 3 commits intosubstrait-io:mainfrom
scgkiran:SD-7536

Conversation

@scgkiran
Copy link
Copy Markdown
Contributor

No description provided.

%YAML 1.2
---
aggregate_functions:
- name: "count"
Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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.

Comment thread extensions/functions_aggregate_decimal_output.yaml Outdated
@scgkiran scgkiran requested a review from vbarua July 31, 2024 23:45
Copy link
Copy Markdown
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
Copy Markdown
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

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