diff options
author | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
---|---|---|
committer | Alexander Smirnov <alex@ydb.tech> | 2024-11-20 11:14:58 +0000 |
commit | 31773f157bf8164364649b5f470f52dece0a4317 (patch) | |
tree | 33d0f7eef45303ab68cf08ab381ce5e5e36c5240 /yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql | |
parent | 2c7938962d8689e175574fc1e817c05049f27905 (diff) | |
parent | eff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff) | |
download | ydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz |
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql')
-rw-r--r-- | yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql b/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql new file mode 100644 index 0000000000..f3c7e35b7d --- /dev/null +++ b/yql/essentials/tests/s-expressions/suites/Epochs/ReorderPragmas.yql @@ -0,0 +1,63 @@ +#USE plato; +#PRAGMA yt.InferSchema = "1"; +#PRAGMA yt.MaxRowWeight = "128m"; +#INSERT INTO Output +#select * from Input +#WHERE key != "0"; +#commit; +#PRAGMA yt.InferSchema = "3"; +#select * from Input; +#PRAGMA yt.MaxRowWeight = "128m"; +#PRAGMA yt.InferSchema = "1"; +#select * from Input +#WHERE key != "0"; + +( +(let source (DataSource 'yt 'plato)) +(let source_any (DataSource 'yt '"$all")) +(let sink (DataSink 'yt 'plato)) +(let result (DataSink 'result)) + +(let world (Configure! world source_any '"Attr" '"inferschema" '"1")) +(let world (Configure! world source_any '"Attr" '"maxrowweight" '"128m")) + +(let r (Read! world source (Key '('table (String '"Input"))) (Void) '())) +(let input (Right! r)) +(let world (Left! r)) + +(let filter (lambda '(item) (block '( + (let key (Member item '"key")) + (let res (Coalesce (!= key (String '"0")) (Bool 'false))) + (return res) +)))) + +(let out (Filter input filter)) + +(let world (Write! world sink (Key '('table (String '"Output"))) out '('('mode 'append)))) +(let world (Commit! world sink)) + +(let world (Configure! world source_any '"Attr" '"inferschema" '"3")) + +(let r (Read! world source (Key '('table (String '"Input"))) (Void) '())) +(let input (Right! r)) +(let world (Left! r)) + +(let world (Write! world result (Key) input '('('type) '('autoref)))) +(let world (Commit! world result)) + +(let world (Configure! world source_any '"Attr" '"maxrowweight" '"128m")) +(let world (Configure! world source_any '"Attr" '"inferschema" '"1")) + +(let r (Read! world source (Key '('table (String '"Input"))) (Void) '())) +(let input (Right! r)) +(let world (Left! r)) + +(let out (Filter input filter)) + +(let world (Write! world result (Key) out '('('type) '('autoref)))) + +(let world (Commit! world result)) +(let world (Commit! world sink)) + +(return world) +) |