cloud-fan commented on code in PR #42801:
URL: https://github.com/apache/spark/pull/42801#discussion_r1315041850
##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -4311,11 +4320,20 @@ object functions {
* prints '+' for positive values but 'MI' prints a space.</li> <li>'PR':
Only allowed at the
* end of the format string; specifies that the result string will be
wrapped by angle
* brackets if the input value is negative.</li> </ul>
+ * If `e` is a datetime, `format` shall be a valid datetime pattern, see
+ * <a
href="https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html">Datetime
Patterns</a>.
+ * If `e` is a binary, it is converted to a string in one of the formats:
+ * <ul>
+ * <li>'base64': a base 64 string.</li>
+ * <li>'hex': a string in the hexadecimal format.</li>
+ * <li>'utf-8': the input binary is decoded to UTF-8 string.</li>
+ * </ul>
*
* @group string_funcs
* @since 3.5.0
*/
def to_varchar(e: Column, format: Column): Column = Column.fn("to_varchar",
e, format)
+ // scalastyle:on line.size.limit
Review Comment:
shall we put it before the `def to_varchar`? It's better to limit the code
block that skips style check
##########
sql/core/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -4446,10 +4454,18 @@ object functions {
* 'PR': Only allowed at the end of the format string; specifies that the
result string will be
* wrapped by angle brackets if the input value is negative.
*
+ * If `e` is a datetime, `format` shall be a valid datetime pattern, see
+ * <a
href="https://spark.apache.org/docs/latest/sql-ref-datetime-pattern.html">Datetime
Patterns</a>.
+ * If `e` is a binary, it is converted to a string in one of the formats:
+ * 'base64': a base 64 string.
+ * 'hex': a string in the hexadecimal format.
+ * 'utf-8': the input binary is decoded to UTF-8 string.
+ *
* @group string_funcs
* @since 3.5.0
*/
def to_varchar(e: Column, format: Column): Column =
call_function("to_varchar", e, format)
+ // scalastyle:on line.size.limit
Review Comment:
ditto
--
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]