@@ -82,8 +82,7 @@ const ADBC_UPDATE_STRATEGY_ENV: &str = "SPICEBENCH_ADBC_UPDATE_STRATEGY";
8282/// so the planner has accurate statistics and picks an index scan instead of
8383/// a full sequential scan on the (potentially large) target table.
8484/// Only meaningful for PostgreSQL-compatible targets. Defaults to false.
85- const ADBC_ANALYZE_STAGING_BEFORE_MERGE_ENV : & str =
86- "SPICEBENCH_ADBC_ANALYZE_STAGING_BEFORE_MERGE" ;
85+ const ADBC_ANALYZE_STAGING_BEFORE_MERGE_ENV : & str = "SPICEBENCH_ADBC_ANALYZE_STAGING_BEFORE_MERGE" ;
8786
8887/// Strategy for executing UPDATE operations.
8988#[ derive( Debug , Clone , Copy , PartialEq , Eq ) ]
@@ -242,7 +241,12 @@ impl AdbcSink {
242241 fn analyze_staging_before_merge ( ) -> bool {
243242 std:: env:: var ( ADBC_ANALYZE_STAGING_BEFORE_MERGE_ENV )
244243 . ok ( )
245- . map ( |raw| matches ! ( raw. trim( ) . to_ascii_lowercase( ) . as_str( ) , "1" | "true" | "yes" | "on" ) )
244+ . map ( |raw| {
245+ matches ! (
246+ raw. trim( ) . to_ascii_lowercase( ) . as_str( ) ,
247+ "1" | "true" | "yes" | "on"
248+ )
249+ } )
246250 . unwrap_or ( false )
247251 }
248252
@@ -1254,10 +1258,7 @@ impl AdbcSink {
12541258 // the target table. PostgreSQL-specific; disabled by default.
12551259 // Enable with SPICEBENCH_ADBC_ANALYZE_STAGING_BEFORE_MERGE=true.
12561260 if Self :: analyze_staging_before_merge ( ) {
1257- let analyze_sql = format ! (
1258- "ANALYZE {}" ,
1259- self . target_table_identifier( & staging_table)
1260- ) ;
1261+ let analyze_sql = format ! ( "ANALYZE {}" , self . target_table_identifier( & staging_table) ) ;
12611262 if let Err ( e) = conn. execute_update ( & analyze_sql) {
12621263 tracing:: warn!(
12631264 table = %table_name,
0 commit comments