Skip to content

Commit 3b3d3f3

Browse files
committed
fix(tests): add missing result_signal column
1 parent bc83dcc commit 3b3d3f3

7 files changed

Lines changed: 20 additions & 15 deletions

File tree

testgen/template/flavors/databricks/exec_query_tests/ex_window_match_no_drops_databricks.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SELECT '{TEST_TYPE}' as test_type,
1111
'{SKIP_ERRORS}' as threshold_value,
1212
{SKIP_ERRORS} as skip_errors,
1313
'{INPUT_PARAMETERS}' as input_parameters,
14+
NULL as result_signal,
1415
CASE WHEN COUNT (*) > {SKIP_ERRORS} THEN 0 ELSE 1 END as result_code,
1516
CASE
1617
WHEN COUNT(*) > 0 THEN

testgen/template/flavors/databricks/exec_query_tests/ex_window_match_same_databricks.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SELECT '{TEST_TYPE}' as test_type,
1111
'{SKIP_ERRORS}' as threshold_value,
1212
{SKIP_ERRORS} as skip_errors,
1313
'{INPUT_PARAMETERS}' as input_parameters,
14+
NULL as result_signal,
1415
CASE WHEN COUNT (*) > {SKIP_ERRORS} THEN 0 ELSE 1 END as result_code,
1516
CASE
1617
WHEN COUNT(*) > 0 THEN

testgen/template/flavors/mssql/exec_query_tests/ex_relative_entropy_mssql.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ SELECT '{TEST_TYPE}' as test_type,
3939
'{THRESHOLD_VALUE}' as threshold_value,
4040
NULL as skip_errors,
4141
'{INPUT_PARAMETERS}' as input_parameters,
42+
NULL as result_signal,
4243
CASE WHEN js_divergence > {THRESHOLD_VALUE} THEN 0 ELSE 1 END as result_code,
4344
CONCAT('Divergence Level: ',
4445
CONCAT(CAST(js_divergence AS VARCHAR),

testgen/template/flavors/postgresql/exec_query_tests/ex_window_match_no_drops_postgresql.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SELECT '{TEST_TYPE}' as test_type,
1111
'{SKIP_ERRORS}' as threshold_value,
1212
{SKIP_ERRORS} as skip_errors,
1313
'{INPUT_PARAMETERS}' as input_parameters,
14+
NULL as result_signal,
1415
CASE WHEN COUNT (*) > {SKIP_ERRORS} THEN 0 ELSE 1 END as result_code,
1516
CASE
1617
WHEN COUNT(*) > 0 THEN

testgen/template/flavors/postgresql/exec_query_tests/ex_window_match_same_postgresql.sql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ SELECT '{TEST_TYPE}' as test_type,
1111
'{SKIP_ERRORS}' as threshold_value,
1212
{SKIP_ERRORS} as skip_errors,
1313
'{INPUT_PARAMETERS}' as input_parameters,
14+
NULL as result_signal,
1415
CASE WHEN COUNT (*) > {SKIP_ERRORS} THEN 0 ELSE 1 END as result_code,
1516
CASE
1617
WHEN COUNT(*) > 0 THEN

testgen/template/get_entities/get_test_generation_list.sql

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,18 @@
22
Output: list all test generation runs based on last_auto_run_date
33
Optional: n/a*/
44

5-
SELECT ts.test_suite AS test_suite_key,
6-
ts.table_groups_id,
7-
td.last_auto_gen_date,
8-
td.profiling_as_of_date,
9-
td.lock_refresh,
10-
COUNT(DISTINCT td.schema_name || '.' || td.table_name) as tables,
11-
COUNT(DISTINCT td.schema_name || '.' || td.table_name || '.' || td.column_name) as columns,
12-
COUNT(*) as tests
13-
FROM test_definitions td
14-
JOIN test_suites ts ON td.test_suite_id = ts.id
15-
WHERE ts.project_code = :PROJECT_CODE
16-
AND ts.test_suite = :TEST_SUITE
17-
AND td.last_auto_gen_date IS NOT NULL
5+
SELECT ts.test_suite AS test_suite_key,
6+
ts.table_groups_id,
7+
td.last_auto_gen_date,
8+
td.profiling_as_of_date,
9+
td.lock_refresh,
10+
COUNT(DISTINCT td.schema_name || '.' || td.table_name) as tables,
11+
COUNT(DISTINCT td.schema_name || '.' || td.table_name || '.' || td.column_name) as columns,
12+
COUNT(*) as tests
13+
FROM test_definitions td
14+
JOIN test_suites ts ON td.test_suite_id = ts.id
15+
WHERE ts.project_code = :PROJECT_CODE
16+
AND ts.test_suite = :TEST_SUITE
17+
AND td.last_auto_gen_date IS NOT NULL
1818
GROUP BY ts.id, td.last_auto_gen_date, td.profiling_as_of_date, td.lock_refresh
1919
ORDER BY td.last_auto_gen_date desc;

testgen/template/get_entities/get_test_results_for_run_cli.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
SELECT ts.test_suite as test_suite_key,
2-
table_name,
3-
column_names as column_name,
2+
r.table_name,
3+
r.column_names as column_name,
44
r.test_type,
55
CASE
66
WHEN COALESCE(td.severity, ts.severity, tt.default_severity) = 'Log' THEN 'Log'

0 commit comments

Comments
 (0)