Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 2e0eee8

Browse files
committed
Address issue for Oracle 11.2 where the local collection is used in SQL statement. Switch to query table directly.
1 parent a594288 commit 2e0eee8

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

source/expectations/data_values/ut_compound_data_helper.pkb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -724,12 +724,13 @@ create or replace package body ut_compound_data_helper is
724724
return l_diffs.count;
725725
end;
726726

727-
function get_json_diffs_type(a_diffs_all tt_json_diff_tab) return tt_json_diff_type_tab is
727+
function get_json_diffs_type(a_diff_id raw) return tt_json_diff_type_tab is
728728
l_diffs_summary tt_json_diff_type_tab := tt_json_diff_type_tab();
729729
begin
730730
select d.difference_type,count(1)
731731
bulk collect into l_diffs_summary
732-
from table(a_diffs_all) d
732+
from ut_json_data_diff_tmp d
733+
where diff_id = a_diff_id
733734
group by d.difference_type;
734735

735736
return l_diffs_summary;

source/expectations/data_values/ut_compound_data_helper.pks

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ create or replace package ut_compound_data_helper authid definer is
134134
function get_json_diffs_tmp(a_diff_id raw) return tt_json_diff_tab;
135135

136136

137-
function get_json_diffs_type(a_diffs_all tt_json_diff_tab) return tt_json_diff_type_tab;
137+
function get_json_diffs_type(a_diff_id raw) return tt_json_diff_type_tab;
138138

139139
end;
140140
/

source/expectations/data_values/ut_data_value_json.tpb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -58,8 +58,8 @@ create or replace type body ut_data_value_json as
5858
l_diffs ut_compound_data_helper.tt_json_diff_tab;
5959
l_message varchar2(32767);
6060

61-
function get_diff_by_type(a_diff ut_compound_data_helper.tt_json_diff_tab) return clob is
62-
l_diff_summary ut_compound_data_helper.tt_json_diff_type_tab := ut_compound_data_helper.get_json_diffs_type(a_diff);
61+
function get_diff_by_type(a_diff_id raw) return clob is
62+
l_diff_summary ut_compound_data_helper.tt_json_diff_type_tab := ut_compound_data_helper.get_json_diffs_type(a_diff_id);
6363
l_message_list ut_varchar2_list := ut_varchar2_list();
6464
begin
6565
for i in 1..l_diff_summary.count loop
@@ -103,7 +103,7 @@ create or replace type body ut_data_value_json as
103103
l_message := ' '||l_diffs.count|| ' differences found' ||
104104
case when l_diffs.count > c_max_rows then ', showing first '|| c_max_rows else null end||chr(10);
105105
ut_utils.append_to_clob( l_result, l_message );
106-
l_message := get_diff_by_type(l_diffs)||chr(10);
106+
l_message := get_diff_by_type(l_diff_id)||chr(10);
107107
ut_utils.append_to_clob( l_result, l_message );
108108

109109
for i in 1 .. least( c_max_rows, l_diffs.count ) loop

0 commit comments

Comments
 (0)