You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by GitBox <gi...@apache.org> on 2022/01/05 09:31:22 UTC

[GitHub] [arrow-rs] tustvold commented on a change in pull request #1134: Move more parquet functionality behind experimental feature flag (#1032)

tustvold commented on a change in pull request #1134:
URL: https://github.com/apache/arrow-rs/pull/1134#discussion_r778668774



##########
File path: parquet/src/compression.rs
##########
@@ -20,26 +20,30 @@
 //! See [`Compression`](crate::basic::Compression) enum for all available compression
 //! algorithms.
 //!
-//! # Example
-//!
-//! ```no_run
-//! use parquet::{basic::Compression, compression::create_codec};
-//!
-//! let mut codec = match create_codec(Compression::SNAPPY) {
-//!     Ok(Some(codec)) => codec,
-//!     _ => panic!(),
-//! };
-//!
-//! let data = vec![b'p', b'a', b'r', b'q', b'u', b'e', b't'];
-//! let mut compressed = vec![];
-//! codec.compress(&data[..], &mut compressed).unwrap();
-//!
-//! let mut output = vec![];
-//! codec.decompress(&compressed[..], &mut output).unwrap();
-//!
-//! assert_eq!(output, data);
-//! ```
-
+#[cfg_attr(

Review comment:
       This is necessary because without the `experimental` feature this will fail to compile complaining about compression being private.
   
   FWIW this module is never documented now, but I opted to preserve the test.
   
   You can see it running with:
   
   ```
   $ cargo test --all-features --doc
       Finished test [unoptimized + debuginfo] target(s) in 0.04s
      Doc-tests parquet
   
   running 19 tests
   test src/arrow/array_reader.rs - arrow::array_reader::StructArrayReader::next_batch (line 1092) ... ignored
   test src/arrow/array_reader.rs - arrow::array_reader::StructArrayReader::next_batch (line 1098) ... ignored
   test src/arrow/array_reader.rs - arrow::array_reader::StructArrayReader::next_batch (line 1103) ... ignored
   test src/file/mod.rs - file (line 64) - compile ... ok
   test src/compression.rs - compression::CodecType (line 27) - compile ... ok
   test src/file/mod.rs - file (line 29) - compile ... ok
   test src/file/mod.rs - file (line 81) - compile ... ok
   test src/record/api.rs - record::api::Row::get_column_iter (line 62) - compile ... ok
   test src/column/mod.rs - column (line 38) - compile ... ok
   test src/file/properties.rs - file::properties (line 22) ... ok
   test src/schema/types.rs - schema::types::ColumnPath::append (line 674) ... ok
   test src/arrow/mod.rs - arrow (line 58) ... ok
   test src/schema/types.rs - schema::types::ColumnPath::string (line 663) ... ok
   test src/schema/mod.rs - schema (line 22) ... ok
   test src/schema/printer.rs - schema::printer (line 23) ... ok
   test src/schema/parser.rs - schema::parser (line 24) ... ok
   test src/file/statistics.rs - file::statistics (line 23) ... ok
   test src/arrow/mod.rs - arrow (line 25) ... ok
   test src/arrow/mod.rs - arrow (line 71) ... ok
   
   test result: ok. 16 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out; finished in 3.12s
   ```
   




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