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

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

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


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

Review Comment:
   A better implementation might be:
   
   ```julia
   default(::Type{SubArray{T,N,P,I,L}) where {T,N,P,I,L} = default(P)
   ```



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