File tree Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Expand file tree Collapse file tree 2 files changed +6
-12
lines changed Original file line number Diff line number Diff line change @@ -830,7 +830,7 @@ impl PgReplicationClient {
830
830
}
831
831
832
832
let union_query = selects. join ( " union all " ) ;
833
- format ! ( r#"copy ({}) to stdout with (format text);"# , union_query )
833
+ format ! ( r#"copy ({union_query }) to stdout with (format text);"# )
834
834
} else {
835
835
let table_name = self . get_table_name ( table_id) . await ?;
836
836
format ! (
@@ -879,10 +879,7 @@ impl PgReplicationClient {
879
879
880
880
/// Returns true if the given table id refers to a partitioned table (relkind = 'p').
881
881
async fn is_partitioned_table ( & self , table_id : TableId ) -> EtlResult < bool > {
882
- let query = format ! (
883
- "select c.relkind from pg_class c where c.oid = {}" ,
884
- table_id
885
- ) ;
882
+ let query = format ! ( "select c.relkind from pg_class c where c.oid = {table_id}" ) ;
886
883
887
884
for msg in self . client . simple_query ( & query) . await ? {
888
885
if let SimpleQueryMessage :: Row ( row) = msg {
@@ -905,7 +902,7 @@ impl PgReplicationClient {
905
902
with recursive parts(relid) as (
906
903
select i.inhrelid
907
904
from pg_inherits i
908
- where i.inhparent = {parent }
905
+ where i.inhparent = {parent_id }
909
906
union all
910
907
select i.inhrelid
911
908
from pg_inherits i
@@ -915,8 +912,7 @@ impl PgReplicationClient {
915
912
from parts p
916
913
left join pg_inherits i on i.inhparent = p.relid
917
914
where i.inhrelid is null
918
- "# ,
919
- parent = parent_id
915
+ "#
920
916
) ;
921
917
922
918
let mut ids = Vec :: new ( ) ;
Original file line number Diff line number Diff line change @@ -74,8 +74,7 @@ async fn partitioned_table_copy_replicates_existing_data() {
74
74
75
75
assert_eq ! (
76
76
total_rows, 3 ,
77
- "Expected 3 rows synced (one per partition), but got {}" ,
78
- total_rows
77
+ "Expected 3 rows synced (one per partition), but got {total_rows}"
79
78
) ;
80
79
81
80
let table_states = state_store. get_table_replication_states ( ) . await ;
@@ -182,8 +181,7 @@ async fn partitioned_table_copy_and_streams_new_data_from_new_partition() {
182
181
let total_rows: usize = table_rows. values ( ) . map ( |rows| rows. len ( ) ) . sum ( ) ;
183
182
assert_eq ! (
184
183
total_rows, 2 ,
185
- "Expected 2 rows synced from initial copy, got {}" ,
186
- total_rows
184
+ "Expected 2 rows synced from initial copy, got {total_rows}"
187
185
) ;
188
186
189
187
let table_states = state_store. get_table_replication_states ( ) . await ;
You can’t perform that action at this time.
0 commit comments