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

Builtin: Add a new built-in functin MAKEDATE #3105

Merged
merged 4 commits into from
Apr 24, 2017
Merged

Builtin: Add a new built-in functin MAKEDATE #3105

merged 4 commits into from
Apr 24, 2017

Conversation

dawxy
Copy link
Contributor

@dawxy dawxy commented Apr 21, 2017

Add a new built-in functin MAKEDATE
#236

@hanfei1991 hanfei1991 added the contribution This PR is from a community contributor. label Apr 21, 2017
Copy link
Member

@hanfei1991 hanfei1991 left a comment

Choose a reason for hiding this comment

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

LGTM

@hanfei1991 hanfei1991 added the status/LGT1 Indicates that a PR has LGTM 1. label Apr 21, 2017
@ngaut
Copy link
Member

ngaut commented Apr 22, 2017

@zhexuany @bobotu Please feel free to review more PRs.

if args[0].IsNull() || args[1].IsNull() {
return d, nil
}
year := args[0].GetInt64()
Copy link
Member

Choose a reason for hiding this comment

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

Use args[0].ToInt64(). MySQL also accept other type of input:
mysql> select makedate("71", 1);
+-------------------+
| makedate("71", 1) |
+-------------------+
| 1971-01-01 |
+-------------------+
1 row in set (0.00 sec)

return d, nil
}
year := args[0].GetInt64()
dayOfYear := args[1].GetInt64()
Copy link
Member

Choose a reason for hiding this comment

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

So as here.

@dawxy
Copy link
Contributor Author

dawxy commented Apr 23, 2017

@shenli Well, has been repaired, thank you

@shenli
Copy link
Member

shenli commented Apr 23, 2017

LGTM
@dawxy Thanks for your PR!

@shenli shenli merged commit 8c51d4b into pingcap:master Apr 24, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contribution This PR is from a community contributor. status/LGT1 Indicates that a PR has LGTM 1.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants