Skip to content

Commit 2a00534

Browse files
committed
Standardised checks for regression mode being enabled.
1 parent 328bd4a commit 2a00534

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

sp_QuickieStore/sp_QuickieStore.sql

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1683,19 +1683,19 @@ BEGIN
16831683
END;
16841684

16851685
/* Dynamic regression change column based on formatting and comparator */
1686-
IF @regression_baseline_start_date IS NOT NULL AND @regression_comparator = 'relative' AND @format_output = 1
1686+
IF @regression_mode = 1 AND @regression_comparator = 'relative' AND @format_output = 1
16871687
BEGIN
16881688
INSERT INTO
16891689
@ColumnDefinitions (column_id, metric_group, metric_type, column_name, column_source, is_conditional, condition_param, condition_value, expert_only, format_pattern)
16901690
VALUES (160, 'regression', 'change', 'change_in_average_for_query_hash_since_regression_time_period', 'regression.change_since_regression_time_period', 1, 'regression_mode', 1, 0, 'P2');
16911691
END;
1692-
ELSE IF @regression_baseline_start_date IS NOT NULL AND @format_output = 1
1692+
ELSE IF @regression_mode = 1 AND @format_output = 1
16931693
BEGIN
16941694
INSERT INTO
16951695
@ColumnDefinitions (column_id, metric_group, metric_type, column_name, column_source, is_conditional, condition_param, condition_value, expert_only, format_pattern)
16961696
VALUES (160, 'regression', 'change', 'change_in_average_for_query_hash_since_regression_time_period', 'regression.change_since_regression_time_period', 1, 'regression_mode', 1, 0, 'N2');
16971697
END;
1698-
ELSE IF @regression_baseline_start_date IS NOT NULL
1698+
ELSE IF @regression_mode = 1
16991699
BEGIN
17001700
INSERT INTO
17011701
@ColumnDefinitions (column_id, metric_group, metric_type, column_name, column_source, is_conditional, condition_param, condition_value, expert_only, format_pattern)
@@ -1722,7 +1722,7 @@ VALUES
17221722
'n',
17231723
'n',
17241724
'ROW_NUMBER() OVER (PARTITION BY qsrs.plan_id ORDER BY ' +
1725-
CASE WHEN @regression_baseline_start_date IS NOT NULL THEN
1725+
CASE WHEN @regression_mode = 1 THEN
17261726
/* As seen when populating #regression_changes */
17271727
CASE @regression_direction
17281728
WHEN 'regressed' THEN 'regression.change_since_regression_time_period'

0 commit comments

Comments
 (0)