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/Optimizers | |
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/Optimizers')
9 files changed, 21 insertions, 18 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterLReduce.cfg b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterLReduce.cfg index 0bbf3ad9f0..62b2a5fe18 100644 --- a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterLReduce.cfg +++ b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterLReduce.cfg @@ -1,4 +1,5 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf +providers dummy diff --git a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterLReduce.yql b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterLReduce.yql index cc5b60392b..3df99f0f47 100644 --- a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterLReduce.yql +++ b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterLReduce.yql @@ -25,7 +25,7 @@ (return select) ))) (let core (LMap inputRowsList (lambda '(x) (block '( - (let inputType (CallableArgumentType (TypeOf (ScriptUdf 'Python '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ + (let inputType (CallableArgumentType (TypeOf (ScriptUdf 'Python3 '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ def f(input,x): for i in list(input): d = i.__dict__ @@ -33,7 +33,7 @@ def f(input,x): yield d @@))) '0)) (let inputRowsList (MatchType inputType 'List (lambda '(y) (ForwardList x)) (lambda '(y) "x"))) - (return (Apply (ScriptUdf 'Python '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ + (return (Apply (ScriptUdf 'Python3 '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ def f(input,x): for i in list(input): d = i.__dict__ @@ -46,7 +46,7 @@ def f(input,x): (return select) ))) (let core (LMap inputRowsList (lambda '(x) (block '( - (let inputType (CallableArgumentType (TypeOf (ScriptUdf 'Python '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ + (let inputType (CallableArgumentType (TypeOf (ScriptUdf 'Python3 '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ def f(input,x): for i in list(input): d = i.__dict__ @@ -54,7 +54,7 @@ def f(input,x): yield d @@))) '0)) (let inputRowsList (MatchType inputType 'List (lambda '(y) (ForwardList x)) (lambda '(y) "x"))) - (return (Apply (ScriptUdf 'Python '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ + (return (Apply (ScriptUdf 'Python3 '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ def f(input,x): for i in list(input): d = i.__dict__ diff --git a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterReduce.cfg b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterReduce.cfg index 0bbf3ad9f0..62b2a5fe18 100644 --- a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterReduce.cfg +++ b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterReduce.cfg @@ -1,4 +1,5 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf +providers dummy diff --git a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterReduce.yql b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterReduce.yql index 1f806dc3a3..3e8637fc54 100644 --- a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterReduce.yql +++ b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseLMapAfterReduce.yql @@ -23,7 +23,7 @@ (return select) ))) (let core (LMap inputRowsList (lambda '(x) (block '( - (let inputType (CallableArgumentType (TypeOf (ScriptUdf 'Python '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ + (let inputType (CallableArgumentType (TypeOf (ScriptUdf 'Python3 '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ def f(input,x): for i in list(input): d = i.__dict__ @@ -31,7 +31,7 @@ def f(input,x): yield d @@))) '0)) (let inputRowsList (MatchType inputType 'List (lambda '(y) (ForwardList x)) (lambda '(y) "x"))) - (return (Apply (ScriptUdf 'Python '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ + (return (Apply (ScriptUdf 'Python3 '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ def f(input,x): for i in list(input): d = i.__dict__ diff --git a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseMapAfterLReduce.cfg b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseMapAfterLReduce.cfg index 0bbf3ad9f0..62b2a5fe18 100644 --- a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseMapAfterLReduce.cfg +++ b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseMapAfterLReduce.cfg @@ -1,4 +1,5 @@ in Input input.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf +providers dummy diff --git a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseMapAfterLReduce.yql b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseMapAfterLReduce.yql index ea138e481a..5656d60fc3 100644 --- a/yql/essentials/tests/s-expressions/suites/Optimizers/FuseMapAfterLReduce.yql +++ b/yql/essentials/tests/s-expressions/suites/Optimizers/FuseMapAfterLReduce.yql @@ -25,24 +25,24 @@ (return select) ))) (let core (LMap inputRowsList (lambda '(x) (block '( - (let inputType (CallableArgumentType (TypeOf (ScriptUdf 'Python '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ + (let inputType (CallableArgumentType (TypeOf (ScriptUdf 'Python3 '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ def f(input,x): for i in list(input): d = i.__dict__ d["pass"] = x yield d - + def f2(a,b,c): return {"a":a,"b":b,"c":c} @@))) '0)) (let inputRowsList (MatchType inputType 'List (lambda '(y) (ForwardList x)) (lambda '(y) "x"))) - (return (Apply (ScriptUdf 'Python '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ + (return (Apply (ScriptUdf 'Python3 '"f" (CallableType '() '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"pass" (DataType 'Int32)) '('"skey" (DataType 'Uint32))))) '((StreamType (StructType '('"cnt" (DataType 'Uint64)) '('"skey" (DataType 'Uint32))))) '((DataType 'Int32))) (String '@@ def f(input,x): for i in list(input): d = i.__dict__ d["pass"] = x yield d - + def f2(a,b,c): return {"a":a,"b":b,"c":c} @@)) inputRowsList (Int32 '"1"))) @@ -52,13 +52,13 @@ def f2(a,b,c): (return select) ))) (let core (FlatMap core (lambda '(row) (block '( - (let res (Apply (ScriptUdf 'Python '"f2" (CallableType '() '((StructType '('"a" (DataType 'Uint32)) '('"b" (DataType 'Uint64)) '('"c" (DataType 'Int32)))) '((DataType 'Uint32) 'skey) '((DataType 'Uint64) 'cnt) '((DataType 'Int32) 'pass)) (String '@@ + (let res (Apply (ScriptUdf 'Python3 '"f2" (CallableType '() '((StructType '('"a" (DataType 'Uint32)) '('"b" (DataType 'Uint64)) '('"c" (DataType 'Int32)))) '((DataType 'Uint32) 'skey) '((DataType 'Uint64) 'cnt) '((DataType 'Int32) 'pass)) (String '@@ def f(input,x): for i in list(input): d = i.__dict__ d["pass"] = x yield d - + def f2(a,b,c): return {"a":a,"b":b,"c":c} @@)) (Member row '"skey") (Member row '"cnt") (Member row '"pass"))) diff --git a/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionByWithInnerSort.cfg b/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionByWithInnerSort.cfg index bc0dfe8e18..f3abc496dd 100644 --- a/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionByWithInnerSort.cfg +++ b/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionByWithInnerSort.cfg @@ -1,4 +1,4 @@ in Input SomeKeys.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf diff --git a/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionByWithInnerSort.yql b/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionByWithInnerSort.yql index a245de4f18..7b776d078b 100644 --- a/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionByWithInnerSort.yql +++ b/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionByWithInnerSort.yql @@ -8,7 +8,7 @@ def MyTuple(one, two): return (one, two) @@)) - (let udf (ScriptUdf 'Python 'MyTuple udfType udfScript)) + (let udf (ScriptUdf 'Python3 'MyTuple udfType udfScript)) (let mr_source (DataSource 'yt 'plato)) (let x (Read! world mr_source (Key '('table (String 'Input))) (Void) '())) diff --git a/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionsByWithInnerSort.cfg b/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionsByWithInnerSort.cfg index bc0dfe8e18..f3abc496dd 100644 --- a/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionsByWithInnerSort.cfg +++ b/yql/essentials/tests/s-expressions/suites/Optimizers/PartitionsByWithInnerSort.cfg @@ -1,4 +1,4 @@ in Input SomeKeys.txt out Output output.txt res result.txt -udf python2_udf +udf python3_udf |