Github user gatorsmile commented on a diff in the pull request:
https://github.com/apache/spark/pull/17901#discussion_r115308385
--- Diff:
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
---
@@ -1212,22 +1209,27 @@ case class ParseToDate(left: Expression, format:
Option[Expression], child: Expr
/**
* Parses a column to a timestamp based on the supplied format.
*/
-// scalastyle:off line.size.limit
@ExpressionDescription(
- usage = "_FUNC_(timestamp, fmt) - Parses the `left` expression with the
`format` expression to a timestamp. Returns null with invalid input.",
+ usage = """
+ _FUNC_(timestamp[, fmt]) - Parses the `timestamp` expression with the
`format` expression to
+ a timestamp. Returns null with invalid input. Default `fmt` is
'yyyy-MM-dd HH:mm:ss'.
--- End diff --
Here, you are assuming the default format is ISO. There are at least four
common default formats, EUR, ISO, JIS and USA. Normally, the database has a
register to store the default format. We cannot simply assume ISO is favorite
for all the users.
---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at [email protected] or file a JIRA ticket
with INFRA.
---
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]