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

fix: do not allow implicit casting in UDAF function lookup #5145

Merged
merged 1 commit into from Apr 23, 2020

Conversation

agavra
Copy link
Contributor

@agavra agavra commented Apr 22, 2020

Description

fixes #5129

ensures that lookups for UDAFs in the UdfIndex do not support implicit casting. Previously, the UDF index would find a match but it would fail later on with a cryptic error message.

Testing done

Unit testing and end to end testing:

ksql> SELECT COLLECT_LIST(amount) FROM transactions GROUP BY rowkey EMIT CHANGES;
Function 'collect_list' does not accept parameters (DECIMAL(12, 2)).
Valid alternatives are:
collect_list(BOOLEAN val)
collect_list(DOUBLE val)
collect_list(INT val)
collect_list(BIGINT val)
collect_list(VARCHAR val)
For detailed information on a function run: DESCRIBE FUNCTION <Function-Name>;

Reviewer checklist

  • Ensure docs are updated if necessary. (eg. if a user visible feature is being added or changed).
  • Ensure relevant issues are linked (description should include text like "Fixes #")

@agavra agavra marked this pull request as ready for review April 22, 2020 22:26
@agavra agavra requested a review from a team as a code owner April 22, 2020 22:26
@agavra agavra changed the title fix: do not allow implicit casting in UDAF function lookup fix: do not allow implicit casting in UDAF function lookup (MINOR) Apr 22, 2020
Copy link
Member

@spena spena left a comment

Choose a reason for hiding this comment

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

lgtm

@agavra agavra changed the title fix: do not allow implicit casting in UDAF function lookup (MINOR) fix: do not allow implicit casting in UDAF function lookup Apr 23, 2020
@agavra agavra merged commit 6709010 into confluentinc:master Apr 23, 2020
@agavra agavra deleted the collect_decimal branch April 23, 2020 21:03
@MichaelDrogalis
Copy link
Contributor

Nice one :)

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.

UDAFs match implicit function signatures with implicit casts but are not supported
3 participants