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/sql/suites/action/eval_column.sql | |
parent | 2c7938962d8689e175574fc1e817c05049f27905 (diff) | |
parent | eff600952d5dfe17942f38f510a8ac2b203bb3a5 (diff) | |
download | ydb-31773f157bf8164364649b5f470f52dece0a4317.tar.gz |
Merge branch 'rightlib' into mergelibs-241120-1113
Diffstat (limited to 'yql/essentials/tests/sql/suites/action/eval_column.sql')
-rw-r--r-- | yql/essentials/tests/sql/suites/action/eval_column.sql | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/action/eval_column.sql b/yql/essentials/tests/sql/suites/action/eval_column.sql new file mode 100644 index 0000000000..98838fb5fe --- /dev/null +++ b/yql/essentials/tests/sql/suites/action/eval_column.sql @@ -0,0 +1,34 @@ +/* syntax version 1 */ +/* postgres can not */ +use plato; + +$x = CAST(Unicode::ToLower("foo"u) AS String); +select AsStruct("1" as foo, 2 as bar).$x; + +$x = CAST(Unicode::ToLower("value"u) AS String); +select key, t.$x from Input as t order by key; + +$x = CAST(Unicode::ToLower("value"u) AS String); +select key, TableRow().$x from Input order by key; + + +$x = CAST(Unicode::ToLower("value"u) AS String); +select * from Input as t order by t.$x; + +$x = CAST(Unicode::ToLower("value"u) AS String); +$y = CAST(Unicode::ToLower("key"u) AS String); + +select x,count(*) from Input as t group by t.$x as x +having min(t.$y) != "" +order by x; + +select a.$x as x,b.$y as y from Input as a join Input as b on (a.$x = b.$x) +order by x; + +select a.$x as x,b.$y as y from Input as a join Input as b using ($x) +order by x; + +select p, value, lag(value) over w as lag +from Input +window w as (partition by TableRow().$y as p order by TableRow().$x) +order by p, value; |