vinodkc commented on code in PR #39747: URL: https://github.com/apache/spark/pull/39747#discussion_r1089504826
########## sql/core/src/test/resources/sql-tests/inputs/string-functions.sql: ########## @@ -231,3 +231,39 @@ CREATE TEMPORARY VIEW fmtTable(fmtField) AS SELECT * FROM VALUES ('invalidFormat SELECT to_binary('abc', fmtField) FROM fmtTable; -- Clean up DROP VIEW IF EXISTS fmtTable; +-- luhn_check +select luhn_check('4111111111111111'); +select luhn_check('5500000000000004'); +select luhn_check('340000000000009'); +select luhn_check('6011000000000004'); +select luhn_check('378282246310005'); +select luhn_check('6011000990139424'); +select luhn_check('1234567890'); +select luhn_check('4111111111111'); +select luhn_check('4111111111111112'); +select luhn_check('371449635398431'); +select luhn_check('371449635398432'); +select luhn_check('30569309025904'); +select luhn_check('30569309025905'); +select luhn_check('6011111111111117'); +select luhn_check('6011111111111118'); +select luhn_check('3530111333300000'); +select luhn_check('3530111333300001'); +select luhn_check('5105105105105100'); +select luhn_check('5105105105105106'); +select luhn_check('510B105105105106'); +select luhn_check('E105105105105106'); +select luhn_check('-5105105105105106'); +select luhn_check(5105105105105106); Review Comment: Done -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org