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

Skip to content

Commit 0f592e6

Browse files
committed
Cleanup of cardinality hints.
1 parent a8bac08 commit 0f592e6

1 file changed

Lines changed: 5 additions & 8 deletions

File tree

source/expectations/data_values/ut_compound_data_helper.pkb

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,10 @@ create or replace package body ut_compound_data_helper is
9797
expected_cols as ( select :a_expected as item_data from dual ),
9898
actual_cols as ( select :a_actual as item_data from dual ),
9999
expected_cols_info as (
100-
select /*+ cardinality(e 100) */
101-
e.*,
100+
select e.*,
102101
replace(expected_type,'VARCHAR2','CHAR') expected_type_compare
103102
from (
104-
select /*+ cardinality(xt 100) */
103+
select /*+ CARDINALITY(xt 100) */
105104
rownum expected_pos,
106105
xt.name expected_name,
107106
xt.type expected_type
@@ -116,10 +115,9 @@ create or replace package body ut_compound_data_helper is
116115
) e
117116
),
118117
actual_cols_info as (
119-
select /*+ cardinality(a 100) */
120-
a.*,
118+
select a.*,
121119
replace(actual_type,'VARCHAR2','CHAR') actual_type_compare
122-
from (select /*+ cardinality(xt 100) */
120+
from (select /*+ CARDINALITY(xt 100) */
123121
rownum actual_pos,
124122
xt.name actual_name,
125123
xt.type actual_type
@@ -139,8 +137,7 @@ create or replace package body ut_compound_data_helper is
139137
from expected_cols_info e
140138
full outer join actual_cols_info a on e.expected_name = a.actual_name
141139
)
142-
select /*+ cardinality(joined_cols 100)*/
143-
case
140+
select case
144141
when expected_pos is null and actual_pos is not null then '+'
145142
when expected_pos is not null and actual_pos is null then '-'
146143
when expected_type_compare != actual_type_compare then 't'

0 commit comments

Comments
 (0)