diff options
author | Maxim Yurchuk <maxim-yurchuk@ydb.tech> | 2024-11-30 22:18:35 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-30 22:18:35 +0000 |
commit | b2a5d3a720980a7304cdf814082ebed47bbf1191 (patch) | |
tree | 7ee20fb54151a1468759da4feee3de61f013ff7d /yql/essentials/tests/s-expressions/suites/Udf | |
parent | 7466d62733bffe5cb040f37b21c5a9a4ad174353 (diff) | |
parent | b4cba2872f6348770b561394bef1668f54abfe27 (diff) | |
download | ydb-b2a5d3a720980a7304cdf814082ebed47bbf1191.tar.gz |
Merge pull request #12156 from ydb-platform/mergelibs-241130-1815
Library import 241130-1815
Diffstat (limited to 'yql/essentials/tests/s-expressions/suites/Udf')
22 files changed, 47 insertions, 47 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/Udf/AutoMapMany.cfg b/yql/essentials/tests/s-expressions/suites/Udf/AutoMapMany.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/AutoMapMany.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/AutoMapMany.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/AutoMapMany.yql b/yql/essentials/tests/s-expressions/suites/Udf/AutoMapMany.yql index e179419a5c..6e29b890b9 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/AutoMapMany.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/AutoMapMany.yql @@ -42,7 +42,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf0) (Int32 '"1") (Int32 '"2") (Int32 '"3"))))) + (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf0) (Int32 '"1") (Int32 '"2") (Int32 '"3"))))) (let res (AsList res)) (return res) ))))) @@ -62,7 +62,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf1) ("Just" (Int32 '"1")) (Int32 '"2") (Int32 '"3"))))) + (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf1) ("Just" (Int32 '"1")) (Int32 '"2") (Int32 '"3"))))) (let res (AsList res)) (return res) ))))) @@ -82,7 +82,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf2) ("Just" (Int32 '"1")) ("Just" (Int32 '"2")) (Int32 '"3"))))) + (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf2) ("Just" (Int32 '"1")) ("Just" (Int32 '"2")) (Int32 '"3"))))) (let res (AsList res)) (return res) ))))) @@ -102,7 +102,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf3) ("Just" (Int32 '"1")) ("Just" (Int32 '"2")) ("Just" (Int32 '"3")))))) + (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf3) ("Just" (Int32 '"1")) ("Just" (Int32 '"2")) ("Just" (Int32 '"3")))))) (let res (AsList res)) (return res) ))))) @@ -122,7 +122,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf4) (Int32 '"4") (Int32 '"5") (Int32 '"6"))))) + (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf4) (Int32 '"4") (Int32 '"5") (Int32 '"6"))))) (let res (AsList res)) (return res) ))))) @@ -142,7 +142,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf5) ("Just" (Int32 '"4")) (Int32 '"5") (Int32 '"6"))))) + (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf5) ("Just" (Int32 '"4")) (Int32 '"5") (Int32 '"6"))))) (let res (AsList res)) (return res) ))))) @@ -162,7 +162,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf6) ("Just" (Int32 '"4")) ("Just" (Int32 '"5")) (Int32 '"6"))))) + (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf6) ("Just" (Int32 '"4")) ("Just" (Int32 '"5")) (Int32 '"6"))))) (let res (AsList res)) (return res) ))))) @@ -182,7 +182,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf7) ("Just" (Int32 '"4")) ("Just" (Int32 '"5")) ("Just" (Int32 '"6")))))) + (let res (AsStruct '('"column0" ("Apply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1) '((DataType 'Int32) '"" '1)) scriptudf7) ("Just" (Int32 '"4")) ("Just" (Int32 '"5")) ("Just" (Int32 '"6")))))) (let res (AsList res)) (return res) ))))) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/AutoMapManyNamed.cfg b/yql/essentials/tests/s-expressions/suites/Udf/AutoMapManyNamed.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/AutoMapManyNamed.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/AutoMapManyNamed.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/AutoMapManyNamed.yql b/yql/essentials/tests/s-expressions/suites/Udf/AutoMapManyNamed.yql index 2225ad9b7e..64c30fb142 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/AutoMapManyNamed.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/AutoMapManyNamed.yql @@ -58,7 +58,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf0) '() (AsStruct '('x (Int32 '"1")) '('y (Int32 '"2")) '('z (Int32 '"3"))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf0) '() (AsStruct '('x (Int32 '"1")) '('y (Int32 '"2")) '('z (Int32 '"3"))))))) (let res (AsList res)) (return res) ))))) @@ -78,7 +78,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf1) '() (AsStruct '('x ("Just" (Int32 '"1"))) '('y (Int32 '"2")) '('z (Int32 '"3"))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf1) '() (AsStruct '('x ("Just" (Int32 '"1"))) '('y (Int32 '"2")) '('z (Int32 '"3"))))))) (let res (AsList res)) (return res) ))))) @@ -98,7 +98,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf2) '() (AsStruct '('x ("Just" (Int32 '"1"))) '('y ("Just" (Int32 '"2"))) '('z (Int32 '"3"))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf2) '() (AsStruct '('x ("Just" (Int32 '"1"))) '('y ("Just" (Int32 '"2"))) '('z (Int32 '"3"))))))) (let res (AsList res)) (return res) ))))) @@ -118,7 +118,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf3) '() (AsStruct '('x ("Just" (Int32 '"1"))) '('y ("Just" (Int32 '"2"))) '('z ("Just" (Int32 '"3")))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf3) '() (AsStruct '('x ("Just" (Int32 '"1"))) '('y ("Just" (Int32 '"2"))) '('z ("Just" (Int32 '"3")))))))) (let res (AsList res)) (return res) ))))) @@ -138,7 +138,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf4) '(("Just" (Int32 '"1"))) (AsStruct '('y ("Just" (Int32 '"2"))) '('z ("Just" (Int32 '"3")))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf4) '(("Just" (Int32 '"1"))) (AsStruct '('y ("Just" (Int32 '"2"))) '('z ("Just" (Int32 '"3")))))))) (let res (AsList res)) (return res) ))))) @@ -158,7 +158,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf5) '(("Just" (Int32 '"1")) ("Just" (Int32 '"2"))) (AsStruct '('z ("Just" (Int32 '"3")))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((DataType 'Int32)) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf5) '(("Just" (Int32 '"1")) ("Just" (Int32 '"2"))) (AsStruct '('z ("Just" (Int32 '"3")))))))) (let res (AsList res)) (return res) ))))) @@ -178,7 +178,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf6) '() (AsStruct '('x (Int32 '"4")) '('y (Int32 '"5")) '('z (Int32 '"6"))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf6) '() (AsStruct '('x (Int32 '"4")) '('y (Int32 '"5")) '('z (Int32 '"6"))))))) (let res (AsList res)) (return res) ))))) @@ -198,7 +198,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf7) '() (AsStruct '('x ("Just" (Int32 '"4"))) '('y (Int32 '"5")) '('z (Int32 '"6"))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf7) '() (AsStruct '('x ("Just" (Int32 '"4"))) '('y (Int32 '"5")) '('z (Int32 '"6"))))))) (let res (AsList res)) (return res) ))))) @@ -218,7 +218,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf8) '() (AsStruct '('x ("Just" (Int32 '"4"))) '('y ("Just" (Int32 '"5"))) '('z (Int32 '"6"))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf8) '() (AsStruct '('x ("Just" (Int32 '"4"))) '('y ("Just" (Int32 '"5"))) '('z (Int32 '"6"))))))) (let res (AsList res)) (return res) ))))) @@ -238,7 +238,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf9) '() (AsStruct '('x ("Just" (Int32 '"4"))) '('y ("Just" (Int32 '"5"))) '('z ("Just" (Int32 '"6")))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf9) '() (AsStruct '('x ("Just" (Int32 '"4"))) '('y ("Just" (Int32 '"5"))) '('z ("Just" (Int32 '"6")))))))) (let res (AsList res)) (return res) ))))) @@ -258,7 +258,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf10) '(("Just" (Int32 '"4"))) (AsStruct '('y ("Just" (Int32 '"5"))) '('z ("Just" (Int32 '"6")))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf10) '(("Just" (Int32 '"4"))) (AsStruct '('y ("Just" (Int32 '"5"))) '('z ("Just" (Int32 '"6")))))))) (let res (AsList res)) (return res) ))))) @@ -278,7 +278,7 @@ def f(x,y,z): (let select (block '( (let core (AsList (Uint32 '0))) (let core (FlatMap core (lambda '(row) (block '( - (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf11) '(("Just" (Int32 '"4")) ("Just" (Int32 '"5"))) (AsStruct '('z ("Just" (Int32 '"6")))))))) + (let res (AsStruct '('"column0" ("NamedApply" (ScriptUdf 'Python3 '"f" (CallableType '() '((OptionalType (DataType 'Int32))) '((DataType 'Int32) 'x '1) '((DataType 'Int32) 'y '1) '((DataType 'Int32) 'z '1)) scriptudf11) '(("Just" (Int32 '"4")) ("Just" (Int32 '"5"))) (AsStruct '('z ("Just" (Int32 '"6")))))))) (let res (AsList res)) (return res) ))))) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonAvg.cfg b/yql/essentials/tests/s-expressions/suites/Udf/PythonAvg.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonAvg.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonAvg.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonAvg.yql b/yql/essentials/tests/s-expressions/suites/Udf/PythonAvg.yql index 62dc07db05..9029469690 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonAvg.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonAvg.yql @@ -32,9 +32,9 @@ def avg_result(avg): @@)) -(let avgCreate (ScriptUdf 'Python 'avg_create (CallableType '() '(rt)) udfScript)) -(let avgAdd (ScriptUdf 'Python 'avg_add (CallableType '() '(rt) '(rt) '(ui32)) udfScript)) -(let avgResult (ScriptUdf 'Python 'avg_result (CallableType '() '(dbl) '(rt)) udfScript)) +(let avgCreate (ScriptUdf 'Python3 'avg_create (CallableType '() '(rt)) udfScript)) +(let avgAdd (ScriptUdf 'Python3 'avg_add (CallableType '() '(rt) '(rt) '(ui32)) udfScript)) +(let avgResult (ScriptUdf 'Python3 'avg_result (CallableType '() '(dbl) '(rt)) udfScript)) # data (let x (Uint32 '10)) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsArg.cfg b/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsArg.cfg index 0bffbd4f08..d24419e54e 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsArg.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsArg.cfg @@ -1,5 +1,5 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf udf simple_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsArg.yql b/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsArg.yql index 36a70677e4..29a7d26a0a 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsArg.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsArg.yql @@ -14,9 +14,9 @@ (let udfType (CallableType '() '(str) '(funcType) '(ui64))) (let udfScript (String '@@ def new_string(func, x): - return func('x', x) + ':' + func('y', x) + return func(b'x', x) + b':' + func(b'y', x) @@)) -(let udf (ScriptUdf 'Python 'new_string udfType udfScript)) +(let udf (ScriptUdf 'Python3 'new_string udfType udfScript)) # call udf (let x (Uint64 '3)) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsResult.cfg b/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsResult.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsResult.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsResult.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsResult.yql b/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsResult.yql index 7a7a6a995a..887526632b 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsResult.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonCallableAsResult.yql @@ -19,7 +19,7 @@ def create_counter(start): return counter @@)) -(let udf (ScriptUdf 'Python 'create_counter udfType udfScript)) +(let udf (ScriptUdf 'Python3 'create_counter udfType udfScript)) # call udf (let counter (Apply udf (Uint64 '1))) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonGenerator.cfg b/yql/essentials/tests/s-expressions/suites/Udf/PythonGenerator.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonGenerator.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonGenerator.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonGenerator.yql b/yql/essentials/tests/s-expressions/suites/Udf/PythonGenerator.yql index d225a14c1b..b6e6a00171 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonGenerator.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonGenerator.yql @@ -8,11 +8,11 @@ (let udfScript (String '@@ def g0(): def gen(): - for x in xrange(1, 4): - yield long(x + 42) + for x in range(1, 4): + yield int(x + 42) return gen @@)) -(let udf (ScriptUdf 'Python 'g0 udfType udfScript)) +(let udf (ScriptUdf 'Python3 'g0 udfType udfScript)) # call udf (let result (Apply udf)) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorExprWithClosure.cfg b/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorExprWithClosure.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorExprWithClosure.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorExprWithClosure.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorExprWithClosure.yql b/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorExprWithClosure.yql index 86a1c9a0bb..164f870ec8 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorExprWithClosure.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorExprWithClosure.yql @@ -8,10 +8,10 @@ (let udfScript (String '@@ def g(input): def gen(): - return (long(x + 42) for x in input) + return (int(x + 42) for x in input) return gen @@)) -(let udf (ScriptUdf 'Python 'g udfType udfScript)) +(let udf (ScriptUdf 'Python3 'g udfType udfScript)) # call udf (let result (Apply udf (AsList (Int64 '1) (Int64 '2) (Int64 '3)))) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorWithClosure.cfg b/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorWithClosure.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorWithClosure.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorWithClosure.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorWithClosure.yql b/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorWithClosure.yql index 87799cbf69..2c9a022cae 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorWithClosure.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonGeneratorWithClosure.yql @@ -9,10 +9,10 @@ def h(input): def gen(): for x in input: - yield long(x + 42) + yield int(x + 42) return gen @@)) -(let udf (ScriptUdf 'Python 'h udfType udfScript)) +(let udf (ScriptUdf 'Python3 'h udfType udfScript)) # call udf (let result (Apply udf (AsList (Int64 '1) (Int64 '2) (Int64 '3)))) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonPartialCall.cfg b/yql/essentials/tests/s-expressions/suites/Udf/PythonPartialCall.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonPartialCall.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonPartialCall.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonPartialCall.yql b/yql/essentials/tests/s-expressions/suites/Udf/PythonPartialCall.yql index f45e2d9157..1a7f7f9dbd 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonPartialCall.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonPartialCall.yql @@ -6,7 +6,7 @@ (let ui32 (DataType 'Uint32)) (let udfType (CallableType '('1) '(ui32) '(ui32) '((OptionalType ui32)))) (let udfScript (String '"def Add(x, y): return x + (y if y is not None else 1)")) -(let udf (ScriptUdf 'Python 'Add udfType udfScript)) +(let udf (ScriptUdf 'Python3 'Add udfType udfScript)) # call udf (let x (Uint32 '20)) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonStruct.cfg b/yql/essentials/tests/s-expressions/suites/Udf/PythonStruct.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonStruct.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonStruct.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonStruct.yql b/yql/essentials/tests/s-expressions/suites/Udf/PythonStruct.yql index 38a484a4c3..89e0bd435d 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonStruct.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonStruct.yql @@ -18,7 +18,7 @@ def NewPerson(name, age): return Person(name, age) @@)) -(let udf (ScriptUdf 'Python 'NewPerson udfType udfScript)) +(let udf (ScriptUdf 'Python3 'NewPerson udfType udfScript)) # call udf (let result (Apply udf (String 'Jamel) (Uint32 '99))) diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonSum.cfg b/yql/essentials/tests/s-expressions/suites/Udf/PythonSum.cfg index 0bbf3ad9f0..aa782f323c 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonSum.cfg +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonSum.cfg @@ -1,4 +1,4 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Udf/PythonSum.yql b/yql/essentials/tests/s-expressions/suites/Udf/PythonSum.yql index b240dc0f58..ef5f4e1549 100644 --- a/yql/essentials/tests/s-expressions/suites/Udf/PythonSum.yql +++ b/yql/essentials/tests/s-expressions/suites/Udf/PythonSum.yql @@ -6,7 +6,7 @@ (let ui32 (DataType 'Uint32)) (let udfType (CallableType '() '(ui32) '(ui32) '(ui32))) (let udfScript (String '"def Sum(x, y): return x + y")) -(let udf (ScriptUdf 'Python 'Sum udfType udfScript)) +(let udf (ScriptUdf 'Python3 'Sum udfType udfScript)) # call udf (let x (Uint32 '10)) |