You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Jark Wu (JIRA)" <ji...@apache.org> on 2019/01/11 07:21:00 UTC

[jira] [Commented] (FLINK-11296) Support truncate in TableAPI

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

Jark Wu commented on FLINK-11296:
---------------------------------

Hi [~x1q1j1], thanks for your work. I just notice that we already have ROUND(NUMERIC, INT) in Flink. What's the difference between ROUND and TRUNCATE ?

> Support truncate in TableAPI
> ----------------------------
>
>                 Key: FLINK-11296
>                 URL: https://issues.apache.org/jira/browse/FLINK-11296
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API &amp; SQL
>    Affects Versions: 1.7.1
>            Reporter: xuqianjin
>            Assignee: xuqianjin
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> Add {{truncate}} support in TableAPI, Add support as follows:
> ||expression||Expect the result||
> |truncate(cast(42.345 as decimal(2, 3)), 2)|42.34|
> |truncate(42, -1)|40|
> |truncate(42.324)|42|



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