Skip to content

Refactor ApproximateMostFrequent function to use type annotations#21751

Merged
tdcmeehan merged 1 commit intoprestodb:masterfrom
ZacBlanco:upstream-revert-fn-approx-freq
Jan 30, 2024
Merged

Refactor ApproximateMostFrequent function to use type annotations#21751
tdcmeehan merged 1 commit intoprestodb:masterfrom
ZacBlanco:upstream-revert-fn-approx-freq

Conversation

@ZacBlanco
Copy link
Contributor

@ZacBlanco ZacBlanco commented Jan 22, 2024

This was originally authored in 8ac5ef7 but was reverted due to a regression in behavior with null values. The fix was to remove the @NullablePosition annotation on the input argument.

Description

This fixes the original PR and adds a test case from #21712

Motivation and Context

See #21712

Impact

N/A

Test Plan

New test to cover null case

Contributor checklist

  • Please make sure your submission complies with our development, formatting, commit message, and attribution guidelines.
  • PR description addresses the issue accurately and concisely. If the change is non-trivial, a GitHub Issue is referenced.
  • Documented new properties (with its default value), SQL syntax, functions, or other functionality.
  • If release notes are required, they follow the release notes guidelines.
  • Adequate tests were added if applicable.
  • CI passed.

Release Notes

== NO RELEASE NOTE ==

@ZacBlanco ZacBlanco requested a review from a team as a code owner January 22, 2024 18:42
This was originally authored in 8ac5ef7
but was reverted due to a regression in behavior with null values

Co-authored-by: Nilay Pochhi <npochhi@rippling.com>
@ZacBlanco ZacBlanco force-pushed the upstream-revert-fn-approx-freq branch from d4d3ace to 6ecc3f1 Compare January 22, 2024 19:12
@ZacBlanco
Copy link
Contributor Author

@tdcmeehan do we need another reviewer or can this be merged?

@tdcmeehan tdcmeehan merged commit 2e0d73c into prestodb:master Jan 30, 2024
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.

Use @TypeParameter to simplify approx_most_frequent aggregation function

3 participants