You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "ASF GitHub Bot (JIRA)" <ji...@apache.org> on 2018/07/08 11:17:00 UTC

[jira] [Commented] (FLINK-6847) Add TIMESTAMPDIFF supported in TableAPI

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

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

GitHub user xueyumusic opened a pull request:

    https://github.com/apache/flink/pull/6282

    [FLINK-6847][FLINK-6813][Table Api & Sql] TimestampDiff table api and sql support

    
    ## What is the purpose of the change
    This PR propose to add TimestampDiff sql and table Api.
    Sql format is like `TIMESTAMP(DAY, DATE '2018-07-03', DATE '2018-07-04')`, was explained and based on https://github.com/apache/flink/pull/4117
    Table Api signature is like `timestampDiff(TimeIntervalUnit.DAY, '2018-07-03'.toDate, '2018-07-04'.toDate)`
    
    ## Brief change log
      - *modify `generateTemporalPlusMinus`  in `ScalarOperators.scala` to support sql code gen*
      - *add `timestampDiff` api in `time.scala`*
      - *add timestampDiff expr string parse in `ExpressionParser.scala`*
    
    ## Verifying this change
    This change added tests and can be verified as follows:
    
    *(example:)*
      - *add tests to verify sql and table api, in various types combine of unit(YEAR, MONTH...SECOND) and datetime(DATE or TIMESTAMP)*
      - *add validation tests *
    
    ## Does this pull request potentially affect one of the following parts:
    
      - Dependencies (does it add or upgrade a dependency): (no)
      - The public API, i.e., is any changed class annotated with `@Public(Evolving)`: (no)
      - The serializers: (no)
      - The runtime per-record code paths (performance sensitive): (no)
      - Anything that affects deployment or recovery: JobManager (and its components), Checkpointing, Yarn/Mesos, ZooKeeper: (no)
      - The S3 file system connector: (no)
    
    ## Documentation
    
      - Does this pull request introduce a new feature? (yes)
      - If yes, how is the feature documented? (docs / JavaDocs)


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/xueyumusic/flink timestampDiff

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/flink/pull/6282.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #6282
    
----
commit 462060f8854d19a355bcf4cc2fd54a2200f3e35b
Author: xueyu <27...@...>
Date:   2018-07-08T10:50:06Z

    timestampDiff table api and sql

----


> Add TIMESTAMPDIFF supported in TableAPI
> ---------------------------------------
>
>                 Key: FLINK-6847
>                 URL: https://issues.apache.org/jira/browse/FLINK-6847
>             Project: Flink
>          Issue Type: Sub-task
>          Components: Table API &amp; SQL
>    Affects Versions: 1.4.0
>            Reporter: sunjincheng
>            Priority: Major
>              Labels: pull-request-available, starter
>
> see FLINK-6813



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