You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@flink.apache.org by "Kurt Young (Jira)" <ji...@apache.org> on 2020/01/09 12:32:00 UTC

[jira] [Commented] (FLINK-15538) Separate decimal implementations into separate sub-classes

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

Kurt Young commented on FLINK-15538:
------------------------------------

Why it's more efficient? Won't it cause lots of virtual function calls?

> Separate decimal implementations into separate sub-classes
> ----------------------------------------------------------
>
>                 Key: FLINK-15538
>                 URL: https://issues.apache.org/jira/browse/FLINK-15538
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table SQL / Runtime
>            Reporter: Liya Fan
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 10m
>  Remaining Estimate: 0h
>
> The current implementation of Decimal values have two (somewhat independent) implementations: one is based on Long, while the other is based on BigDecimal. 
> This makes the Decmial class not clear (both implementations cluttered in a single class) and less efficient (each method involves a if-else branch). 
> So in this issue, we make Decimal an abstract class, and separate the two implementation into two sub-classes. This makes the code clearer and more efficient. 



--
This message was sent by Atlassian Jira
(v8.3.4#803005)