Skip to content

Support return type coercion in CREATE FUNCTION#14822

Merged
caithagoras merged 1 commit intoprestodb:masterfrom
gorthitk:master
Jul 15, 2020
Merged

Support return type coercion in CREATE FUNCTION#14822
caithagoras merged 1 commit intoprestodb:masterfrom
gorthitk:master

Conversation

@gorthitk
Copy link
Contributor

@gorthitk gorthitk commented Jul 10, 2020

Currently, within CREATE FUNCTION syntax, we currently restrict that the return type declared by the RETURNS clause must exactly match the expression type in the body. The change here will be relaxing that restrictions.

=== RELEASE NOTES ===

General Change
* Add support to create functions whose function body type is coercible to the declared return type.

@linux-foundation-easycla
Copy link

CLA Check

@caithagoras
Copy link
Contributor

caithagoras commented Jul 14, 2020

Please squash the 3 commits into 1. You can use interactive rebase to achieve that.
https://thoughtbot.com/blog/git-interactive-rebase-squash-amend-rewriting-history

Presto Review and Commit Guidelines explains this

Avoid several substantially similar commits achieving an aggregate goal. For example several instances of “Do XYZ to class ABC”. It’s fine to do this in a pull request for review purposes, but it creates an unreadable commit history on master.

@caithagoras
Copy link
Contributor

caithagoras commented Jul 14, 2020

Please update the release notes section:

=== RELEASE NOTES ===

General Change
* Add support to create functions whose function body type is coercible to the declared return type.

Please also update the PR description to remove the things about block build.

Copy link
Contributor

@caithagoras caithagoras left a comment

Choose a reason for hiding this comment

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

lgtm % nit

@caithagoras
Copy link
Contributor

Thanks for contributing! I'm merge once Travis test is passing.

@caithagoras caithagoras requested a review from rongrong July 14, 2020 22:04
@caithagoras caithagoras merged commit 3cf8069 into prestodb:master Jul 15, 2020
@caithagoras caithagoras mentioned this pull request Jul 28, 2020
13 tasks
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.

2 participants