alamb commented on code in PR #10354:
URL: https://github.com/apache/arrow-rs/pull/10354#discussion_r3616784821
##########
parquet/tests/encryption/encryption_async.rs:
##########
@@ -420,40 +420,108 @@ async fn test_write_non_uniform_encryption() {
.await;
}
-#[cfg(feature = "object_store")]
-async fn get_encrypted_meta_store() -> (
- object_store::ObjectMeta,
- std::sync::Arc<dyn object_store::ObjectStore>,
-) {
- use object_store::local::LocalFileSystem;
+/// An [`AsyncFileReader`] reading via an [`ObjectStore`], mirroring the
+/// example on the [`AsyncFileReader`] trait documentation
+///
+/// [`AsyncFileReader`]: parquet::arrow::async_reader::AsyncFileReader
+/// [`ObjectStore`]: object_store::ObjectStore
+mod object_store_reader {
+ use bytes::Bytes;
+ use futures::future::BoxFuture;
+ use futures::{FutureExt, TryFutureExt};
use object_store::path::Path;
- use object_store::{ObjectStore, ObjectStoreExt};
-
+ use object_store::{GetOptions, GetRange, ObjectStore, ObjectStoreExt};
+ use parquet::arrow::arrow_reader::ArrowReaderOptions;
+ use parquet::arrow::async_reader::{AsyncFileReader, MetadataSuffixFetch};
+ use parquet::errors::{ParquetError, Result};
+ use parquet::file::metadata::{ParquetMetaData, ParquetMetaDataReader};
+ use std::ops::Range;
use std::sync::Arc;
- let test_data = arrow::util::test_util::parquet_test_data();
- let store = LocalFileSystem::new_with_prefix(test_data).unwrap();
- let meta = store
- .head(&Path::from("uniform_encryption.parquet.encrypted"))
- .await
- .unwrap();
+ fn to_parquet_err(e: object_store::Error) -> ParquetError {
Review Comment:
This is a pretty compelling short example showing the integration doesn't
take much code (150 lines or so)
--
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]