File tree Expand file tree Collapse file tree 16 files changed +412
-33
lines changed
test.test_BlockStringUDF_ Expand file tree Collapse file tree 16 files changed +412
-33
lines changed Original file line number Diff line number Diff line change 27012701 ],
27022702 "test.test[view-system_udf--Debug]" : [
27032703 {
2704- "checksum" : " 4c89feecc12bb761d7c286cd68f0a0d9 " ,
2705- "size" : 1913 ,
2706- "uri" : " https://{canondata_backend}/1936997/93899b3de50fae3f9677baacc98094a7a629590a /resource.tar.gz#test.test_view-system_udf--Debug_/opt.yql_patched"
2704+ "checksum" : " 713d145392bd9acad8aa842dea972c3c " ,
2705+ "size" : 1926 ,
2706+ "uri" : " https://{canondata_backend}/1903885/2da0f73cb9a37f1ac161dd6dc86492d6ea33f7da /resource.tar.gz#test.test_view-system_udf--Debug_/opt.yql_patched"
27072707 }
27082708 ],
27092709 "test.test[view-system_udf--Plan]" : [
Original file line number Diff line number Diff line change 671671 ],
672672 "test.test[csee-yql-7237--Debug]" : [
673673 {
674- "checksum" : " b767adfc92f688e5a8de2beda8281abf " ,
675- "size" : 5164 ,
676- "uri" : " https://{canondata_backend}/1814674/596b6881e4e692acb2f60c77f02abe1dfca443e9 /resource.tar.gz#test.test_csee-yql-7237--Debug_/opt.yql_patched"
674+ "checksum" : " 5f2e95bf587ba9783b26f8c764c55343 " ,
675+ "size" : 5177 ,
676+ "uri" : " https://{canondata_backend}/1937367/7b7d3406bd73e757a0d1fdeafae5df9757f3a7bc /resource.tar.gz#test.test_csee-yql-7237--Debug_/opt.yql_patched"
677677 }
678678 ],
679679 "test.test[csee-yql-7237--Plan]" : [
Original file line number Diff line number Diff line change 27752775 ],
27762776 "test.test[window-win_func_order_by_udf_empty_rank--Debug]" : [
27772777 {
2778- "checksum" : " a600c5cb3146df18222057da6013ff57 " ,
2779- "size" : 3303 ,
2780- "uri" : " https://{canondata_backend}/1784826/fd4cc2f7af6fc79fb1fbaf0c17095673db944f7a /resource.tar.gz#test.test_window-win_func_order_by_udf_empty_rank--Debug_/opt.yql_patched"
2778+ "checksum" : " 671affd56e33dd6cac828a299255b11e " ,
2779+ "size" : 3316 ,
2780+ "uri" : " https://{canondata_backend}/1924537/c5db08849456fd743b1ee29541c5e4a60ede833f /resource.tar.gz#test.test_window-win_func_order_by_udf_empty_rank--Debug_/opt.yql_patched"
27812781 }
27822782 ],
27832783 "test.test[window-win_func_order_by_udf_empty_rank--Plan]" : [
Original file line number Diff line number Diff line change 617617 ],
618618 "test.test[csee-yql-7237--Debug]" : [
619619 {
620- "checksum" : " bafe318973c66327c44e0fe1a4297b63 " ,
621- "size" : 10675 ,
622- "uri" : " https://{canondata_backend}/1773845/06318af62e5da72747e6343c15ed6d2ac79bfaf0 /resource.tar.gz#test.test_csee-yql-7237--Debug_/opt.yql_patched"
620+ "checksum" : " d41f93842f4edd4c9fc31395ffe70838 " ,
621+ "size" : 10688 ,
622+ "uri" : " https://{canondata_backend}/1777230/216d4e6d62fea8f58776a41a12ef7ca23fab393c /resource.tar.gz#test.test_csee-yql-7237--Debug_/opt.yql_patched"
623623 }
624624 ],
625625 "test.test[csee-yql-7237--Plan]" : [
27312731 ],
27322732 "test.test[window-win_func_order_by_udf_empty_rank--Debug]" : [
27332733 {
2734- "checksum" : " 255119b18c8fc481cc8ac4797c43eeaa " ,
2735- "size" : 4387 ,
2736- "uri" : " https://{canondata_backend}/1773845/06318af62e5da72747e6343c15ed6d2ac79bfaf0 /resource.tar.gz#test.test_window-win_func_order_by_udf_empty_rank--Debug_/opt.yql_patched"
2734+ "checksum" : " 64a3b7027319e8dcc7a09ed4dcc533a0 " ,
2735+ "size" : 4400 ,
2736+ "uri" : " https://{canondata_backend}/1777230/216d4e6d62fea8f58776a41a12ef7ca23fab393c /resource.tar.gz#test.test_window-win_func_order_by_udf_empty_rank--Debug_/opt.yql_patched"
27372737 }
27382738 ],
27392739 "test.test[window-win_func_order_by_udf_empty_rank--Plan]" : [
Original file line number Diff line number Diff line change 26472647 ],
26482648 "test.test[view-system_udf--Debug]" : [
26492649 {
2650- "checksum" : " 5d2d6012880259ee1ec3ec07a648e71c " ,
2651- "size" : 2647 ,
2652- "uri" : " https://{canondata_backend}/212715/b9f267b2022a251b638e7a1f1ebeb788c308ed2f /resource.tar.gz#test.test_view-system_udf--Debug_/opt.yql_patched"
2650+ "checksum" : " 1adbe5bf7421b8a95bf7be16d29a10f0 " ,
2651+ "size" : 2660 ,
2652+ "uri" : " https://{canondata_backend}/1889210/2dae1c5fad742ec810acd62ae7ea2470f7db3f6e /resource.tar.gz#test.test_view-system_udf--Debug_/opt.yql_patched"
26532653 }
26542654 ],
26552655 "test.test[view-system_udf--Plan]" : [
Original file line number Diff line number Diff line change 26822682 ],
26832683 "test.test[view-system_udf--Debug]" : [
26842684 {
2685- "checksum" : " 54856668ae61fbe9841230f05cac3785 " ,
2686- "size" : 1995 ,
2687- "uri" : " https://{canondata_backend}/212715/e1bc1d6e31fa656365a738e65224a7c3f774bae6 /resource.tar.gz#test.test_view-system_udf--Debug_/opt.yql"
2685+ "checksum" : " 34a45459b156d0fec9414209c6f96d5f " ,
2686+ "size" : 2008 ,
2687+ "uri" : " https://{canondata_backend}/1937367/2da4c4972d9611e6d436df6f08563470944ebfa6 /resource.tar.gz#test.test_view-system_udf--Debug_/opt.yql"
26882688 }
26892689 ],
26902690 "test.test[view-system_udf--Plan]" : [
Original file line number Diff line number Diff line change 627627 ],
628628 "test.test[csee-yql-7237--Debug]" : [
629629 {
630- "checksum" : " 6475d5d6a1a57e719cf52732c721ab9c " ,
631- "size" : 9449 ,
632- "uri" : " https://{canondata_backend}/1942173/13ba7b5baedaca7ddec0432ccede2666d8739ef4 /resource.tar.gz#test.test_csee-yql-7237--Debug_/opt.yql"
630+ "checksum" : " 3265bb2200dbebd0c5ed5f2b67ca4062 " ,
631+ "size" : 9462 ,
632+ "uri" : " https://{canondata_backend}/1777230/396a1d533b924a50e79a9801559f809bbe35c7d0 /resource.tar.gz#test.test_csee-yql-7237--Debug_/opt.yql"
633633 }
634634 ],
635635 "test.test[csee-yql-7237--Plan]" : [
Original file line number Diff line number Diff line change 24582458 ],
24592459 "test.test[window-win_func_order_by_udf_empty_rank--Debug]" : [
24602460 {
2461- "checksum" : " d5f2a3cb61003a4a54a1d627ee73b686 " ,
2462- "size" : 3619 ,
2463- "uri" : " https://{canondata_backend}/1781765/c6c4741c6e6726e0705a9922b386a839af2165b7 /resource.tar.gz#test.test_window-win_func_order_by_udf_empty_rank--Debug_/opt.yql"
2461+ "checksum" : " 05bd52192722ac8eab58b43a3c3b45e5 " ,
2462+ "size" : 3632 ,
2463+ "uri" : " https://{canondata_backend}/1903885/c538922f8562634bbdc4a4aaa3f4496e1b9331b5 /resource.tar.gz#test.test_window-win_func_order_by_udf_empty_rank--Debug_/opt.yql"
24642464 }
24652465 ],
24662466 "test.test[window-win_func_order_by_udf_empty_rank--Plan]" : [
Original file line number Diff line number Diff line change @@ -31,12 +31,26 @@ using namespace NUdf;
3131
3232namespace {
3333
34- #define STRING_UDF (udfName, function ) \
35- SIMPLE_STRICT_UDF (T##udfName, char *(TAutoMap<char *>)) { \
36- const TString input (args[0 ].AsStringRef ()); \
37- const auto & result = function (input); \
38- return valueBuilder->NewString (result); \
39- }
34+ #define STRING_UDF (udfName, function ) \
35+ BEGIN_SIMPLE_STRICT_ARROW_UDF (T##udfName, char *(TAutoMap<char *>)) { \
36+ const TString input (args[0 ].AsStringRef ()); \
37+ const auto & result = function (input); \
38+ return valueBuilder->NewString (result); \
39+ } \
40+ \
41+ struct T ##udfName##KernelExec \
42+ : public TUnaryKernelExec<T##udfName##KernelExec> \
43+ { \
44+ template <typename TSink> \
45+ static void Process (TBlockItem arg1, const TSink& sink) { \
46+ const TString input (arg1.AsStringRef ()); \
47+ const auto & result = function (input); \
48+ sink (TBlockItem (result)); \
49+ } \
50+ }; \
51+ \
52+ END_SIMPLE_ARROW_UDF (T##udfName, T##udfName##KernelExec::Do)
53+
4054
4155// 'unsafe' udf is actually strict - it returns null on any exception
4256#define STRING_UNSAFE_UDF (udfName, function ) \
Original file line number Diff line number Diff line change 1414 "uri" : " file://test.test_BlockFind_/results.txt"
1515 }
1616 ],
17+ "test.test[BlockStringUDF]" : [
18+ {
19+ "uri" : " file://test.test_BlockStringUDF_/results.txt"
20+ }
21+ ],
1722 "test.test[ExtendAndTake]" : [
1823 {
1924 "uri" : " file://test.test_ExtendAndTake_/results.txt"
5459 "uri" : " file://test.test_StreamFormat_/results.txt"
5560 }
5661 ],
62+ "test.test[StringUDF]" : [
63+ {
64+ "uri" : " file://test.test_StringUDF_/results.txt"
65+ }
66+ ],
5767 "test.test[To]" : [
5868 {
5969 "uri" : " file://test.test_To_/results.txt"
You can’t perform that action at this time.
0 commit comments