You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by davies <gi...@git.apache.org> on 2015/11/10 08:02:19 UTC

[GitHub] spark pull request: [SPARK-11396] [SQL] add native implementation ...

Github user davies commented on a diff in the pull request:

    https://github.com/apache/spark/pull/9347#discussion_r44375337
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala ---
    @@ -299,7 +299,20 @@ case class DateFormatClass(left: Expression, right: Expression) extends BinaryEx
     }
     
     /**
    - * Converts time string with given pattern
    + * Converts time string with given pattern.
    + * Deterministic version of [[UnixTimestamp]], must have at least one parameter.
    + */
    +case class ToUnixTimestamp(timeExp: Expression, format: Expression) extends UnixTime {
    +  def this(time: Expression) = {
    +    this(time, Literal("yyyy-MM-dd HH:mm:ss"))
    +  }
    +
    +  override def left: Expression = timeExp
    --- End diff --
    
    How about move this into `UnixTime`?


---
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 infrastructure@apache.org or file a JIRA ticket
with INFRA.
---

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