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

    https://github.com/apache/flink/pull/6188#discussion_r199349619
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/api/scala/expressionDsl.scala
 ---
    @@ -1029,6 +1029,29 @@ object temporalOverlaps {
         TemporalOverlaps(leftTimePoint, leftTemporal, rightTimePoint, 
rightTemporal)
       }
     }
    +/**
    +  * Adds a (signed) integer interval to a timestamp. The unit for the 
interval is given
    +  * by the unit argument, which should be one of the following values: 
"SECOND", "MINUTE",
    +  * "HOUR", "DAY", "WEEK", "MONTH", "QUARTER" or "YEAR".
    +  *
    +  * e.g. timestampAdd("WEEK", 1, '2003-01-02'.toDate) leads to 
"2003-01-09".
    +  */
    +object timestampAdd {
    +
    +  /**
    +    * Adds a (signed) integer interval to a timestamp. The unit for the 
interval is given
    +    * by the unit argument, which should be one of the following values: 
"SECOND", "MINUTE",
    +    * "HOUR", "DAY", "WEEK", "MONTH", "QUARTER" or "YEAR".
    +    *
    +    * e.g. timestampAdd("WEEK", 1, '2003-01-02'.toDate) leads to 
"2003-01-09".
    +  */
    +  def apply(
    +      unit: Expression,
    --- End diff --
    
    +1 for better consistency. It is good to follow the Table-api style.


---

Reply via email to