Github user HyukjinKwon commented on a diff in the pull request:
https://github.com/apache/spark/pull/17901#discussion_r116160628
--- Diff: sql/core/src/main/scala/org/apache/spark/sql/functions.scala ---
@@ -2683,13 +2683,12 @@ object functions {
def unix_timestamp(s: Column, p: String): Column = withExpr {
UnixTimestamp(s.expr, Literal(p)) }
/**
- * Convert time string to a Unix timestamp (in seconds).
- * Uses the pattern "yyyy-MM-dd HH:mm:ss" and will return null on
failure.
+ * Convert time string to a Unix timestamp (in seconds) by casting rules
to `TimestampType`.
* @group datetime_funcs
* @since 2.2.0
*/
def to_timestamp(s: Column): Column = withExpr {
- new ParseToTimestamp(s.expr, Literal("yyyy-MM-dd HH:mm:ss"))
--- End diff --
@rxin and @cloud-fan, I would rather take out the change here if this holds
off this PR. This is essentially orthogonal with this PR.
---
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]