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

[GitHub] [arrow-datafusion] alamb commented on pull request #6629: Sort fields of schema

alamb commented on PR #6629:
URL: https://github.com/apache/arrow-datafusion/pull/6629#issuecomment-1590012740

   Thanks @thomas-k-cameron  -- given my reading of https://github.com/apache/arrow-datafusion/issues/5779 it seems like perhaps a more direct solution might be to sort the list of files so they are always processed in the same order
   
   Perhaps somehow figure out how to sort the `objects`  by the [`location`](https://docs.rs/object_store/0.6.1/object_store/struct.ObjectMeta.html#structfield.location) field, for example?
   
   ```rust
           let schemas: Vec<_> = futures::stream::iter(objects)
               .map(|object| fetch_schema(store.as_ref(), object, self.metadata_size_hint))
               .boxed() // Workaround https://github.com/rust-lang/rust/issues/64552
               .buffered(SCHEMA_INFERENCE_CONCURRENCY)
               .try_collect()
               .await?;
   ```


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