[
https://issues.apache.org/jira/browse/ARROW-5264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16835266#comment-16835266
]
Liya Fan commented on ARROW-5264:
---------------------------------
@Jacques Nadeau, thanks for your suggestion. Your solution seems reasonable.
I guess the fundamental reason lies in our code structure: the code to
initialize Arrow and the code that actually use Arrow lie in different
components and have different owners. Maybe some significant refactoring will
solve the problem. However, for now, an environmental variable can be
convenient for us.
I have updated the JIRA description and submitted new commits in the PR. Please
help take a look when you are available.
> [Java] Allow enabling/disabling boundary checking by environmental variable
> ---------------------------------------------------------------------------
>
> Key: ARROW-5264
> URL: https://issues.apache.org/jira/browse/ARROW-5264
> Project: Apache Arrow
> Issue Type: Improvement
> Components: Java
> Reporter: Liya Fan
> Assignee: Liya Fan
> Priority: Minor
> Labels: pull-request-available
> Attachments: screenshot-1.png
>
> Time Spent: 1h
> Remaining Estimate: 0h
>
> The flag BoundsChecking#BOUNDS_CHECKING_ENABLED determines if boundary
> checking is enabled/disabled in vector/arrow buffer APIs.
> It has significant performance implications, since boundary checking is a
> frequent operation.
> This issue addresses 2 problems with the flag for boundary checking in Java
> API:
> 1. The flag can be determined by an environmental variable:
> ARROW_ENABLE_UNSAFE_MEMORY_ACCESS, in addition to the system properties. The
> system properties have higher priority than the environmental variable.
> 2. There is an old and a new system property for this flag. To disable
> boundary checking, both the old and new properties must be set to true, which
> is undesirable:
> !screenshot-1.png!
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)