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

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

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

    https://github.com/apache/flink/pull/2304#discussion_r79572080
  
    --- Diff: 
flink-core/src/main/java/org/apache/flink/types/parser/BigDecParser.java ---
    @@ -55,9 +56,20 @@ public int parseField(byte[] bytes, int startPos, int 
limit, byte[] delimiter, B
                        return -1;
                }
     
    -           String str = new String(bytes, startPos, i - startPos);
                try {
    -                   this.result = new BigDecimal(str);
    +                   final int length = i - startPos;
    +                   if (reuse == null || reuse.length != length) {
    --- End diff --
    
    can we change this to `reuse.length < length` to only create a new array in 
case more space is needed?


> Add a parsers for BigDecimal/BigInteger
> ---------------------------------------
>
>                 Key: FLINK-4268
>                 URL: https://issues.apache.org/jira/browse/FLINK-4268
>             Project: Flink
>          Issue Type: Improvement
>          Components: Table API & SQL
>    Affects Versions: 1.2.0
>            Reporter: Timo Walther
>            Assignee: Timo Walther
>
> Since BigDecimal and BigInteger are basic types now. It would be great if we 
> also parse those.
> FLINK-628 did this a long time ago. This feature should be reintroduced.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to