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

ASF GitHub Bot commented on DRILL-6004:
---------------------------------------

Github user paul-rogers commented on a diff in the pull request:

    https://github.com/apache/drill/pull/1070#discussion_r158164933
  
    --- Diff: 
exec/java-exec/src/main/java/org/apache/drill/exec/expr/fn/impl/XXHash.java ---
    @@ -166,9 +164,7 @@ public static long hash64(double val, long seed){
       }
     
       public static long hash64(long start, long end, DrillBuf buffer, long 
seed){
    -    if (BoundsChecking.BOUNDS_CHECKING_ENABLED) {
    -      buffer.checkBytes((int)start, (int)end);
    -    }
    +    rangeCheck(buffer, (int)start, (int)end);
    --- End diff --
    
    Why are the arguments to `hash64` longs? The hash may be 64 bits, but Drill 
does not support vectors above 2 GB (31 bits) in length, so the `start` and 
`end` need only be `int`.


> Direct buffer bounds checking should be disabled by default
> -----------------------------------------------------------
>
>                 Key: DRILL-6004
>                 URL: https://issues.apache.org/jira/browse/DRILL-6004
>             Project: Apache Drill
>          Issue Type: Improvement
>            Reporter: Vlad Rozov
>            Assignee: Vlad Rozov
>            Priority: Minor
>
> Direct buffer bounds checking is enabled either when assertions are enabled 
> (see DRILL-6001) or when {{drill.enable_unsafe_memory_access}} property is 
> not set to true, so it is enabled in production as by default  
> {{drill.enable_unsafe_memory_access}} is not set.



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

Reply via email to