GitHub user sunjincheng121 opened a pull request:

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

    [FLINK-8323][table] fix MOD scalar function bug.

    *Thank you very much for contributing to Apache Flink - we are happy that 
you want to help us improve Flink. To help the community review your 
contribution in the best possible way, please go through the checklist below, 
which will get the contribution into a shape in which it can be best reviewed.*
    
    *Please understand that we do not do this to make contributions to Flink a 
hassle. In order to uphold a high standard of quality for code contributions, 
while at the same time managing a large number of contributions, we need 
contributors to prepare the contributions well, and give reviewers enough 
contextual information for the review. Please also understand that 
contributions that do not follow this guide will take longer to review and thus 
typically be picked up with lower priority by the community.*
    
    ## What is the purpose of the change
    
    *In this PR fixed MOD scalar function bug. e.g.  the result of 
MOD(1514356320000,60000) is `0`, not `-15488` *
    
    
    ## Brief change log
      - *Modify `generateArithmeticOperator` method, deducing the type of 
conversion for MOD*
    
    ## Verifying this change
    This change added tests and can be verified as follows:
      - *Added `testMod`, `testDivide`, `testMultiply`, `testSubtract`, 
`testAdd` test in `ScalarFunctionsTest` that validates 
`generateArithmeticOperator` work well.*
    
    
    ## 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? (no)


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

    $ git pull https://github.com/sunjincheng121/flink FLINK-8323-PR

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

    https://github.com/apache/flink/pull/5212.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 #5212
    
----
commit e667ff743960183df3cdf8d46e957104ca861f42
Author: 金竹 <jincheng.sunjc@...>
Date:   2017-12-28T14:45:08Z

    [FLINK-8323][table] fix MOD scalar function bug.

----


---

Reply via email to