@@ -271,7 +271,7 @@ impl TestData {
271
271
/// run_complete_snapshot_test(&test_data, "SELECT * FROM t", @"expected output").await?;
272
272
///
273
273
/// // Multiple tests with different data
274
- /// let results = run_snapshot_test(&test_data, "SELECT * FROM t", false ).await?;
274
+ /// let results = run_snapshot_test(&test_data, "SELECT * FROM t").await?;
275
275
/// assert_snapshot!(batches_to_string(&results), @"expected");
276
276
/// ```
277
277
async fn setup_test_contexts (
@@ -788,7 +788,7 @@ async fn test_aggregates_null_handling_comprehensive() -> Result<()> {
788
788
789
789
// Test COUNT null exclusion with basic data
790
790
let sql_count = "SELECT dict_null_keys, COUNT(value) as cnt FROM t GROUP BY dict_null_keys ORDER BY dict_null_keys NULLS FIRST" ;
791
- let results_count = run_snapshot_test ( & test_data_basic, sql_count, false ) . await ?;
791
+ let results_count = run_snapshot_test ( & test_data_basic, sql_count) . await ?;
792
792
793
793
assert_snapshot ! (
794
794
batches_to_string( & results_count) ,
@@ -805,7 +805,7 @@ async fn test_aggregates_null_handling_comprehensive() -> Result<()> {
805
805
806
806
// Test SUM null handling with extended data
807
807
let sql_sum = "SELECT dict_null_vals, SUM(value) as total FROM t GROUP BY dict_null_vals ORDER BY dict_null_vals NULLS FIRST" ;
808
- let results_sum = run_snapshot_test ( & test_data_extended, sql_sum, false ) . await ?;
808
+ let results_sum = run_snapshot_test ( & test_data_extended, sql_sum) . await ?;
809
809
810
810
assert_snapshot ! (
811
811
batches_to_string( & results_sum) ,
@@ -823,7 +823,7 @@ async fn test_aggregates_null_handling_comprehensive() -> Result<()> {
823
823
824
824
// Test MIN null handling with min/max data
825
825
let sql_min = "SELECT dict_null_keys, MIN(value) as minimum FROM t GROUP BY dict_null_keys ORDER BY dict_null_keys NULLS FIRST" ;
826
- let results_min = run_snapshot_test ( & test_data_min_max, sql_min, false ) . await ?;
826
+ let results_min = run_snapshot_test ( & test_data_min_max, sql_min) . await ?;
827
827
828
828
assert_snapshot ! (
829
829
batches_to_string( & results_min) ,
@@ -841,7 +841,7 @@ async fn test_aggregates_null_handling_comprehensive() -> Result<()> {
841
841
842
842
// Test MEDIAN null handling with median data
843
843
let sql_median = "SELECT dict_null_vals, MEDIAN(value) as median_value FROM t GROUP BY dict_null_vals ORDER BY dict_null_vals NULLS FIRST" ;
844
- let results_median = run_snapshot_test ( & test_data_median, sql_median, false ) . await ?;
844
+ let results_median = run_snapshot_test ( & test_data_median, sql_median) . await ?;
845
845
846
846
assert_snapshot ! (
847
847
batches_to_string( & results_median) ,
@@ -867,7 +867,7 @@ async fn test_first_last_val_null_handling() -> Result<()> {
867
867
// Test FIRST_VALUE and LAST_VALUE with window functions over groups
868
868
let sql = "SELECT dict_null_keys, value, FIRST_VALUE(value) OVER (PARTITION BY dict_null_keys ORDER BY value NULLS FIRST) as first_val, LAST_VALUE(value) OVER (PARTITION BY dict_null_keys ORDER BY value NULLS FIRST ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING) as last_val FROM t ORDER BY dict_null_keys NULLS FIRST, value NULLS FIRST" ;
869
869
870
- let results_single = run_snapshot_test ( & test_data, sql, false ) . await ?;
870
+ let results_single = run_snapshot_test ( & test_data, sql) . await ?;
871
871
872
872
assert_snapshot ! ( batches_to_string( & results_single) , @r"
873
873
+----------------+-------+-----------+----------+
@@ -1729,56 +1729,12 @@ async fn test_median_distinct_with_fuzz_table_dict_nulls() -> Result<()> {
1729
1729
1730
1730
/// Helper function to run snapshot tests with consistent setup, execution, and assertion
1731
1731
/// This reduces the repetitive pattern of "setup data → SQL → assert_snapshot!"
1732
- async fn run_snapshot_test (
1733
- test_data : & TestData ,
1734
- sql : & str ,
1735
- _use_sorted_output : bool ,
1736
- ) -> Result < Vec < RecordBatch > > {
1732
+ async fn run_snapshot_test ( test_data : & TestData , sql : & str ) -> Result < Vec < RecordBatch > > {
1737
1733
let ( ctx_single, ctx_multi) = setup_test_contexts ( test_data) . await ?;
1738
1734
let results = test_query_consistency ( & ctx_single, & ctx_multi, sql) . await ?;
1739
1735
Ok ( results)
1740
1736
}
1741
1737
1742
- /// Helper function for simpler snapshot tests that only need single-partition execution
1743
- #[ allow( dead_code) ]
1744
- async fn run_simple_snapshot_test (
1745
- ctx : & SessionContext ,
1746
- sql : & str ,
1747
- ) -> Result < Vec < RecordBatch > > {
1748
- let df = ctx. sql ( sql) . await ?;
1749
- let results = df. collect ( ) . await ?;
1750
- Ok ( results)
1751
- }
1752
-
1753
- /// Helper function to run a complete snapshot test with TestData
1754
- /// This fully encapsulates the "setup data → SQL → assert_snapshot!" pattern
1755
- #[ allow( dead_code) ]
1756
- async fn run_complete_snapshot_test (
1757
- test_data : & TestData ,
1758
- sql : & str ,
1759
- expected_snapshot : & str ,
1760
- ) -> Result < ( ) > {
1761
- let results = run_snapshot_test ( test_data, sql, false ) . await ?;
1762
-
1763
- assert_snapshot ! ( batches_to_string( & results) , expected_snapshot) ;
1764
-
1765
- Ok ( ( ) )
1766
- }
1767
-
1768
- /// Helper function to run a complete snapshot test with sorted output
1769
- #[ allow( dead_code) ]
1770
- async fn run_complete_sorted_snapshot_test (
1771
- test_data : & TestData ,
1772
- sql : & str ,
1773
- expected_snapshot : & str ,
1774
- ) -> Result < ( ) > {
1775
- let results = run_snapshot_test ( test_data, sql, true ) . await ?;
1776
-
1777
- assert_snapshot ! ( batches_to_sort_string( & results) , expected_snapshot) ;
1778
-
1779
- Ok ( ( ) )
1780
- }
1781
-
1782
1738
/// Test data structure for fuzz table with timestamp and dictionary columns containing nulls
1783
1739
struct FuzzTimestampTestData {
1784
1740
schema : Arc < Schema > ,
0 commit comments