Skip to content

Commit

Permalink
Make arrow::array_reader private (#1032) (#1133)
Browse files Browse the repository at this point in the history
  • Loading branch information
tustvold authored Jan 5, 2022
1 parent ae2e39c commit bc2d7aa
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 2 deletions.
4 changes: 3 additions & 1 deletion parquet/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ arrow = { path = "../arrow", version = "7.0.0-SNAPSHOT", default-features = fals
default = ["arrow", "snap", "brotli", "flate2", "lz4", "zstd", "base64"]
cli = ["serde_json", "base64", "clap"]
test_common = []
# Experimental, unstable functionality primarily used for testing
experimental = []

[[ bin ]]
name = "parquet-read"
Expand All @@ -79,5 +81,5 @@ harness = false

[[bench]]
name = "arrow_array_reader"
required-features = ["test_common"]
required-features = ["test_common", "experimental"]
harness = false
2 changes: 1 addition & 1 deletion parquet/src/arrow/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
//!}
//! ```

pub mod array_reader;
experimental_mod!(array_reader);
pub mod arrow_array_reader;
pub mod arrow_reader;
pub mod arrow_writer;
Expand Down
16 changes: 16 additions & 0 deletions parquet/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,22 @@
clippy::vec_init_then_push
)]

/// Defines a module with an experimental public API
///
/// The module will not be documented, and will only be public if the
/// experimental feature flag is enabled
///
/// Experimental modules have no stability guarantees
macro_rules! experimental_mod {
($module:ident) => {
#[cfg(feature = "experimental")]
#[doc(hidden)]
pub mod $module;
#[cfg(not(feature = "experimental"))]
mod $module;
};
}

#[macro_use]
pub mod errors;
pub mod basic;
Expand Down

0 comments on commit bc2d7aa

Please sign in to comment.