HyukjinKwon commented on a change in pull request #27438: [MINOR][SQL][DOCS][2.4] Fix the descriptions of `to_timestamp` and `ParseToTimestamp` URL: https://github.com/apache/spark/pull/27438#discussion_r373954840
########## File path: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ########## @@ -2949,10 +2949,10 @@ object functions { def unix_timestamp(s: Column, p: String): Column = withExpr { UnixTimestamp(s.expr, Literal(p)) } /** - * Converts to a timestamp by casting rules to `TimestampType`. + * Converts to a timestamp by casting rules to `TimestampType` in the seconds precision. * * @param s A date, timestamp or string. If a string, the data must be in a format that can be - * cast to a timestamp, such as `yyyy-MM-dd` or `yyyy-MM-dd HH:mm:ss.SSSS` + * cast to a timestamp, such as `yyyy-MM-dd` or `yyyy-MM-dd HH:mm:ss` Review comment: @MaxGekk, sorry if I missed some contexts but do you mind the ones below don't work? Seems working find in Spark 2.4.4: ``` ... Welcome to ____ __ / __/__ ___ _____/ /__ _\ \/ _ \/ _ `/ __/ '_/ /___/ .__/\_,_/_/ /_/\_\ version 2.4.4 /_/ ... scala> sql("select to_timestamp('2011-01-01 12:12:12.4321')").show(false) +----------------------------------------+ |to_timestamp('2011-01-01 12:12:12.4321')| +----------------------------------------+ |2011-01-01 12:12:12.4321 | +----------------------------------------+ scala> sql("select to_timestamp('2011-01-01 12:12:12.4321')").printSchema() root |-- to_timestamp('2011-01-01 12:12:12.4321'): timestamp (nullable = true) ``` ---------------------------------------------------------------- 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. For queries about this service, please contact Infrastructure at: us...@infra.apache.org With regards, Apache Git Services --------------------------------------------------------------------- To unsubscribe, e-mail: reviews-unsubscr...@spark.apache.org For additional commands, e-mail: reviews-h...@spark.apache.org