MaxGekk commented on code in PR #48499:
URL: https://github.com/apache/spark/pull/48499#discussion_r1803825405
##########
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/mathExpressions.scala:
##########
@@ -418,6 +418,47 @@ case class Acosh(child: Expression)
override protected def withNewChildInternal(newChild: Expression): Acosh =
copy(child = newChild)
}
+/**
+ * Try to convert a num from one base to another
+ *
+ * @param numExpr the number to be converted
+ * @param fromBaseExpr from which base
+ * @param toBaseExpr to which base
+ */
+@ExpressionDescription(
+ usage = "_FUNC_(num, from_base, to_base) - Convert `num` from `from_base` to
`to_base`.",
+ examples = """
+ Examples:
+ > SELECT _FUNC_('100', 2, 10);
+ 4
+ > SELECT _FUNC_(-10, 16, -10);
+ -16
Review Comment:
I believe we should show at least one example of the `NULL` result.
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]