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 Presto Avg Aggregate for Interval #12048

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

natashasehgal
Copy link

Summary:
Aggregate function signature is not supported: presto.default.avg(INTERVAL DAY TO SECOND).

  • Add support for avg() for Interval Day to Second
  • Returns long based on Java implementation IntervalDayToSecondAverageAggregation.java
  • Note: Expected return type is long (the average is rounded to be a valid interval) not double. A Velox Runtime Error is thrown on cluster testing, if attempted to return double.

Differential Revision: D67879726

Summary:
Aggregate function signature is not supported: presto.default.avg(INTERVAL DAY TO SECOND).

- Add support for avg() for Interval Day to Second
- Returns long based on Java implementation [IntervalDayToSecondAverageAggregation.java](https://www.internalfb.com/code/fbsource/fbcode/github/presto-deprecated/presto-main/src/main/java/com/facebook/presto/operator/aggregation/IntervalDayToSecondAverageAggregation.java)
- Note: Expected return type is long (the average is rounded to be a valid interval) not double. A Velox Runtime Error is thrown on cluster testing, if attempted to return double.

Differential Revision: D67879726
@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Jan 9, 2025
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D67879726

Copy link

netlify bot commented Jan 9, 2025

Deploy Preview for meta-velox canceled.

Name Link
🔨 Latest commit ee8aee2
🔍 Latest deploy log https://app.netlify.com/sites/meta-velox/deploys/6780374f5524ec00081a4cf5

@natashasehgal natashasehgal changed the title T208838661 - Add Presto Avg Aggregate for Interval feat: T208838661 - Add Presto Avg Aggregate for Interval Jan 9, 2025
@natashasehgal natashasehgal changed the title feat: T208838661 - Add Presto Avg Aggregate for Interval feat: [velox][PR] Add Presto Avg Aggregate for Interval Jan 9, 2025
@natashasehgal natashasehgal changed the title feat: [velox][PR] Add Presto Avg Aggregate for Interval feat: Add Presto Avg Aggregate for Interval Jan 9, 2025
Copy link
Contributor

@zacw7 zacw7 left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks for adding the support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants