westonpace opened a new pull request #11014:
URL: https://github.com/apache/arrow/pull/11014


   This PR ended up being fairly extensive but mostly to avoid a single 
`shared_ptr` copy (due to changing the constructor to take in `const Schema& 
schema` instead of `std::shared_ptr<Schema>` since I now copy the field names 
and types out of the schema) and I'm not entirely sure that's worth it over 
just keeping the old interface.
   
   Otherwise the only potential downside is that `std::shared_ptr<Schema> 
Partitioning::schema()` became `Result<std::shared_ptr<Schema>> 
Partitioning::GetSchema()` since it could potentially fail if the partitioning 
was created without a schema.  I also removed the corresponding accessor from 
python.
   
   I don't think this is a problem though because `GetSchema` would only work 
if there was a schema which means...
   
   1. You created the partitioning with a schema in the first place so there is 
no need to pull it back out.
   2. You created the schema with a FileSystemDatasetFactory so you can just 
get the field types from the dataset schema.


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