zeroshade commented on code in PR #1487:
URL: https://github.com/apache/arrow-go/pull/1487#discussion_r4515220217


##########
arrow/array/validate.go:
##########
@@ -93,7 +93,7 @@ func validateArray(arr arrow.Array, full bool, path string) 
error {
        if full && data.DataType().Layout().HasDict {
                dictData := data.dictionary
                if dictData != nil {
-                       dt := data.DataType().(*arrow.DictionaryType)
+                       dt := 
storageType(data.DataType()).(*arrow.DictionaryType)

Review Comment:
   nit (non-blocking): for an extension array, `validateArray` recurses into 
`ext.Storage()` below, which runs this check again. So `ValidateFull` on an 
extension over a dictionary scans the indices twice. Skipping the 
extension-level null-count and dictionary checks and letting the storage 
recursion handle them would avoid the repeated work. Not a correctness issue, 
fine to leave.



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