dongjoon-hyun commented on code in PR #39747: URL: https://github.com/apache/spark/pull/39747#discussion_r1087436365
########## sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/stringExpressions.scala: ########## @@ -3039,3 +3039,113 @@ case class SplitPart ( partNum = newChildren.apply(2)) } } + +/** + * Function to check if a given number string is a valid Luhn number. + * Returns true, if the number string is a valid Luhn number, false otherwise + */ +@ExpressionDescription( + usage = """ + _FUNC_(str ) - Checks that a string of digits is valid according to the Luhn algorithm. + This checksum function is widely applied on credit card numbers and government identification + numbers to distinguish valid numbers from mistyped, incorrect numbers. + """, + examples = """ + Examples: + > SELECT _FUNC_('8112189876'); + true + > SELECT _FUNC_('79927398713'); + true + > SELECT _FUNC_('79927398714'); + false + """, + since = "3.4.0", Review Comment: Apache Spark entered a feature freeze by creating `branch-3.4`. This should be `3.5.0`. -- 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