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

Add LuhnCheck function #4011

Merged
merged 1 commit into from
Jul 27, 2020
Merged

Add LuhnCheck function #4011

merged 1 commit into from
Jul 27, 2020

Conversation

urbanfletch
Copy link
Contributor

Add builtin in credit card validation function - LuhnCheckFunction

@cla-bot
Copy link

cla-bot bot commented Jun 12, 2020

Thank you for your pull request and welcome to our community. We require contributors to sign our Contributor License Agreement, and we don't seem to have you on file. In order for us to review and merge your code, please submit the signed CLA to [email protected]. For more information, see https://github.com/prestosql/cla.

@cla-bot cla-bot bot added the cla-signed label Jun 17, 2020
@urbanfletch urbanfletch force-pushed the bl/luhncheck branch 2 times, most recently from b0e14dd to b3dc066 Compare June 17, 2020 19:19
@findepi findepi removed their request for review June 19, 2020 08:32
@findepi
Copy link
Member

findepi commented Jun 19, 2020

@electrum are we ready to remove syntax-needs-review?

Copy link
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

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

Please add documentation for this in presto-docs/src/main/sphinx/functions/string.rst

(String Functions doesn't seem like the right place to document this, but I can't find a better spot)

@urbanfletch
Copy link
Contributor Author

Please add documentation for this in presto-docs/src/main/sphinx/functions/string.rst

(String Functions doesn't seem like the right place to document this, but I can't find a better spot)

We may ultimately want a validation functions library. There are a whole host of them you could write. But not worth it for just this one.

Copy link
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

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

@martint thoughts on the name?

@martint
Copy link
Member

martint commented Jul 9, 2020

I think luhn_check is fine. That's the name this algorithm is known by. Maybe luhn_validation, but either one works.

Copy link
Member

@electrum electrum left a comment

Choose a reason for hiding this comment

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

Looks good. Please rebase and I'll merge this.

@electrum
Copy link
Member

Can you update the commit message to something like

Add luhn_check function

Easy way is to run git commit --amend then force push.

@electrum electrum merged commit 913d42f into trinodb:master Jul 27, 2020
@electrum
Copy link
Member

Thanks!

@electrum electrum deleted the bl/luhncheck branch July 27, 2020 23:12
@electrum electrum mentioned this pull request Aug 7, 2020
8 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants