alamb commented on a change in pull request #938:
URL: https://github.com/apache/arrow-datafusion/pull/938#discussion_r695105559
##########
File path: datafusion/tests/sql.rs
##########
@@ -2212,6 +2215,111 @@ async fn csv_explain_analyze_verbose() {
);
}
+/// A macro to assert that some particular line contains two substrings
+///
+/// Usage: `assert_metrics!(actual, operator_name, metrics)`
+///
+macro_rules! assert_metrics {
+ ($ACTUAL: expr, $OPERATOR_NAME: expr, $METRICS: expr) => {
+ let found = $ACTUAL
+ .lines()
+ .any(|line| line.contains($OPERATOR_NAME) &&
line.contains($METRICS));
+ assert!(
+ found,
+ "Can not find a line with both '{}' and '{}' in\n\n{}",
+ $OPERATOR_NAME, $METRICS, $ACTUAL
+ );
+ };
+}
+
+#[tokio::test]
+async fn explain_analyze_baseline_metrics() {
Review comment:
Here is the basic testing strategy I plan for these baseline metrics
--
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]