You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by cloud-fan <gi...@git.apache.org> on 2016/09/06 11:47:39 UTC

[GitHub] spark pull request #14788: [SPARK-17174][SQL] Add the support for TimestampT...

Github user cloud-fan commented on a diff in the pull request:

    https://github.com/apache/spark/pull/14788#discussion_r77619318
  
    --- Diff: sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala ---
    @@ -72,57 +72,76 @@ case class CurrentTimestamp() extends LeafExpression with CodegenFallback {
     }
     
     /**
    - * Adds a number of days to startdate.
    + * Adds a number of days to date/timestamp.
      */
     @ExpressionDescription(
    -  usage = "_FUNC_(start_date, num_days) - Returns the date that is num_days after start_date.",
    +  usage = "_FUNC_(instant, num_days) - Returns the date/timestamp that is num_days after instant.",
       extended = "> SELECT _FUNC_('2016-07-30', 1);\n '2016-07-31'")
    -case class DateAdd(startDate: Expression, days: Expression)
    +case class DateAdd(instant: Expression, days: Expression)
    --- End diff --
    
    I think `AddDays` is a better name, w.r.t. `AddMonths`, do you know why we name it `DateAdd`? to follow hive?


---
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