diff options
author | Maxim Yurchuk <maxim-yurchuk@ydb.tech> | 2024-11-20 17:37:57 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-11-20 17:37:57 +0000 |
commit | f76323e9b295c15751e51e3443aa47a36bee8023 (patch) | |
tree | 4113c8cad473a33e0f746966e0cf087252fa1d7a /yql/essentials/tests/s-expressions/suites/TimeOrderRecover | |
parent | 753ecb8d410a4cb459c26f3a0082fb2d1724fe63 (diff) | |
parent | a7b9a6afea2a9d7a7bfac4c5eb4c1a8e60adb9e6 (diff) | |
download | ydb-f76323e9b295c15751e51e3443aa47a36bee8023.tar.gz |
Merge pull request #11788 from ydb-platform/mergelibs-241120-1113
Library import 241120-1113
Diffstat (limited to 'yql/essentials/tests/s-expressions/suites/TimeOrderRecover')
12 files changed, 133 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/ahead.yql b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/ahead.yql new file mode 100644 index 0000000000..b555f9f06c --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/ahead.yql @@ -0,0 +1,14 @@ +( +(let $1 (DataSink 'result)) +(let $2 (Right! (Read! world (DataSource '"yt" '"plato") (MrTableConcat (Key '('table (String '"Input")))) (Void) '()))) +(let inputFlow (ToFlow (PersistableRepr (OrderedSqlProject $2 '((SqlProjectStarItem (TypeOf $2) '"" (lambda '($4) $4) '())))))) +(let timeOrderRecover (TimeOrderRecover + inputFlow + (lambda '($3) (Member $3 '"ts")) + (Interval '-10) + (Interval '5) + (Uint32 '12) +)) +(let $3 (Write! world $1 (Key)(ForwardList timeOrderRecover)'('('type) '('autoref)))) +(return (CommitAll! (Commit! $3 $1))) +) diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/default.cfg b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/default.cfg new file mode 100644 index 0000000000..58878f8945 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/default.cfg @@ -0,0 +1 @@ +in Input input.txt diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/delayed.yql b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/delayed.yql new file mode 100644 index 0000000000..e72c6ab87e --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/delayed.yql @@ -0,0 +1,14 @@ +( +(let $1 (DataSink 'result)) +(let $2 (Right! (Read! world (DataSource '"yt" '"plato") (MrTableConcat (Key '('table (String '"Input")))) (Void) '()))) +(let inputFlow (ToFlow (PersistableRepr (OrderedSqlProject $2 '((SqlProjectStarItem (TypeOf $2) '"" (lambda '($4) $4) '())))))) +(let timeOrderRecover (TimeOrderRecover + inputFlow + (lambda '($3) (Member $3 '"ts")) + (Interval '-8) + (Interval '10) + (Uint32 '12) +)) +(let $3 (Write! world $1 (Key)(ForwardList timeOrderRecover)'('('type) '('autoref)))) +(return (CommitAll! (Commit! $3 $1))) +) diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/happy_path.yql b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/happy_path.yql new file mode 100644 index 0000000000..6e247b28bd --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/happy_path.yql @@ -0,0 +1,14 @@ +( +(let $1 (DataSink 'result)) +(let $2 (Right! (Read! world (DataSource '"yt" '"plato") (MrTableConcat (Key '('table (String '"Input")))) (Void) '()))) +(let inputFlow (ToFlow (PersistableRepr (OrderedSqlProject $2 '((SqlProjectStarItem (TypeOf $2) '"" (lambda '($4) $4) '())))))) +(let timeOrderRecover (TimeOrderRecover + inputFlow + (lambda '($3) (Member $3 '"ts")) + (Interval '-10) + (Interval '10) + (Uint32 '20) +)) +(let $3 (Write! world $1 (Key)(ForwardList timeOrderRecover)'('('type) '('autoref)))) +(return (CommitAll! (Commit! $3 $1))) +) diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/happy_path_tighter.yql b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/happy_path_tighter.yql new file mode 100644 index 0000000000..3844a8e284 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/happy_path_tighter.yql @@ -0,0 +1,14 @@ +( +(let $1 (DataSink 'result)) +(let $2 (Right! (Read! world (DataSource '"yt" '"plato") (MrTableConcat (Key '('table (String '"Input")))) (Void) '()))) +(let inputFlow (ToFlow (PersistableRepr (OrderedSqlProject $2 '((SqlProjectStarItem (TypeOf $2) '"" (lambda '($4) $4) '())))))) +(let timeOrderRecover (TimeOrderRecover + inputFlow + (lambda '($3) (Member $3 '"ts")) + (Interval '-9) + (Interval '10) + (Uint32 '12) +)) +(let $3 (Write! world $1 (Key)(ForwardList timeOrderRecover)'('('type) '('autoref)))) +(return (CommitAll! (Commit! $3 $1))) +) diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input.txt b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input.txt new file mode 100644 index 0000000000..995734fc7d --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input.txt @@ -0,0 +1,20 @@ +{"ts"=1000u; "col1"="a"}; +{"ts"=1009u; "col1"="aaa"}; +{"ts"=1001u; "col1"="a"}; +{"ts"=1003u; "col1"="aaa"}; +{"ts"=1002u; "col1"="aa"}; +{"ts"=1005u; "col1"="aa"}; +{"ts"=1004u; "col1"="a"}; +{"ts"=1006u; "col1"="aaa"}; +{"ts"=1015u; "col1"="aa"}; +{"ts"=1007u; "col1"="a"}; +{"ts"=1008u; "col1"="aa"}; +{"ts"=1010u; "col1"="aa"}; +{"ts"=1011u; "col1"="aaa"}; +{"ts"=1012u; "col1"="aa"}; +{"ts"=1013u; "col1"="aaa"}; +{"ts"=1014u; "col1"="a"}; +{"ts"=1016u; "col1"="aaa"}; +{"ts"=1017u; "col1"="aaa"}; +{"ts"=1018u; "col1"="a"}; +{"ts"=1019u; "col1"="aaa"}; diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input.txt.attr b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input.txt.attr new file mode 100644 index 0000000000..63d77d6812 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["ts";["DataType";"Timestamp"]]; + ["col1";["DataType";"String"]]; + ]]; +}} diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input_ordering.txt b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input_ordering.txt new file mode 100644 index 0000000000..1363c953b6 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input_ordering.txt @@ -0,0 +1,15 @@ +{"ts"=1000u; "col1"="a1"}; +{"ts"=1000u; "col1"="a2"}; +{"ts"=1000u; "col1"="a3"}; +{"ts"=1000u; "col1"="a4"}; +{"ts"=1000u; "col1"="a5"}; +{"ts"=1001u; "col1"="b1"}; +{"ts"=1001u; "col1"="b2"}; +{"ts"=1001u; "col1"="b3"}; +{"ts"=1001u; "col1"="b4"}; +{"ts"=1001u; "col1"="b5"}; +{"ts"=1002u; "col1"="c1"}; +{"ts"=1002u; "col1"="c2"}; +{"ts"=1002u; "col1"="c3"}; +{"ts"=1002u; "col1"="c4"}; +{"ts"=1002u; "col1"="c5"};
\ No newline at end of file diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input_ordering.txt.attr b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input_ordering.txt.attr new file mode 100644 index 0000000000..63d77d6812 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/input_ordering.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["ts";["DataType";"Timestamp"]]; + ["col1";["DataType";"String"]]; + ]]; +}} diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/ordering.cfg b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/ordering.cfg new file mode 100644 index 0000000000..144fceddb1 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/ordering.cfg @@ -0,0 +1 @@ +in Input input_ordering.txt diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/ordering.yql b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/ordering.yql new file mode 100644 index 0000000000..840af03240 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/ordering.yql @@ -0,0 +1,14 @@ +( +(let $1 (DataSink 'result)) +(let $2 (Right! (Read! world (DataSource '"yt" '"plato") (MrTableConcat (Key '('table (String '"Input")))) (Void) '()))) +(let inputFlow (ToFlow (PersistableRepr (OrderedSqlProject $2 '((SqlProjectStarItem (TypeOf $2) '"" (lambda '($4) $4) '())))))) +(let timeOrderRecover (TimeOrderRecover + inputFlow + (lambda '($3) (Member $3 '"ts")) + (Interval '-10) + (Interval '10) + (Uint32 '100) +)) +(let $3 (Write! world $1 (Key)(ForwardList timeOrderRecover)'('('type) '('autoref)))) +(return (CommitAll! (Commit! $3 $1))) +) diff --git a/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/row_limit.yql b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/row_limit.yql new file mode 100644 index 0000000000..1eec5d6236 --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/TimeOrderRecover/row_limit.yql @@ -0,0 +1,14 @@ +( +(let $1 (DataSink 'result)) +(let $2 (Right! (Read! world (DataSource '"yt" '"plato") (MrTableConcat (Key '('table (String '"Input")))) (Void) '()))) +(let inputFlow (ToFlow (PersistableRepr (OrderedSqlProject $2 '((SqlProjectStarItem (TypeOf $2) '"" (lambda '($4) $4) '())))))) +(let timeOrderRecover (TimeOrderRecover + inputFlow + (lambda '($3) (Member $3 '"ts")) + (Interval '-10) + (Interval '10) + (Uint32 '3) +)) +(let $3 (Write! world $1 (Key)(ForwardList timeOrderRecover)'('('type) '('autoref)))) +(return (CommitAll! (Commit! $3 $1))) +) |