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?


---
If your project is set up for it, you can reply to this email and have your
reply appear on GitHub as well. If your project does not have this feature
enabled and wishes so, or if the feature is enabled but not working, please
contact infrastructure at infrastruct...@apache.org or file a JIRA ticket
with INFRA.
---

Reply via email to