Skip to content
This repository has been archived by the owner on Jan 28, 2021. It is now read-only.

sql/expression: implement year UDF #66

Merged
merged 1 commit into from
Feb 28, 2018

Conversation

erizocosmico
Copy link
Contributor

@erizocosmico erizocosmico commented Feb 28, 2018

Closes #43


// TransformUp implements the Expression interface.
func (y *Year) TransformUp(f func(sql.Expression) sql.Expression) sql.Expression {
return f(NewYear(f(y.Child)))
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is not needed call TransformUp on y.Child too?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

It is, good catch!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Fixed

@erizocosmico erizocosmico force-pushed the feature/year-func branch 2 times, most recently from 2924cda to 7a04fc1 Compare February 28, 2018 12:45
Signed-off-by: Miguel Molina <miguel@erizocosmi.co>
@erizocosmico erizocosmico merged commit 3baf8e1 into src-d:master Feb 28, 2018
@erizocosmico erizocosmico deleted the feature/year-func branch February 28, 2018 15:46
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants