gabotechs commented on code in PR #20292:
URL: https://github.com/apache/datafusion/pull/20292#discussion_r2817398909


##########
datafusion/core/tests/statistics/tpcds.rs:
##########
@@ -0,0 +1,876 @@
+// Licensed to the Apache Software Foundation (ASF) under one
+// or more contributor license agreements.  See the NOTICE file
+// distributed with this work for additional information
+// regarding copyright ownership.  The ASF licenses this file
+// to you under the Apache License, Version 2.0 (the
+// "License"); you may not use this file except in compliance
+// with the License.  You may obtain a copy of the License at
+//
+//   http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing,
+// software distributed under the License is distributed on an
+// "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+// KIND, either express or implied.  See the License for the
+// specific language governing permissions and limitations
+// under the License.
+
+#![allow(clippy::absurd_extreme_comparisons)]
+#![allow(unused_comparisons)]
+
+use crate::statistics::StatsVsMetricsDisplayOptions;
+use datafusion::common::Result;
+use datafusion::prelude::{ParquetReadOptions, SessionContext};
+use datafusion_physical_plan::collect;
+use std::fs;
+
+#[cfg(test)]
+mod tests {
+    use super::*;
+    use crate::statistics::Node;
+
+    #[tokio::test]
+    async fn tpcds_1() -> Result<()> {
+        let result = tpcds_stats_vs_metrics(1).await?;
+        assert!(result.row_estimation_accuracy >= 20);

Review Comment:
   Unfortunately, unlike other languages like Golang or JS, Rust does not play 
well with that pattern, as you would:
   1. Lose individual test reporting to stdout or in IDE tools.
   2. Lose the ability to hook up a debugger for one specific test case.
   
   Test cases in Rust are defined by their literal function names, so Cargo 
tooling expects you to put individual test cases in different functions.
   
   You can see that this is actually the pattern the rest of the DataFusion 
codebase is using (all I've checked at least)



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

Reply via email to