Jefffrey commented on code in PR #12292:
URL: https://github.com/apache/arrow-rs/pull/12292#discussion_r4627256869


##########
arrow-data/Cargo.toml:
##########
@@ -22,7 +22,7 @@ bench = false
 # force_validate runs full data validation for all arrays that are created
 # this is not enabled by default as it is too computationally expensive
 # but is run as part of our CI checks
-force_validate = []
+force_validate = ["arrow-buffer/force_validate"]

Review Comment:
   will we need to add it here too?
   
   
https://github.com/apache/arrow-rs/blob/9951b625879a19844ecd0b2dd352347a87ea26dd/arrow/Cargo.toml#L66-L69



##########
arrow-buffer/src/buffer/offset.rs:
##########
@@ -72,6 +72,9 @@ impl<O: ArrowNativeType> OffsetBuffer<O> {
     /// `buffer` must be a non-empty buffer containing monotonically increasing
     /// values greater than or equal to zero
     pub unsafe fn new_unchecked(buffer: ScalarBuffer<O>) -> Self {
+        if cfg!(feature = "force_validate") {

Review Comment:
   are there other unchecked functions in arrow-buffer thatll need this fix, 
since we're introducing this feature?



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to