fix initial tx array being null

This commit is contained in:
GroovieGermanikus 2024-01-09 11:46:02 +01:00
parent d18c563447
commit a743ca074f
No known key found for this signature in database
GPG Key ID: 5B6EB831A5CD2015
1 changed files with 2 additions and 2 deletions

View File

@ -392,7 +392,7 @@ impl PostgresSession {
SELECT
acc_id,
array_dedup_append(
( SELECT tx_ids FROM banking_stage_results_2.accounts_map_transaction_latest WHERE acc_id=amt_new.acc_id ),
COALESCE((SELECT tx_ids FROM banking_stage_results_2.accounts_map_transaction_latest WHERE acc_id=amt_new.acc_id ), array[]::bigint[]),
amt_new.tx_agged,
{limit}) AS tx_ids_agg
FROM amt_new
@ -413,7 +413,7 @@ impl PostgresSession {
temp_table_name = temp_table_latest_agged
);
let rows = self.client.execute(statement.as_str(), &[]).await?;
info!("inserted into accounts_map_transaction_latest: {}", rows);
info!("upserted in accounts_map_transaction_latest: {}", rows);
self.drop_temp_table(temp_table_latest_agged).await?;