You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by "MaxGekk (via GitHub)" <gi...@apache.org> on 2023/09/05 11:11:37 UTC

[GitHub] [spark] MaxGekk commented on a diff in pull request #42801: [SPARK-45070][SQL][DOCS] Describe the binary and datetime formats of `to_char`/`to_varchar`

MaxGekk commented on code in PR #42801:
URL: https://github.com/apache/spark/pull/42801#discussion_r1315744531


##########
connector/connect/client/jvm/src/main/scala/org/apache/spark/sql/functions.scala:
##########
@@ -4284,12 +4285,22 @@ 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>

Review Comment:
   Thank you, @dongjoon-hyun 



-- 
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-unsubscribe@spark.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org