alamb commented on code in PR #15165: URL: https://github.com/apache/datafusion/pull/15165#discussion_r1990169442
########## datafusion/common/src/test_util.rs: ########## @@ -73,6 +76,31 @@ macro_rules! assert_batches_eq { }; } +pub fn batches_to_string(batches: &[RecordBatch]) -> String { + let actual = pretty_format_batches_with_options(batches, &DEFAULT_FORMAT_OPTIONS) + .unwrap() + .to_string(); + + actual.trim().to_string() +} + +pub fn batches_to_sort_string(batches: &[RecordBatch]) -> String { Review Comment: I think using strings for comparison works well - let's try this ########## datafusion/core/tests/dataframe/mod.rs: ########## @@ -429,16 +434,16 @@ async fn drop_with_quotes() -> Result<()> { let df_results = df.collect().await?; - assert_batches_sorted_eq!( Review Comment: Something @crepererum did in influxdb_iox was to create a new that wraps the results so the tests look like this: https://github.com/influxdata/influxdb3_core/blob/26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f/iox_query/src/physical_optimizer/predicate_pushdown.rs#L186-L198 https://github.com/influxdata/influxdb3_core/blob/26a30bf8d6e2b6b3f1dd905c4ec27e3db6e20d5f/iox_query/src/physical_optimizer/sort/order_union_sorted_inputs.rs#L606-L636 Note sure if that is 100% relevant but it is a neat pattern -- 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: github-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org