kevingurney opened a new issue, #38361:
URL: https://github.com/apache/arrow/issues/38361

   ### Describe the enhancement requested
   
   Currently,`arrow.array.ListArray.fromArrays` does not validate the supplied 
`offsets` and `values` to ensure that they represent a valid list. This can 
result in `ListArray`s that look like the following:
   
   ```matlab
   >> offsets = arrow.array(int32([0, 2, 3, 7, 100]))               
   
   offsets = 
   
   [
     0,
     2,
     3,
     7,
     100
   ]
   
   >> values = arrow.array(["A", "B", "C", "D", "E", "F", "G"])     
   
   values = 
   
   [
     "A",
     "B",
     "C",
     "D",
     "E",
     "F",
     "G"
   ]
   
   >> arrowArray = arrow.array.ListArray.fromArrays(offsets, values)
   
   arrowArray = 
   
   <Invalid array: Length spanned by list offsets (100) larger than values 
array (length 7)>
   ```
   
   We should add support for validating `offsets` and `values` to 
`arrow.array.ListArray.fromArrays` and potentially provide a name-value pair 
like `ValidateList = true | false` to the `fromArrays` method to let client 
code control whether or not they want to pay the cost of validation.
   
   ### Component(s)
   
   MATLAB


-- 
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