Skip to content

Commit

Permalink
fix edge case while getting joinable tables with no links
Browse files Browse the repository at this point in the history
  • Loading branch information
Anish9901 committed Aug 8, 2024
1 parent e8c1a73 commit a2ca086
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions db/sql/10_msar_joinable_tables.sql
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ jsonb AS $$
SELECT jsonb_object_agg(tt_oid, tt_info) AS tt FROM target_cte
)
SELECT jsonb_build_object(
'joinable_tables', joinable_tables.jt,
'target_table_info', target_table_info.tt
'joinable_tables', COALESCE(joinable_tables.jt, '[]'::jsonb),
'target_table_info', COALESCE(target_table_info.tt, '{}'::jsonb)
) FROM joinable_tables, target_table_info;
$$ LANGUAGE SQL STABLE RETURNS NULL ON NULL INPUT;

0 comments on commit a2ca086

Please sign in to comment.