diff options
author | udovichenko-r <[email protected]> | 2024-11-23 22:29:07 +0300 |
---|---|---|
committer | udovichenko-r <[email protected]> | 2024-11-23 22:43:39 +0300 |
commit | 8b9f13e29dea8f76f11579aae5344ac571d5e604 (patch) | |
tree | 0449b096aa6444a36ba8cc5a3b3c64e0e7b94ed1 /yql/essentials/tests/sql/suites/json/json_value | |
parent | 284518c9e820058795b9e7cc44ff26b25f3f455b (diff) |
Check custom error in xfail tests. Remove canonization from dq/hybrid tests
1. xfail тесты теперь должны содержать спец комментарий `custom error` с ожидаемым текстом ошибки
2. Все suites для xfail размечены спец. коментариями, некоторые тесты разбиты на несколько
3. Включены тесты с Python и Javascript udf для yt провайдера и переканонизированы (были отключены в github)
4. Для тяжелых xfail тестов аналогично убрана канонизация и включена проверка по спец. коментарию
5. Из dq_file/hybrid тестов убрана канонизация. Осталась только кросс-проверка результатов с yqlrun и блочным режимом
6. В dqrun теперь используется exception_policy вместо fail_policy (для корректной выдачи ошибок в тестах)
commit_hash:a92b3835f86b0c01225e81e3f28bb6d11d8d67a3
Diffstat (limited to 'yql/essentials/tests/sql/suites/json/json_value')
7 files changed, 8 insertions, 13 deletions
diff --git a/yql/essentials/tests/sql/suites/json/json_value/on_empty_cast_default_exception.sql b/yql/essentials/tests/sql/suites/json/json_value/on_empty_cast_default_exception.sql index c646cdb91f7..8237aef3380 100644 --- a/yql/essentials/tests/sql/suites/json/json_value/on_empty_cast_default_exception.sql +++ b/yql/essentials/tests/sql/suites/json/json_value/on_empty_cast_default_exception.sql @@ -1,5 +1,4 @@ -/* syntax version 1 */ -/* postgres can not */ +/* custom error:Failed to cast default value from ON EMPTY clause to target type Optional<Uint32>*/ $json = CAST("{}" as Json); SELECT diff --git a/yql/essentials/tests/sql/suites/json/json_value/on_empty_exception.sql b/yql/essentials/tests/sql/suites/json/json_value/on_empty_exception.sql index 1ec55af7ca5..d30d3161b0c 100644 --- a/yql/essentials/tests/sql/suites/json/json_value/on_empty_exception.sql +++ b/yql/essentials/tests/sql/suites/json/json_value/on_empty_exception.sql @@ -1,5 +1,4 @@ -/* syntax version 1 */ -/* postgres can not */ +/* custom error:Result is empty*/ $json = CAST("{}" as Json); SELECT diff --git a/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_default_exception.sql b/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_default_exception.sql index 51f4591ad7a..a7169032d9f 100644 --- a/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_default_exception.sql +++ b/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_default_exception.sql @@ -1,5 +1,4 @@ -/* syntax version 1 */ -/* postgres can not */ +/* custom error:Failed to cast default value from ON ERROR clause to target type Optional<Uint16>*/ -- Here JsonPath engine returns error result and ON ERROR section must be used. -- But default value in ON ERROR section is -123 and casting it to Uint16 will fail. diff --git a/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_udf_exception.sql b/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_udf_exception.sql index 722a06256cc..a3fb807857c 100644 --- a/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_udf_exception.sql +++ b/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_udf_exception.sql @@ -1,5 +1,4 @@ -/* syntax version 1 */ -/* postgres can not */ +/* custom error:Cannot convert extracted JSON value to target type*/ -- In this case call to Json2::SqlValueNumber will fail because "string" -- does not represent Number value diff --git a/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_value_exception.sql b/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_value_exception.sql index 5b97c45e494..a671f89fca1 100644 --- a/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_value_exception.sql +++ b/yql/essentials/tests/sql/suites/json/json_value/on_error_cast_value_exception.sql @@ -1,5 +1,4 @@ -/* syntax version 1 */ -/* postgres can not */ +/* custom error:Failed to cast extracted JSON value to target type Optional<Uint16>*/ -- In this case call to Json2::SqlValueNumber will be successfull, but cast -- of -123 to Uint16 will fail diff --git a/yql/essentials/tests/sql/suites/json/json_value/on_error_jsonpath_exception.sql b/yql/essentials/tests/sql/suites/json/json_value/on_error_jsonpath_exception.sql index 83140075476..ee4467e138e 100644 --- a/yql/essentials/tests/sql/suites/json/json_value/on_error_jsonpath_exception.sql +++ b/yql/essentials/tests/sql/suites/json/json_value/on_error_jsonpath_exception.sql @@ -1,5 +1,4 @@ -/* syntax version 1 */ -/* postgres can not */ +/* custom error:Member not found*/ $json = CAST("{}" as Json); SELECT diff --git a/yql/essentials/tests/sql/suites/json/json_value/passing_exception.sql b/yql/essentials/tests/sql/suites/json/json_value/passing_exception.sql index 7e94a73cccd..2c6dfcf9b9e 100644 --- a/yql/essentials/tests/sql/suites/json/json_value/passing_exception.sql +++ b/yql/essentials/tests/sql/suites/json/json_value/passing_exception.sql @@ -1,5 +1,6 @@ /* syntax version 1 */ /* postgres can not */ +/* custom error:Expected data or optional of data, but got: Tuple<Int32,Int32>*/ $json = CAST(@@{ "key": 123 @@ -11,4 +12,4 @@ SELECT $json, "strict $var" PASSING AsTuple(1, 2) as var - );
\ No newline at end of file + ); |