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


##########
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:
   non-blocking / nit: you could potentially consider having all of these test 
cases just be written down as an array of
   
   [
       (tpdcds_number, row_estimation_accuracy, byte_estimation_accuracy),
   
   ...
   ]
   
   and then a for loop that iterates through all of them and does the checks. I 
feel like that might be a more concise test/make patterns in the data more 
obvious, but im not sure if the runtime of that one test would then be overly 
long because now individual tests can't run in parallel (you could mitigate by 
spawning each future in parallel and then joining on the whole thing but maybe 
thats not worth the complexity)



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