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

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

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

    https://github.com/apache/flink/pull/4668#discussion_r138875420
  
    --- Diff: 
flink-runtime/src/main/java/org/apache/flink/runtime/operators/util/BitSet.java 
---
    @@ -56,8 +56,7 @@ public void setMemorySegment(MemorySegment memorySegment, 
int offset) {
         * @param index - position
         */
        public void set(int index) {
    -           Preconditions.checkArgument(index < bitLength && index >= 0, 
    -                   String.format("Input Index[%d] is larger than BitSet 
available size[%d].", index, bitLength));
    +           Preconditions.checkArgument(index < bitLength && index >= 0);
    --- End diff --
    
    Can be changed to 
    
    ```
    Preconditions.checkArgument(index < bitLength && index >= 0, 
      "Input Index[%d] is larger than BitSet available size[%d].", index, 
bitLength);
    ``` 
    to perserve the error message.


> Remove string format in BitSet to improve the performance of 
> BuildSideOuterjoin
> -------------------------------------------------------------------------------
>
>                 Key: FLINK-7617
>                 URL: https://issues.apache.org/jira/browse/FLINK-7617
>             Project: Flink
>          Issue Type: Improvement
>          Components: Local Runtime
>            Reporter: Jingsong Lee
>
> When using BuildSideOuterjoin, will frequently call Bitset.set and get, there 
> will be
> Preconditions.checkArgument (index <bitLength && index> = 0,
> String.format ("Input Index [% d] is larger than BitSet available size [% 
> d].", Index, bitLength));
> Of the check, String.format will lead to a sharp decline performance.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to