Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Cleanup of cardinality hints.
  • Loading branch information
jgebal committed Sep 25, 2018
commit 0f592e6572e31da1be19435b88752eedd78f6ff4
13 changes: 5 additions & 8 deletions source/expectations/data_values/ut_compound_data_helper.pkb
Original file line number Diff line number Diff line change
Expand Up @@ -97,11 +97,10 @@ create or replace package body ut_compound_data_helper is
expected_cols as ( select :a_expected as item_data from dual ),
actual_cols as ( select :a_actual as item_data from dual ),
expected_cols_info as (
select /*+ cardinality(e 100) */
e.*,
select e.*,
replace(expected_type,'VARCHAR2','CHAR') expected_type_compare
from (
select /*+ cardinality(xt 100) */
select /*+ CARDINALITY(xt 100) */
rownum expected_pos,
xt.name expected_name,
xt.type expected_type
Expand All @@ -116,10 +115,9 @@ create or replace package body ut_compound_data_helper is
) e
),
actual_cols_info as (
select /*+ cardinality(a 100) */
a.*,
select a.*,
replace(actual_type,'VARCHAR2','CHAR') actual_type_compare
from (select /*+ cardinality(xt 100) */
from (select /*+ CARDINALITY(xt 100) */
rownum actual_pos,
xt.name actual_name,
xt.type actual_type
Expand All @@ -139,8 +137,7 @@ create or replace package body ut_compound_data_helper is
from expected_cols_info e
full outer join actual_cols_info a on e.expected_name = a.actual_name
)
select /*+ cardinality(joined_cols 100)*/
case
select case
when expected_pos is null and actual_pos is not null then '+'
when expected_pos is not null and actual_pos is null then '-'
when expected_type_compare != actual_type_compare then 't'
Expand Down