You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "quinnj (via GitHub)" <gi...@apache.org> on 2023/06/08 13:35:08 UTC

[GitHub] [arrow-julia] quinnj commented on a diff in pull request #456: implement default for SubArray

quinnj commented on code in PR #456:
URL: https://github.com/apache/arrow-julia/pull/456#discussion_r1223052904


##########
src/ArrowTypes/src/ArrowTypes.jl:
##########
@@ -348,6 +348,8 @@ function default(::Type{A}) where {A <: AbstractVector{T}} where {T}
     return a
 end
 
+default(::Type{SubArray{T,N,P,I,L}}) where {T,N,P,I,L} = default(P)

Review Comment:
   ```suggestion
   default(::Type{SubArray{T,N,P,I,L}}) where {T,N,P,I,L} = view(default(P), 0:-1)
   ```
   The issue here is `default(P)` returns a `Vector`, but we want a SubArray, so my suggestion seems to solve it for me locally



-- 
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: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org