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

    https://github.com/apache/spark/pull/14788#discussion_r76511621
  
    --- Diff: 
sql/catalyst/src/main/scala/org/apache/spark/sql/catalyst/expressions/datetimeExpressions.scala
 ---
    @@ -583,20 +602,25 @@ case class FromUnixTime(sec: Expression, format: 
Expression)
     }
     
     /**
    - * Returns the last day of the month which the date belongs to.
    + * Returns the last day of the month which the date/timestamp belongs to.
      */
    +// scalastyle:off line.size.limit
     @ExpressionDescription(
    -  usage = "_FUNC_(date) - Returns the last day of the month which the date 
belongs to.",
    +  usage = "_FUNC_(instant) - Returns the last day of the month which the 
date/timestamp belongs to.",
       extended = "> SELECT _FUNC_('2009-01-12');\n '2009-01-31'")
    -case class LastDay(startDate: Expression) extends UnaryExpression with 
ImplicitCastInputTypes {
    -  override def child: Expression = startDate
    +// scalastyle:on line.size.limit
    +case class LastDay(instant: Expression) extends UnaryExpression with 
ImplicitCastInputTypes {
    --- End diff --
    
    I think this one is different from `DateAdd`/`DateSub`. According to the 
name, `LastDay` should always return DateType, can you check with other 
databases to see whether they support `LastDay` on timestamp?


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

Reply via email to