jsjtxietian commented on issue #36867:
URL: https://github.com/apache/arrow/issues/36867#issuecomment-1651170504

   @pitrou Hi,I have a question regarding this issue and I want to ask for your 
advice.
   
   In this code, because field is a function with default parameters, one can 
pass not only name and type to this function, but also nullable and metadata
   ``` struct_({field("a", int8()), field("b", utf8())});  ```
   
   but in the following form, I can use 
std::initializer_list<std::pair<std::string, std::shared_ptr<DataType>>> as the 
input parameter,  but in this way it's hard to add support for passing in 
nullable and metadata inconveniently like the field function. std::tuple 
doesn't support default parameters too.
    ``` struct_({{"a", int8()}, {"b", utf8()}}); ```
   
   I guess there is a better way to write this overload function or shall we 
just support (name, type) pairs for now?
   Thanks for your time.


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