[ 
https://issues.apache.org/jira/browse/FLINK-6846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16521828#comment-16521828
 ] 

ASF GitHub Bot commented on FLINK-6846:
---------------------------------------

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

    https://github.com/apache/flink/pull/6188#discussion_r197674277
  
    --- Diff: 
flink-libraries/flink-table/src/main/scala/org/apache/flink/table/expressions/time.scala
 ---
    @@ -349,6 +349,17 @@ case class TimestampAdd(
         if (!TypeCheckUtils.isString(unit.resultType)) {
           return ValidationFailure(s"TimestampAdd operator requires unit to be 
of type " +
             s"String Literal, but get ${unit.resultType}.")
    +    } else {
    +      val unitStr = unit.toString()
    +      if (!sqlTsiArray.contains(unitStr) &&
    +        !sqlTsiArray.map(item => item.split("_").last).contains(unitStr)) {
    +          return ValidationFailure(s"TimestampAdd operator requires unit 
to be one of (YEAR, " +
    --- End diff --
    
    fix this, add ")", thank you!


> Add TIMESTAMPADD supported in TableAPI
> --------------------------------------
>
>                 Key: FLINK-6846
>                 URL: https://issues.apache.org/jira/browse/FLINK-6846
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API & SQL
>    Affects Versions: 1.4.0
>            Reporter: sunjincheng
>            Assignee: sunjincheng
>            Priority: Major
>              Labels: pull-request-available, starter
>
> See FLINK-6811 for detail.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to