Jefffrey commented on PR #10400:
URL: https://github.com/apache/arrow-rs/pull/10400#issuecomment-5069615920

   > > could you elaborate? i was referring to the `impl<OffsetSize: 
OffsetSizeTrait, const C: usize> From<Vec<Option<[u8; C]>>>` and co using const 
generics. these dont seem to exist on the other arrays?
   > 
   > Sorry, I missunderstood your comment. My usecases are:
   > 
   >     * for `&[u8; C]` it is to make `make_array(Binary, [b"foo"])` work. 
Before any cast, the type of `b"foo"` is `&[u8; 3]`. Note that 
`TryFrom<Vec<&[u8; N]>>` is already implemented on `FixedSizeBinaryArray` and I 
would tend to argue equivalent do not really exist for `StringArray` or other 
built-in types.
   > 
   >     * for `[u8; C]` it's mostly for completeness. Glad to drop them if you 
want
   
   ```rust
       #[test]
       fn test123() {
           let _ = create_array!(Binary, [b"foo"]);
       }
   ```
   
   this already compiles fine on main. my point here is that while the cleanup 
is nice, it forces new From API implementations to ensure it maintains the 
existing behaviour. if the main driver for this PR is just a cleanup, then i 
dont think we can justify these new APIs; however if there is a separate need 
for these new From API implementations then theres more rationale for this 
change
   
   (we can still add the `BinaryView` support to the macro, as that is an 
addition 👍)


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