alamb commented on code in PR #25695: URL: https://github.com/apache/datafusion/pull/25695#discussion_r4143758552
########## datafusion/common/src/test_util.rs: ########## @@ -68,7 +68,14 @@ pub fn format_batches(results: &[RecordBatch]) -> Result<impl Display, ArrowErro /// // compare the formatted output of the record batch with the expected output /// assert_batches_eq!(expected, &[batch]); /// ``` +/// +/// # Public Only for Internal Use: +/// +/// This is not a public API and is for internal use only; see [API policy] for details. +/// +/// [API policy]: https://datafusion.apache.org/contributor-guide/api-health.html#internal-public-apis #[macro_export] +#[doc(hidden)] macro_rules! assert_batches_eq { Review Comment: I think we use assert_batches_eq in our tests quite a bit. These days it is probably better to use insta snapshots, but I am not sure claiming this particular API is (no longer) public is accurate ########## datafusion/common/src/test_util.rs: ########## @@ -377,8 +411,15 @@ macro_rules! create_array { /// ("c", Utf8, vec!["alpha", "beta", "gamma"]) /// ); /// ``` +/// +/// # Public Only for Internal Use: Review Comment: I think it was a public API, but we have now deprecated it 🤔 ########## datafusion/common/src/lib.rs: ########## @@ -60,6 +60,12 @@ pub mod rounding; pub mod scalar; pub mod spans; pub mod stats; +/// # Public Only for Internal Use: +/// +/// This is not a public API and is for internal use only; see [API policy] for details. +/// +/// [API policy]: https://datafusion.apache.org/contributor-guide/api-health.html#internal-public-apis +#[doc(hidden)] Review Comment: I think some of the things in test_utils were actually public (see below) so not sure about this one ########## docs/source/contributor-guide/api-health.md: ########## @@ -55,6 +59,10 @@ notice or a deprecation period. Examples include: 2. Operator APIs required by the optimizer to inspect or rewrite execution plans across crate boundaries. +Do not expose internal APIs solely for tests or microbenchmarks. Some legacy code Review Comment: 💯 ########## datafusion/datasource/src/mod.rs: ########## @@ -450,6 +448,13 @@ impl From<ObjectMeta> for PartitionedFile { /// File 2: [40, 140] /// File 3: [60, 160] /// File 4: [80, 180] +/// +/// # Public Only for Internal Use: +/// +/// This is not a public API and is for internal use only; see [API policy] for details. +/// +/// [API policy]: https://datafusion.apache.org/contributor-guide/api-health.html#internal-public-apis +#[doc(hidden)] Review Comment: 👍 -- 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] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
