diff options
| author | panikku <[email protected]> | 2025-06-20 11:33:52 +0300 |
|---|---|---|
| committer | panikku <[email protected]> | 2025-06-20 12:04:50 +0300 |
| commit | d4b975945b54f49d3a106ebc5a392a49944f2f88 (patch) | |
| tree | 93d52b7bd8f364f8c0a0e228df2939ddfc49d746 /yql/essentials/udfs/common | |
| parent | 815bb53e8a110e23218e610caabd6a3e15fa3ca5 (diff) | |
YQL-19934: Fix Unicode / Error location display
Fix Unicode/ error line
commit_hash:aa5f17b1dd12a3b69869458c6f5aa92bb8514257
Diffstat (limited to 'yql/essentials/udfs/common')
9 files changed, 26 insertions, 27 deletions
diff --git a/yql/essentials/udfs/common/unicode_base/lib/unicode_base_udf.h b/yql/essentials/udfs/common/unicode_base/lib/unicode_base_udf.h index d27abcb9f65..850990d7ba9 100644 --- a/yql/essentials/udfs/common/unicode_base/lib/unicode_base_udf.h +++ b/yql/essentials/udfs/common/unicode_base/lib/unicode_base_udf.h @@ -101,7 +101,6 @@ namespace { args[2] ? TMaybe<ui64>(args[2].Get<ui64>()) : Nothing()); return ProcessResult(builder, std::move(executeResult), args); } - private: static TUnboxedValue ProcessResult(const IValueBuilder* builder, const TString& newString, const TUnboxedValuePod*) { return builder->NewString(newString); @@ -359,7 +358,7 @@ namespace { try { unicodeSet.Parse(customCategory); } catch (...) { - UdfTerminate((TStringBuilder() << "Failed to parse unicode set: " << CurrentExceptionMessage()).c_str()); + throw yexception() << "Failed to parse unicode set: " << CurrentExceptionMessage(); } wchar32 rune; const unsigned char* cur = reinterpret_cast<const unsigned char*>(input.begin()); @@ -494,7 +493,7 @@ namespace { if constexpr (strict) { return Nothing(); } else { - UdfTerminate(message); + throw yexception() << message; } }; diff --git a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F0_/extracted b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F0_/extracted index f8d4992f9e1..5cca7576df3 100644 --- a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F0_/extracted +++ b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F0_/extracted @@ -3,6 +3,6 @@ <tmp_path>/program.sql:<main>:10:1: Error: Execution of node: YtMap! SELECT ^ - <tmp_path>/program.sql:<main>:10:1: Error: Input string is not a number - SELECT - ^
\ No newline at end of file + <tmp_path>/program.sql:<main>:14:14: Error: Input string is not a number + Unicode::ToUint64(value), + ^
\ No newline at end of file diff --git a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F1_/extracted b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F1_/extracted index bbdeae1af46..d2cca2308ac 100644 --- a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F1_/extracted +++ b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F1_/extracted @@ -3,6 +3,6 @@ <tmp_path>/program.sql:<main>:10:1: Error: Execution of node: YtMap! SELECT ^ - <tmp_path>/program.sql:<main>:10:1: Error: Input string contains junk after the number - SELECT - ^
\ No newline at end of file + <tmp_path>/program.sql:<main>:14:14: Error: Input string contains junk after the number + Unicode::ToUint64(value), + ^
\ No newline at end of file diff --git a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F2_/extracted b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F2_/extracted index e15ed0de7a4..408e90e57e9 100644 --- a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F2_/extracted +++ b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F2_/extracted @@ -3,6 +3,6 @@ <tmp_path>/program.sql:<main>:10:1: Error: Execution of node: YtMap! SELECT ^ - <tmp_path>/program.sql:<main>:10:1: Error: Converted value falls out of Uint64 range - SELECT - ^
\ No newline at end of file + <tmp_path>/program.sql:<main>:14:14: Error: Converted value falls out of Uint64 range + Unicode::ToUint64(value), + ^
\ No newline at end of file diff --git a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F3_/extracted b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F3_/extracted index aff4bb4c226..fea68335566 100644 --- a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F3_/extracted +++ b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_BlockToUint64F3_/extracted @@ -3,6 +3,6 @@ <tmp_path>/program.sql:<main>:10:1: Error: Execution of node: YtMap! SELECT ^ - <tmp_path>/program.sql:<main>:10:1: Error: Incorrect base - SELECT - ^
\ No newline at end of file + <tmp_path>/program.sql:<main>:14:14: Error: Incorrect base + Unicode::ToUint64(value, 1), + ^
\ No newline at end of file diff --git a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F0_/extracted b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F0_/extracted index 6c16e6c2e39..891b90432ef 100644 --- a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F0_/extracted +++ b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F0_/extracted @@ -3,6 +3,6 @@ <tmp_path>/program.sql:<main>:4:1: Error: Execution of node: YtMap! SELECT ^ - <tmp_path>/program.sql:<main>:4:1: Error: Input string is not a number - SELECT - ^
\ No newline at end of file + <tmp_path>/program.sql:<main>:8:14: Error: Input string is not a number + Unicode::ToUint64(value), + ^
\ No newline at end of file diff --git a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F1_/extracted b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F1_/extracted index 4288cfcc4c7..a7efc21dfbf 100644 --- a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F1_/extracted +++ b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F1_/extracted @@ -3,6 +3,6 @@ <tmp_path>/program.sql:<main>:4:1: Error: Execution of node: YtMap! SELECT ^ - <tmp_path>/program.sql:<main>:4:1: Error: Input string contains junk after the number - SELECT - ^
\ No newline at end of file + <tmp_path>/program.sql:<main>:8:14: Error: Input string contains junk after the number + Unicode::ToUint64(value), + ^
\ No newline at end of file diff --git a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F2_/extracted b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F2_/extracted index 7ebb531e661..8c26d414cc9 100644 --- a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F2_/extracted +++ b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F2_/extracted @@ -3,6 +3,6 @@ <tmp_path>/program.sql:<main>:4:1: Error: Execution of node: YtMap! SELECT ^ - <tmp_path>/program.sql:<main>:4:1: Error: Converted value falls out of Uint64 range - SELECT - ^
\ No newline at end of file + <tmp_path>/program.sql:<main>:8:14: Error: Converted value falls out of Uint64 range + Unicode::ToUint64(value), + ^
\ No newline at end of file diff --git a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F3_/extracted b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F3_/extracted index 6ff53caa9a2..c4afb1596ec 100644 --- a/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F3_/extracted +++ b/yql/essentials/udfs/common/unicode_base/test/canondata/test.test_ToUint64F3_/extracted @@ -3,6 +3,6 @@ <tmp_path>/program.sql:<main>:4:1: Error: Execution of node: YtMap! SELECT ^ - <tmp_path>/program.sql:<main>:4:1: Error: Incorrect base - SELECT - ^
\ No newline at end of file + <tmp_path>/program.sql:<main>:8:14: Error: Incorrect base + Unicode::ToUint64(value, 1), + ^
\ No newline at end of file |
