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/blocks | |
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/blocks')
402 files changed, 6362 insertions, 0 deletions
diff --git a/yql/essentials/tests/sql/suites/blocks/add_decimal.cfg b/yql/essentials/tests/sql/suites/blocks/add_decimal.cfg new file mode 100644 index 0000000000..a21c6560ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_decimal.cfg @@ -0,0 +1 @@ +in Input input_decimal.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_decimal.sql b/yql/essentials/tests/sql/suites/blocks/add_decimal.sql new file mode 100644 index 0000000000..648a3709d5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_decimal.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + cs_ext_list_price+cs_sales_price,cast(1 as decimal(7,2))+cs_ext_list_price,cs_sales_price+cast(2ul as decimal(7,2)) +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/add_int16.cfg b/yql/essentials/tests/sql/suites/blocks/add_int16.cfg new file mode 100644 index 0000000000..b122c34208 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_int16.cfg @@ -0,0 +1 @@ +in Input input_int16.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_int16.sql b/yql/essentials/tests/sql/suites/blocks/add_int16.sql new file mode 100644 index 0000000000..5a40f28c1e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_int16.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1s+key,subkey+2s +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/add_int32.cfg b/yql/essentials/tests/sql/suites/blocks/add_int32.cfg new file mode 100644 index 0000000000..f68558a818 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_int32.cfg @@ -0,0 +1 @@ +in Input input_int32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_int32.sql b/yql/essentials/tests/sql/suites/blocks/add_int32.sql new file mode 100644 index 0000000000..ae8903174a --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_int32.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1+key,subkey+2 +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/add_int64.cfg b/yql/essentials/tests/sql/suites/blocks/add_int64.cfg new file mode 100644 index 0000000000..d2b033ce45 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_int64.cfg @@ -0,0 +1 @@ +in Input input_int64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_int64.sql b/yql/essentials/tests/sql/suites/blocks/add_int64.sql new file mode 100644 index 0000000000..1c249577dc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_int64.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1l+key,subkey+2l +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/add_int8.cfg b/yql/essentials/tests/sql/suites/blocks/add_int8.cfg new file mode 100644 index 0000000000..82ad4d9d8e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_int8.cfg @@ -0,0 +1 @@ +in Input input_int8.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_int8.sql b/yql/essentials/tests/sql/suites/blocks/add_int8.sql new file mode 100644 index 0000000000..7dc1279e89 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_int8.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1t+key,subkey+2t +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint16.cfg b/yql/essentials/tests/sql/suites/blocks/add_uint16.cfg new file mode 100644 index 0000000000..e8e031c1e0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint16.cfg @@ -0,0 +1 @@ +in Input input_uint16.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint16.sql b/yql/essentials/tests/sql/suites/blocks/add_uint16.sql new file mode 100644 index 0000000000..9d81c2c052 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint16.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1us+key,subkey+2us +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint32.cfg b/yql/essentials/tests/sql/suites/blocks/add_uint32.cfg new file mode 100644 index 0000000000..54555c1cf2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint32.cfg @@ -0,0 +1 @@ +in Input input_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint32.sql b/yql/essentials/tests/sql/suites/blocks/add_uint32.sql new file mode 100644 index 0000000000..2c61de9c42 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint32.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1u+key,subkey+2u +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint64.cfg b/yql/essentials/tests/sql/suites/blocks/add_uint64.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint64.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint64.sql b/yql/essentials/tests/sql/suites/blocks/add_uint64.sql new file mode 100644 index 0000000000..7671b7667d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint64.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1ul+key,subkey+2ul +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint64_opt.cfg b/yql/essentials/tests/sql/suites/blocks/add_uint64_opt.cfg new file mode 100644 index 0000000000..317b76e3a7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint64_opt.cfg @@ -0,0 +1 @@ +in Input input_uint64_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint64_opt.sql b/yql/essentials/tests/sql/suites/blocks/add_uint64_opt.sql new file mode 100644 index 0000000000..7671b7667d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint64_opt.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1ul+key,subkey+2ul +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint64_opt2.cfg b/yql/essentials/tests/sql/suites/blocks/add_uint64_opt2.cfg new file mode 100644 index 0000000000..46fee85c7f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint64_opt2.cfg @@ -0,0 +1 @@ +in Input input_uint64_opt2.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint64_opt2.sql b/yql/essentials/tests/sql/suites/blocks/add_uint64_opt2.sql new file mode 100644 index 0000000000..7671b7667d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint64_opt2.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1ul+key,subkey+2ul +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint8.cfg b/yql/essentials/tests/sql/suites/blocks/add_uint8.cfg new file mode 100644 index 0000000000..cd9448c29c --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint8.cfg @@ -0,0 +1 @@ +in Input input_uint8.txt diff --git a/yql/essentials/tests/sql/suites/blocks/add_uint8.sql b/yql/essentials/tests/sql/suites/blocks/add_uint8.sql new file mode 100644 index 0000000000..b757039a48 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/add_uint8.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+subkey,1ut+key,subkey+2ut +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/bitcast_block.cfg b/yql/essentials/tests/sql/suites/blocks/bitcast_block.cfg new file mode 100644 index 0000000000..e8dbb42122 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/bitcast_block.cfg @@ -0,0 +1 @@ +in Input input_uint8_big.txt diff --git a/yql/essentials/tests/sql/suites/blocks/bitcast_block.sql b/yql/essentials/tests/sql/suites/blocks/bitcast_block.sql new file mode 100644 index 0000000000..596b3d0f4a --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/bitcast_block.sql @@ -0,0 +1,3 @@ +USE plato; + +select key+1l from Input;
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/bitcast_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/bitcast_scalar.cfg new file mode 100644 index 0000000000..e8dbb42122 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/bitcast_scalar.cfg @@ -0,0 +1 @@ +in Input input_uint8_big.txt diff --git a/yql/essentials/tests/sql/suites/blocks/bitcast_scalar.sql b/yql/essentials/tests/sql/suites/blocks/bitcast_scalar.sql new file mode 100644 index 0000000000..478d1af333 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/bitcast_scalar.sql @@ -0,0 +1,3 @@ +USE plato; + +select key+1t from Input;
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/block_input.cfg b/yql/essentials/tests/sql/suites/blocks/block_input.cfg new file mode 100644 index 0000000000..426917836b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input.cfg @@ -0,0 +1,2 @@ +in Input input_strings.txt +providers yt diff --git a/yql/essentials/tests/sql/suites/blocks/block_input.sql b/yql/essentials/tests/sql/suites/blocks/block_input.sql new file mode 100644 index 0000000000..50749842db --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input.sql @@ -0,0 +1,11 @@ +USE plato; + +PRAGMA yt.JobBlockInput; + +SELECT + key, + subkey, + "value: " || value AS value, +FROM Input +WHERE key < "100" +ORDER BY key; diff --git a/yql/essentials/tests/sql/suites/blocks/block_input_sys_columns.cfg b/yql/essentials/tests/sql/suites/blocks/block_input_sys_columns.cfg new file mode 100644 index 0000000000..5017087a09 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input_sys_columns.cfg @@ -0,0 +1,3 @@ +in Input1 input1.txt +in Input2 input2.txt +providers yt diff --git a/yql/essentials/tests/sql/suites/blocks/block_input_sys_columns.sql b/yql/essentials/tests/sql/suites/blocks/block_input_sys_columns.sql new file mode 100644 index 0000000000..2ab38cdf00 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input_sys_columns.sql @@ -0,0 +1,18 @@ +USE plato; + +PRAGMA yt.JobBlockInput; + +$a = ( + SELECT TableName() AS table_name, TableRecordIndex() AS record_index, Input1.* FROM Input1 + UNION ALL + SELECT TableName() AS table_name, TableRecordIndex() AS record_index, Input2.* FROM Input2 +); + +$b = ( + SELECT * FROM Input1 AS users + UNION ALL + SELECT * FROM Input2 AS users +); + +SELECT * FROM $a ORDER BY table_name, record_index; +SELECT ROW_NUMBER() OVER () AS row_num, b.* FROM $b AS b ORDER BY row_num; diff --git a/yql/essentials/tests/sql/suites/blocks/block_input_various_types-v3.cfg b/yql/essentials/tests/sql/suites/blocks/block_input_various_types-v3.cfg new file mode 100644 index 0000000000..6c3e597275 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input_various_types-v3.cfg @@ -0,0 +1,3 @@ +in Input block_input_various_types_v3.txt +providers yt +pragma yt.UseNativeYtTypes diff --git a/yql/essentials/tests/sql/suites/blocks/block_input_various_types.cfg b/yql/essentials/tests/sql/suites/blocks/block_input_various_types.cfg new file mode 100644 index 0000000000..0c5560da7f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input_various_types.cfg @@ -0,0 +1,2 @@ +in Input block_input_various_types.txt +providers yt diff --git a/yql/essentials/tests/sql/suites/blocks/block_input_various_types.sql b/yql/essentials/tests/sql/suites/blocks/block_input_various_types.sql new file mode 100644 index 0000000000..dfd793d765 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input_various_types.sql @@ -0,0 +1,5 @@ +USE plato; + +PRAGMA yt.JobBlockInput; + +SELECT * FROM Input WHERE `int64` > 10; diff --git a/yql/essentials/tests/sql/suites/blocks/block_input_various_types.txt b/yql/essentials/tests/sql/suites/blocks/block_input_various_types.txt new file mode 100644 index 0000000000..8b19f43faf --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input_various_types.txt @@ -0,0 +1,15 @@ +{"bool"=%false;"optionalDouble"=#;"string"="\xD0\x94\xD0\xBE\xD1\x81\xD1\x82\xD0\xB0\xD0\xBB\xD0\xB8 \xD1\x8D\xD1\x82\xD0\xB8 \xD1\x82\xD0\xB5\xD1\x81\xD1\x82\xD1\x8B? \xD0\xA7\xD0\xB8\xD1\x82\xD0\xB0\xD0\xB9\xD1\x82\xD0\xB5 \xD0\xBF\xD1\x80\xD0\xBE \xD0\xB7\xD1\x8E\xD0\xB3\xD0\xB7\xD0\xB8\xD0\xBA\xD0\xBE\xD0\xB2. \xD0\x9E\xD0\xBD\xD0\xB8 \xD1\x81\xD0\xBB\xD0\xB0\xD0\xB2\xD0\xBD\xD1\x8B\xD0\xB5.";"tuple"=[47118;"\xD0\x94\xD0\xBE\xD1\x81\xD1\x82\xD0\xB0\xD0\xBB\xD0\xB8 \xD1\x8D\xD1\x82\xD0\xB8 \xD1\x82\xD0\xB5\xD1\x81\xD1\x82\xD1\x8B? \xD0\xA7\xD0\xB8\xD1\x82\xD0\xB0\xD0\xB9\xD1\x82\xD0\xB5 \xD0\xBF\xD1\x80\xD0\xBE \xD0\xB7\xD1\x8E\xD0\xB3\xD0\xB7\xD0\xB8\xD0\xBA\xD0\xBE\xD0\xB2. \xD0\x9E\xD0\xBD\xD0\xB8 \xD1\x81\xD0\xBB\xD0\xB0\xD0\xB2\xD0\xBD\xD1\x8B\xD0\xB5.";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=47118;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=47118;"body"="\xD0\x94\xD0\xBE\xD1\x81\xD1\x82\xD0\xB0\xD0\xBB\xD0\xB8 \xD1\x8D\xD1\x82\xD0\xB8 \xD1\x82\xD0\xB5\xD1\x81\xD1\x82\xD1\x8B? \xD0\xA7\xD0\xB8\xD1\x82\xD0\xB0\xD0\xB9\xD1\x82\xD0\xB5 \xD0\xBF\xD1\x80\xD0\xBE \xD0\xB7\xD1\x8E\xD0\xB3\xD0\xB7\xD0\xB8\xD0\xBA\xD0\xBE\xD0\xB2. \xD0\x9E\xD0\xBD\xD0\xB8 \xD1\x81\xD0\xBB\xD0\xB0\xD0\xB2\xD0\xBD\xD1\x8B\xD0\xB5.";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%true;"optionalDouble"=0.12625990897039296;"string"="\xD0\xA1\xD0\xBF\xD1\x80\xD0\xB0\xD0\xB2\xD0\xBE\xD1\x87\xD0\xBD\xD0\xB8\xD0\xBA \xD1\x80\xD0\xB5\xD0\xB4\xD0\xBA\xD0\xB8\xD1\x85 \xD1\x80\xD1\x83\xD0\xB3\xD0\xB0\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8C\xD1\x81\xD1\x82\xD0\xB2. \xD0\x9B\xD0\xB5\xD0\xBA\xD1\x81\xD0\xB8\xD0\xBA\xD0\xB0 \xD0\xBD\xD0\xBE\xD1\x80\xD0\xBC\xD0\xB0\xD1\x82\xD0\xB8\xD0\xB2\xD0\xBD\xD0\xB0. \xD0\xA0\xD0\xB5\xD0\xBA\xD0\xBE\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xB4\xD0\xBE\xD0\xB2\xD0\xB0\xD0\xBD \xD0\xB4\xD0\xBB\xD1\x8F \xD1\x88\xD0\xBA\xD0\xBE\xD0\xBB.";"tuple"=[50018;"\xD0\xA1\xD0\xBF\xD1\x80\xD0\xB0\xD0\xB2\xD0\xBE\xD1\x87\xD0\xBD\xD0\xB8\xD0\xBA \xD1\x80\xD0\xB5\xD0\xB4\xD0\xBA\xD0\xB8\xD1\x85 \xD1\x80\xD1\x83\xD0\xB3\xD0\xB0\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8C\xD1\x81\xD1\x82\xD0\xB2. \xD0\x9B\xD0\xB5\xD0\xBA\xD1\x81\xD0\xB8\xD0\xBA\xD0\xB0 \xD0\xBD\xD0\xBE\xD1\x80\xD0\xBC\xD0\xB0\xD1\x82\xD0\xB8\xD0\xB2\xD0\xBD\xD0\xB0. \xD0\xA0\xD0\xB5\xD0\xBA\xD0\xBE\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xB4\xD0\xBE\xD0\xB2\xD0\xB0\xD0\xBD \xD0\xB4\xD0\xBB\xD1\x8F \xD1\x88\xD0\xBA\xD0\xBE\xD0\xBB.";%true;[0.12625990897039296;];"\xF0\x9F\x8C\x9D";];"int64"=50018;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=50018;"body"="\xD0\xA1\xD0\xBF\xD1\x80\xD0\xB0\xD0\xB2\xD0\xBE\xD1\x87\xD0\xBD\xD0\xB8\xD0\xBA \xD1\x80\xD0\xB5\xD0\xB4\xD0\xBA\xD0\xB8\xD1\x85 \xD1\x80\xD1\x83\xD0\xB3\xD0\xB0\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8C\xD1\x81\xD1\x82\xD0\xB2. \xD0\x9B\xD0\xB5\xD0\xBA\xD1\x81\xD0\xB8\xD0\xBA\xD0\xB0 \xD0\xBD\xD0\xBE\xD1\x80\xD0\xBC\xD0\xB0\xD1\x82\xD0\xB8\xD0\xB2\xD0\xBD\xD0\xB0. \xD0\xA0\xD0\xB5\xD0\xBA\xD0\xBE\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xB4\xD0\xBE\xD0\xB2\xD0\xB0\xD0\xBD \xD0\xB4\xD0\xBB\xD1\x8F \xD1\x88\xD0\xBA\xD0\xBE\xD0\xBB.";"random"=0.12625990897039296;"statusPostModerate"=%true;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=#;"string"="\xD0\x9A\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xBD\xD0\xB5 \xD0\xBA\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xB0 \xD0\xB4\xD0\xB5\xD0\xBD\xD0\xB5\xD0\xB6\xD0\xBA\xD0\xB8 \xD0\xB2\xD1\x81\xD0\xB5 \xD1\x80\xD0\xB0\xD0\xB2\xD0\xBD\xD0\xBE \xD1\x82\xD1\x8E-\xD1\x82\xD1\x8E.";"tuple"=[50651;"\xD0\x9A\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xBD\xD0\xB5 \xD0\xBA\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xB0 \xD0\xB4\xD0\xB5\xD0\xBD\xD0\xB5\xD0\xB6\xD0\xBA\xD0\xB8 \xD0\xB2\xD1\x81\xD0\xB5 \xD1\x80\xD0\xB0\xD0\xB2\xD0\xBD\xD0\xBE \xD1\x82\xD1\x8E-\xD1\x82\xD1\x8E.";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=50651;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=50651;"body"="\xD0\x9A\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xBD\xD0\xB5 \xD0\xBA\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xB0 \xD0\xB4\xD0\xB5\xD0\xBD\xD0\xB5\xD0\xB6\xD0\xBA\xD0\xB8 \xD0\xB2\xD1\x81\xD0\xB5 \xD1\x80\xD0\xB0\xD0\xB2\xD0\xBD\xD0\xBE \xD1\x82\xD1\x8E-\xD1\x82\xD1\x8E.";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%true;"optionalDouble"=#;"string"="\xD0\x94\xD0\xBE\xD0\xB1\xD0\xB0\xD0\xB2\xD0\xBA\xD0\xB0 \xD0\xBA \xD1\x83\xD0\xB6\xD0\xB8\xD0\xBD\xD1\x83 \xD0\xB2\xD1\x8B\xD0\xB4\xD0\xB0\xD0\xB5\xD1\x82\xD1\x81\xD1\x8F \xD0\xBD\xD0\xB0 \xD0\xB4\xD1\x80\xD1\x83\xD0\xB3\xD0\xBE\xD0\xB9 \xD0\xB4\xD0\xB5\xD0\xBD\xD1\x8C \xD0\xB2 \xD0\xBE\xD0\xB1\xD0\xB5\xD0\xB4 \xD0\xBF\xD0\xBE \xD0\xBF\xD0\xB8\xD1\x81\xD1\x8C\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xBD\xD0\xBE\xD0\xBC\xD1\x83 \xD0\xB7\xD0\xB0\xD1\x8F\xD0\xB2\xD0\xBB\xD0\xB5\xD0\xBD\xD0\xB8\xD1\x8E.";"tuple"=[51926;"\xD0\x94\xD0\xBE\xD0\xB1\xD0\xB0\xD0\xB2\xD0\xBA\xD0\xB0 \xD0\xBA \xD1\x83\xD0\xB6\xD0\xB8\xD0\xBD\xD1\x83 \xD0\xB2\xD1\x8B\xD0\xB4\xD0\xB0\xD0\xB5\xD1\x82\xD1\x81\xD1\x8F \xD0\xBD\xD0\xB0 \xD0\xB4\xD1\x80\xD1\x83\xD0\xB3\xD0\xBE\xD0\xB9 \xD0\xB4\xD0\xB5\xD0\xBD\xD1\x8C \xD0\xB2 \xD0\xBE\xD0\xB1\xD0\xB5\xD0\xB4 \xD0\xBF\xD0\xBE \xD0\xBF\xD0\xB8\xD1\x81\xD1\x8C\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xBD\xD0\xBE\xD0\xBC\xD1\x83 \xD0\xB7\xD0\xB0\xD1\x8F\xD0\xB2\xD0\xBB\xD0\xB5\xD0\xBD\xD0\xB8\xD1\x8E.";%true;#;"\xF0\x9F\x8C\x9A";];"int64"=51926;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=51926;"body"="\xD0\x94\xD0\xBE\xD0\xB1\xD0\xB0\xD0\xB2\xD0\xBA\xD0\xB0 \xD0\xBA \xD1\x83\xD0\xB6\xD0\xB8\xD0\xBD\xD1\x83 \xD0\xB2\xD1\x8B\xD0\xB4\xD0\xB0\xD0\xB5\xD1\x82\xD1\x81\xD1\x8F \xD0\xBD\xD0\xB0 \xD0\xB4\xD1\x80\xD1\x83\xD0\xB3\xD0\xBE\xD0\xB9 \xD0\xB4\xD0\xB5\xD0\xBD\xD1\x8C \xD0\xB2 \xD0\xBE\xD0\xB1\xD0\xB5\xD0\xB4 \xD0\xBF\xD0\xBE \xD0\xBF\xD0\xB8\xD1\x81\xD1\x8C\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xBD\xD0\xBE\xD0\xBC\xD1\x83 \xD0\xB7\xD0\xB0\xD1\x8F\xD0\xB2\xD0\xBB\xD0\xB5\xD0\xBD\xD0\xB8\xD1\x8E.";"random"=#;"statusPostModerate"=%true;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%true;"optionalDouble"=0.20228555333311726;"string"="\xD0\xAF\xD0\xBD\xD0\xB4\xD0\xB5\xD0\xBA\xD1\x81.\xD0\x94\xD0\xB8\xD1\x80\xD0\xB5\xD0\xBA\xD1\x82 - \xD1\x82\xD0\xB5\xD0\xBF\xD0\xB5\xD1\x80\xD1\x8C \xD0\xBE\xD0\xBF\xD0\xBB\xD0\xB0\xD1\x82\xD0\xB0 \xD1\x82\xD0\xBE\xD0\xBB\xD1\x8C\xD0\xBA\xD0\xBE \xD0\xBF\xD0\xBE \xD0\xBA\xD0\xBB\xD0\xB8\xD0\xBA\xD0\xB0\xD0\xBC! \xD0\x9E\xD1\x82 3 \xD1\x80\xD1\x83\xD0\xB1\xD0\xBB\xD0\xB5\xD0\xB9 \xD0\xB7\xD0\xB0 \xD0\xBF\xD0\xBE\xD1\x81\xD0\xB5\xD1\x82\xD0\xB8\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8F!";"tuple"=[59870;"\xD0\xAF\xD0\xBD\xD0\xB4\xD0\xB5\xD0\xBA\xD1\x81.\xD0\x94\xD0\xB8\xD1\x80\xD0\xB5\xD0\xBA\xD1\x82 - \xD1\x82\xD0\xB5\xD0\xBF\xD0\xB5\xD1\x80\xD1\x8C \xD0\xBE\xD0\xBF\xD0\xBB\xD0\xB0\xD1\x82\xD0\xB0 \xD1\x82\xD0\xBE\xD0\xBB\xD1\x8C\xD0\xBA\xD0\xBE \xD0\xBF\xD0\xBE \xD0\xBA\xD0\xBB\xD0\xB8\xD0\xBA\xD0\xB0\xD0\xBC! \xD0\x9E\xD1\x82 3 \xD1\x80\xD1\x83\xD0\xB1\xD0\xBB\xD0\xB5\xD0\xB9 \xD0\xB7\xD0\xB0 \xD0\xBF\xD0\xBE\xD1\x81\xD0\xB5\xD1\x82\xD0\xB8\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8F!";%true;[0.20228555333311726;];"\xF0\x9F\x8C\x9D";];"int64"=59870;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=59870;"body"="\xD0\xAF\xD0\xBD\xD0\xB4\xD0\xB5\xD0\xBA\xD1\x81.\xD0\x94\xD0\xB8\xD1\x80\xD0\xB5\xD0\xBA\xD1\x82 - \xD1\x82\xD0\xB5\xD0\xBF\xD0\xB5\xD1\x80\xD1\x8C \xD0\xBE\xD0\xBF\xD0\xBB\xD0\xB0\xD1\x82\xD0\xB0 \xD1\x82\xD0\xBE\xD0\xBB\xD1\x8C\xD0\xBA\xD0\xBE \xD0\xBF\xD0\xBE \xD0\xBA\xD0\xBB\xD0\xB8\xD0\xBA\xD0\xB0\xD0\xBC! \xD0\x9E\xD1\x82 3 \xD1\x80\xD1\x83\xD0\xB1\xD0\xBB\xD0\xB5\xD0\xB9 \xD0\xB7\xD0\xB0 \xD0\xBF\xD0\xBE\xD1\x81\xD0\xB5\xD1\x82\xD0\xB8\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8F!";"random"=0.20228555333311726;"statusPostModerate"=%true;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=0.6180741372005905;"string"="\xD1\x84\xD1\x8B\xD0\xB2\xD0\x92\xD0\xAB\xD0\x90";"tuple"=[72292;"\xD1\x84\xD1\x8B\xD0\xB2\xD0\x92\xD0\xAB\xD0\x90";%false;[0.6180741372005905;];"\xF0\x9F\x8C\x9D";];"int64"=72292;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=72292;"body"="\xD1\x84\xD1\x8B\xD0\xB2\xD0\x92\xD0\xAB\xD0\x90";"random"=0.6180741372005905;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=#;"string"="SADSAD";"tuple"=[72293;"SADSAD";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=72293;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=72293;"body"="SADSAD";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%false;"optionalDouble"=0.8229333217326893;"string"="asDSD";"tuple"=[0;"asDSD";%false;[0.8229333217326893;];"\xF0\x9F\x8C\x9D";];"int64"=0;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=0;"body"="asDSD";"random"=0.8229333217326893;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=0.7745256384584717;"string"="sdgfsadf";"tuple"=[0;"sdgfsadf";%false;[0.7745256384584717;];"\xF0\x9F\x8C\x9D";];"int64"=0;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=0;"body"="sdgfsadf";"random"=0.7745256384584717;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=#;"string"="sadfasdf";"tuple"=[0;"sadfasdf";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=0;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=0;"body"="sadfasdf";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%false;"optionalDouble"=0.9568386351056601;"string"="adfasdf";"tuple"=[0;"adfasdf";%false;[0.9568386351056601;];"\xF0\x9F\x8C\x9D";];"int64"=0;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=0;"body"="adfasdf";"random"=0.9568386351056601;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=#;"string"="hhjjk66";"tuple"=[47119;"hhjjk66";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=47119;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=47119;"body"="hhjjk66";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%false;"optionalDouble"=0.010654992670553587;"string"="titjj";"tuple"=[47120;"titjj";%false;[0.010654992670553587;];"\xF0\x9F\x8C\x9D";];"int64"=47120;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=47120;"body"="titjj";"random"=0.010654992670553587;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=0.9605645888111658;"string"="123456555hh";"tuple"=[47672;"123456555hh";%false;[0.9605645888111658;];"\xF0\x9F\x8C\x9D";];"int64"=47672;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=47672;"body"="123456555hh";"random"=0.9605645888111658;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=#;"string"="6666r\xD0\26066";"tuple"=[48065;"6666r\xD0\26066";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=48065;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=48065;"body"="6666r\xD0\26066";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; diff --git a/yql/essentials/tests/sql/suites/blocks/block_input_various_types.txt.attr b/yql/essentials/tests/sql/suites/blocks/block_input_various_types.txt.attr new file mode 100644 index 0000000000..2b89fecf21 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input_various_types.txt.attr @@ -0,0 +1,182 @@ +{ + "_yql_row_spec" = { + "NativeYtTypeFlags" = 0u; + "StrictSchema" = %true; + "Type" = [ + "StructType"; + [ + [ + "bool"; + [ + "DataType"; + "Bool"; + ]; + ]; + [ + "optionalDouble"; + [ + "OptionalType"; + [ + "DataType"; + "Double"; + ]; + ]; + ]; + [ + "string"; + [ + "DataType"; + "String"; + ]; + ]; + [ + "tuple"; + [ + "TupleType"; + [ + [ + "DataType"; + "Int64"; + ]; + [ + "DataType"; + "String"; + ]; + [ + "DataType"; + "Bool"; + ]; + [ + "OptionalType"; + [ + "DataType"; + "Double"; + ]; + ]; + [ + "DataType"; + "Utf8"; + ]; + ]; + ]; + ]; + [ + "int64"; + [ + "DataType"; + "Int64"; + ]; + ]; + [ + "utf8"; + [ + "DataType"; + "Utf8"; + ]; + ]; + [ + "yson"; + [ + "OptionalType"; + [ + "DataType"; + "Yson"; + ]; + ]; + ]; + ]; + ]; + "TypePatch" = [ + "StructType"; + [ + [ + "tuple"; + [ + "TupleType"; + [ + [ + "DataType"; + "Int64"; + ]; + [ + "DataType"; + "String"; + ]; + [ + "DataType"; + "Bool"; + ]; + [ + "OptionalType"; + [ + "DataType"; + "Double"; + ]; + ]; + [ + "DataType"; + "Utf8"; + ]; + ]; + ]; + ]; + ]; + ]; + }; + "schema" = < + "strict" = %true; + "unique_keys" = %false; + > [ + { + "name" = "bool"; + "required" = %true; + "type" = "boolean"; + "type_v3" = "bool"; + }; + { + "name" = "optionalDouble"; + "required" = %false; + "type" = "double"; + "type_v3" = { + "type_name" = "optional"; + "item" = "double"; + }; + }; + { + "name" = "string"; + "required" = %true; + "type" = "string"; + "type_v3" = "string"; + }; + { + "name" = "tuple"; + "required" = %false; + "type" = "any"; + "type_v3" = { + "type_name" = "optional"; + "item" = "yson"; + }; + }; + { + "name" = "int64"; + "required" = %true; + "type" = "int64"; + "type_v3" = "int64"; + }; + { + "name" = "utf8"; + "required" = %true; + "type" = "utf8"; + "type_v3" = "utf8"; + }; + { + "name" = "yson"; + "required" = %false; + "type" = "any"; + "type_v3" = { + "type_name" = "optional"; + "item" = "yson"; + }; + }; + ]; +}
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/block_input_various_types_v3.txt b/yql/essentials/tests/sql/suites/blocks/block_input_various_types_v3.txt new file mode 100644 index 0000000000..ac45e75445 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input_various_types_v3.txt @@ -0,0 +1,15 @@ +{"bool"=%false;"optionalDouble"=#;"string"="\xD0\x94\xD0\xBE\xD1\x81\xD1\x82\xD0\xB0\xD0\xBB\xD0\xB8 \xD1\x8D\xD1\x82\xD0\xB8 \xD1\x82\xD0\xB5\xD1\x81\xD1\x82\xD1\x8B? \xD0\xA7\xD0\xB8\xD1\x82\xD0\xB0\xD0\xB9\xD1\x82\xD0\xB5 \xD0\xBF\xD1\x80\xD0\xBE \xD0\xB7\xD1\x8E\xD0\xB3\xD0\xB7\xD0\xB8\xD0\xBA\xD0\xBE\xD0\xB2. \xD0\x9E\xD0\xBD\xD0\xB8 \xD1\x81\xD0\xBB\xD0\xB0\xD0\xB2\xD0\xBD\xD1\x8B\xD0\xB5.";"tuple"=[47118;"\xD0\x94\xD0\xBE\xD1\x81\xD1\x82\xD0\xB0\xD0\xBB\xD0\xB8 \xD1\x8D\xD1\x82\xD0\xB8 \xD1\x82\xD0\xB5\xD1\x81\xD1\x82\xD1\x8B? \xD0\xA7\xD0\xB8\xD1\x82\xD0\xB0\xD0\xB9\xD1\x82\xD0\xB5 \xD0\xBF\xD1\x80\xD0\xBE \xD0\xB7\xD1\x8E\xD0\xB3\xD0\xB7\xD0\xB8\xD0\xBA\xD0\xBE\xD0\xB2. \xD0\x9E\xD0\xBD\xD0\xB8 \xD1\x81\xD0\xBB\xD0\xB0\xD0\xB2\xD0\xBD\xD1\x8B\xD0\xB5.";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=47118;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=47118;"body"="\xD0\x94\xD0\xBE\xD1\x81\xD1\x82\xD0\xB0\xD0\xBB\xD0\xB8 \xD1\x8D\xD1\x82\xD0\xB8 \xD1\x82\xD0\xB5\xD1\x81\xD1\x82\xD1\x8B? \xD0\xA7\xD0\xB8\xD1\x82\xD0\xB0\xD0\xB9\xD1\x82\xD0\xB5 \xD0\xBF\xD1\x80\xD0\xBE \xD0\xB7\xD1\x8E\xD0\xB3\xD0\xB7\xD0\xB8\xD0\xBA\xD0\xBE\xD0\xB2. \xD0\x9E\xD0\xBD\xD0\xB8 \xD1\x81\xD0\xBB\xD0\xB0\xD0\xB2\xD0\xBD\xD1\x8B\xD0\xB5.";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%true;"optionalDouble"=#;"string"="\xD0\xA1\xD0\xBF\xD1\x80\xD0\xB0\xD0\xB2\xD0\xBE\xD1\x87\xD0\xBD\xD0\xB8\xD0\xBA \xD1\x80\xD0\xB5\xD0\xB4\xD0\xBA\xD0\xB8\xD1\x85 \xD1\x80\xD1\x83\xD0\xB3\xD0\xB0\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8C\xD1\x81\xD1\x82\xD0\xB2. \xD0\x9B\xD0\xB5\xD0\xBA\xD1\x81\xD0\xB8\xD0\xBA\xD0\xB0 \xD0\xBD\xD0\xBE\xD1\x80\xD0\xBC\xD0\xB0\xD1\x82\xD0\xB8\xD0\xB2\xD0\xBD\xD0\xB0. \xD0\xA0\xD0\xB5\xD0\xBA\xD0\xBE\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xB4\xD0\xBE\xD0\xB2\xD0\xB0\xD0\xBD \xD0\xB4\xD0\xBB\xD1\x8F \xD1\x88\xD0\xBA\xD0\xBE\xD0\xBB.";"tuple"=[50018;"\xD0\xA1\xD0\xBF\xD1\x80\xD0\xB0\xD0\xB2\xD0\xBE\xD1\x87\xD0\xBD\xD0\xB8\xD0\xBA \xD1\x80\xD0\xB5\xD0\xB4\xD0\xBA\xD0\xB8\xD1\x85 \xD1\x80\xD1\x83\xD0\xB3\xD0\xB0\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8C\xD1\x81\xD1\x82\xD0\xB2. \xD0\x9B\xD0\xB5\xD0\xBA\xD1\x81\xD0\xB8\xD0\xBA\xD0\xB0 \xD0\xBD\xD0\xBE\xD1\x80\xD0\xBC\xD0\xB0\xD1\x82\xD0\xB8\xD0\xB2\xD0\xBD\xD0\xB0. \xD0\xA0\xD0\xB5\xD0\xBA\xD0\xBE\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xB4\xD0\xBE\xD0\xB2\xD0\xB0\xD0\xBD \xD0\xB4\xD0\xBB\xD1\x8F \xD1\x88\xD0\xBA\xD0\xBE\xD0\xBB.";%true;#;"\xF0\x9F\x8C\x9A";];"int64"=50018;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=50018;"body"="\xD0\xA1\xD0\xBF\xD1\x80\xD0\xB0\xD0\xB2\xD0\xBE\xD1\x87\xD0\xBD\xD0\xB8\xD0\xBA \xD1\x80\xD0\xB5\xD0\xB4\xD0\xBA\xD0\xB8\xD1\x85 \xD1\x80\xD1\x83\xD0\xB3\xD0\xB0\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8C\xD1\x81\xD1\x82\xD0\xB2. \xD0\x9B\xD0\xB5\xD0\xBA\xD1\x81\xD0\xB8\xD0\xBA\xD0\xB0 \xD0\xBD\xD0\xBE\xD1\x80\xD0\xBC\xD0\xB0\xD1\x82\xD0\xB8\xD0\xB2\xD0\xBD\xD0\xB0. \xD0\xA0\xD0\xB5\xD0\xBA\xD0\xBE\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xB4\xD0\xBE\xD0\xB2\xD0\xB0\xD0\xBD \xD0\xB4\xD0\xBB\xD1\x8F \xD1\x88\xD0\xBA\xD0\xBE\xD0\xBB.";"random"=#;"statusPostModerate"=%true;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%false;"optionalDouble"=0.7379342704977339;"string"="\xD0\x9A\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xBD\xD0\xB5 \xD0\xBA\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xB0 \xD0\xB4\xD0\xB5\xD0\xBD\xD0\xB5\xD0\xB6\xD0\xBA\xD0\xB8 \xD0\xB2\xD1\x81\xD0\xB5 \xD1\x80\xD0\xB0\xD0\xB2\xD0\xBD\xD0\xBE \xD1\x82\xD1\x8E-\xD1\x82\xD1\x8E.";"tuple"=[50651;"\xD0\x9A\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xBD\xD0\xB5 \xD0\xBA\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xB0 \xD0\xB4\xD0\xB5\xD0\xBD\xD0\xB5\xD0\xB6\xD0\xBA\xD0\xB8 \xD0\xB2\xD1\x81\xD0\xB5 \xD1\x80\xD0\xB0\xD0\xB2\xD0\xBD\xD0\xBE \xD1\x82\xD1\x8E-\xD1\x82\xD1\x8E.";%false;0.7379342704977339;"\xF0\x9F\x8C\x9D";];"int64"=50651;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=50651;"body"="\xD0\x9A\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xBD\xD0\xB5 \xD0\xBA\xD0\xB0\xD1\x80\xD0\xB0\xD1\x83\xD0\xBB\xD1\x8C, \xD0\xB0 \xD0\xB4\xD0\xB5\xD0\xBD\xD0\xB5\xD0\xB6\xD0\xBA\xD0\xB8 \xD0\xB2\xD1\x81\xD0\xB5 \xD1\x80\xD0\xB0\xD0\xB2\xD0\xBD\xD0\xBE \xD1\x82\xD1\x8E-\xD1\x82\xD1\x8E.";"random"=0.7379342704977339;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%true;"optionalDouble"=0.9428779195684432;"string"="\xD0\x94\xD0\xBE\xD0\xB1\xD0\xB0\xD0\xB2\xD0\xBA\xD0\xB0 \xD0\xBA \xD1\x83\xD0\xB6\xD0\xB8\xD0\xBD\xD1\x83 \xD0\xB2\xD1\x8B\xD0\xB4\xD0\xB0\xD0\xB5\xD1\x82\xD1\x81\xD1\x8F \xD0\xBD\xD0\xB0 \xD0\xB4\xD1\x80\xD1\x83\xD0\xB3\xD0\xBE\xD0\xB9 \xD0\xB4\xD0\xB5\xD0\xBD\xD1\x8C \xD0\xB2 \xD0\xBE\xD0\xB1\xD0\xB5\xD0\xB4 \xD0\xBF\xD0\xBE \xD0\xBF\xD0\xB8\xD1\x81\xD1\x8C\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xBD\xD0\xBE\xD0\xBC\xD1\x83 \xD0\xB7\xD0\xB0\xD1\x8F\xD0\xB2\xD0\xBB\xD0\xB5\xD0\xBD\xD0\xB8\xD1\x8E.";"tuple"=[51926;"\xD0\x94\xD0\xBE\xD0\xB1\xD0\xB0\xD0\xB2\xD0\xBA\xD0\xB0 \xD0\xBA \xD1\x83\xD0\xB6\xD0\xB8\xD0\xBD\xD1\x83 \xD0\xB2\xD1\x8B\xD0\xB4\xD0\xB0\xD0\xB5\xD1\x82\xD1\x81\xD1\x8F \xD0\xBD\xD0\xB0 \xD0\xB4\xD1\x80\xD1\x83\xD0\xB3\xD0\xBE\xD0\xB9 \xD0\xB4\xD0\xB5\xD0\xBD\xD1\x8C \xD0\xB2 \xD0\xBE\xD0\xB1\xD0\xB5\xD0\xB4 \xD0\xBF\xD0\xBE \xD0\xBF\xD0\xB8\xD1\x81\xD1\x8C\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xBD\xD0\xBE\xD0\xBC\xD1\x83 \xD0\xB7\xD0\xB0\xD1\x8F\xD0\xB2\xD0\xBB\xD0\xB5\xD0\xBD\xD0\xB8\xD1\x8E.";%true;0.9428779195684432;"\xF0\x9F\x8C\x9D";];"int64"=51926;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=51926;"body"="\xD0\x94\xD0\xBE\xD0\xB1\xD0\xB0\xD0\xB2\xD0\xBA\xD0\xB0 \xD0\xBA \xD1\x83\xD0\xB6\xD0\xB8\xD0\xBD\xD1\x83 \xD0\xB2\xD1\x8B\xD0\xB4\xD0\xB0\xD0\xB5\xD1\x82\xD1\x81\xD1\x8F \xD0\xBD\xD0\xB0 \xD0\xB4\xD1\x80\xD1\x83\xD0\xB3\xD0\xBE\xD0\xB9 \xD0\xB4\xD0\xB5\xD0\xBD\xD1\x8C \xD0\xB2 \xD0\xBE\xD0\xB1\xD0\xB5\xD0\xB4 \xD0\xBF\xD0\xBE \xD0\xBF\xD0\xB8\xD1\x81\xD1\x8C\xD0\xBC\xD0\xB5\xD0\xBD\xD0\xBD\xD0\xBE\xD0\xBC\xD1\x83 \xD0\xB7\xD0\xB0\xD1\x8F\xD0\xB2\xD0\xBB\xD0\xB5\xD0\xBD\xD0\xB8\xD1\x8E.";"random"=0.9428779195684432;"statusPostModerate"=%true;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%true;"optionalDouble"=0.017737390999761016;"string"="\xD0\xAF\xD0\xBD\xD0\xB4\xD0\xB5\xD0\xBA\xD1\x81.\xD0\x94\xD0\xB8\xD1\x80\xD0\xB5\xD0\xBA\xD1\x82 - \xD1\x82\xD0\xB5\xD0\xBF\xD0\xB5\xD1\x80\xD1\x8C \xD0\xBE\xD0\xBF\xD0\xBB\xD0\xB0\xD1\x82\xD0\xB0 \xD1\x82\xD0\xBE\xD0\xBB\xD1\x8C\xD0\xBA\xD0\xBE \xD0\xBF\xD0\xBE \xD0\xBA\xD0\xBB\xD0\xB8\xD0\xBA\xD0\xB0\xD0\xBC! \xD0\x9E\xD1\x82 3 \xD1\x80\xD1\x83\xD0\xB1\xD0\xBB\xD0\xB5\xD0\xB9 \xD0\xB7\xD0\xB0 \xD0\xBF\xD0\xBE\xD1\x81\xD0\xB5\xD1\x82\xD0\xB8\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8F!";"tuple"=[59870;"\xD0\xAF\xD0\xBD\xD0\xB4\xD0\xB5\xD0\xBA\xD1\x81.\xD0\x94\xD0\xB8\xD1\x80\xD0\xB5\xD0\xBA\xD1\x82 - \xD1\x82\xD0\xB5\xD0\xBF\xD0\xB5\xD1\x80\xD1\x8C \xD0\xBE\xD0\xBF\xD0\xBB\xD0\xB0\xD1\x82\xD0\xB0 \xD1\x82\xD0\xBE\xD0\xBB\xD1\x8C\xD0\xBA\xD0\xBE \xD0\xBF\xD0\xBE \xD0\xBA\xD0\xBB\xD0\xB8\xD0\xBA\xD0\xB0\xD0\xBC! \xD0\x9E\xD1\x82 3 \xD1\x80\xD1\x83\xD0\xB1\xD0\xBB\xD0\xB5\xD0\xB9 \xD0\xB7\xD0\xB0 \xD0\xBF\xD0\xBE\xD1\x81\xD0\xB5\xD1\x82\xD0\xB8\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8F!";%true;0.017737390999761016;"\xF0\x9F\x8C\x9D";];"int64"=59870;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=59870;"body"="\xD0\xAF\xD0\xBD\xD0\xB4\xD0\xB5\xD0\xBA\xD1\x81.\xD0\x94\xD0\xB8\xD1\x80\xD0\xB5\xD0\xBA\xD1\x82 - \xD1\x82\xD0\xB5\xD0\xBF\xD0\xB5\xD1\x80\xD1\x8C \xD0\xBE\xD0\xBF\xD0\xBB\xD0\xB0\xD1\x82\xD0\xB0 \xD1\x82\xD0\xBE\xD0\xBB\xD1\x8C\xD0\xBA\xD0\xBE \xD0\xBF\xD0\xBE \xD0\xBA\xD0\xBB\xD0\xB8\xD0\xBA\xD0\xB0\xD0\xBC! \xD0\x9E\xD1\x82 3 \xD1\x80\xD1\x83\xD0\xB1\xD0\xBB\xD0\xB5\xD0\xB9 \xD0\xB7\xD0\xB0 \xD0\xBF\xD0\xBE\xD1\x81\xD0\xB5\xD1\x82\xD0\xB8\xD1\x82\xD0\xB5\xD0\xBB\xD1\x8F!";"random"=0.017737390999761016;"statusPostModerate"=%true;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=0.2538185652918672;"string"="\xD1\x84\xD1\x8B\xD0\xB2\xD0\x92\xD0\xAB\xD0\x90";"tuple"=[72292;"\xD1\x84\xD1\x8B\xD0\xB2\xD0\x92\xD0\xAB\xD0\x90";%false;0.2538185652918672;"\xF0\x9F\x8C\x9D";];"int64"=72292;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=72292;"body"="\xD1\x84\xD1\x8B\xD0\xB2\xD0\x92\xD0\xAB\xD0\x90";"random"=0.2538185652918672;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=0.13715387334717577;"string"="SADSAD";"tuple"=[72293;"SADSAD";%false;0.13715387334717577;"\xF0\x9F\x8C\x9D";];"int64"=72293;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=72293;"body"="SADSAD";"random"=0.13715387334717577;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=0.779134027692687;"string"="asDSD";"tuple"=[0;"asDSD";%false;0.779134027692687;"\xF0\x9F\x8C\x9D";];"int64"=0;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=0;"body"="asDSD";"random"=0.779134027692687;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=0.9141141402596906;"string"="sdgfsadf";"tuple"=[0;"sdgfsadf";%false;0.9141141402596906;"\xF0\x9F\x8C\x9D";];"int64"=0;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=0;"body"="sdgfsadf";"random"=0.9141141402596906;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=#;"string"="sadfasdf";"tuple"=[0;"sadfasdf";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=0;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=0;"body"="sadfasdf";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%false;"optionalDouble"=#;"string"="adfasdf";"tuple"=[0;"adfasdf";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=0;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=0;"body"="adfasdf";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%false;"optionalDouble"=#;"string"="hhjjk66";"tuple"=[47119;"hhjjk66";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=47119;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=47119;"body"="hhjjk66";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%false;"optionalDouble"=#;"string"="titjj";"tuple"=[47120;"titjj";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=47120;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=47120;"body"="titjj";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; +{"bool"=%false;"optionalDouble"=0.47223645647398416;"string"="123456555hh";"tuple"=[47672;"123456555hh";%false;0.47223645647398416;"\xF0\x9F\x8C\x9D";];"int64"=47672;"utf8"="\xF0\x9F\x8C\x9D";"yson"={"banner_id"=47672;"body"="123456555hh";"random"=0.47223645647398416;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9D";};}; +{"bool"=%false;"optionalDouble"=#;"string"="6666r\xD0\26066";"tuple"=[48065;"6666r\xD0\26066";%false;#;"\xF0\x9F\x8C\x9A";];"int64"=48065;"utf8"="\xF0\x9F\x8C\x9A";"yson"={"banner_id"=48065;"body"="6666r\xD0\26066";"random"=#;"statusPostModerate"=%false;"utf8"="\xF0\x9F\x8C\x9A";};}; diff --git a/yql/essentials/tests/sql/suites/blocks/block_input_various_types_v3.txt.attr b/yql/essentials/tests/sql/suites/blocks/block_input_various_types_v3.txt.attr new file mode 100644 index 0000000000..4f3264e5e5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/block_input_various_types_v3.txt.attr @@ -0,0 +1,77 @@ +{ + "schema" = < + "strict" = %true; + "unique_keys" = %false; + > [ + { + "name" = "bool"; + "required" = %true; + "type" = "boolean"; + "type_v3" = "bool"; + }; + { + "name" = "optionalDouble"; + "required" = %false; + "type" = "double"; + "type_v3" = { + "type_name" = "optional"; + "item" = "double"; + }; + }; + { + "name" = "string"; + "required" = %true; + "type" = "string"; + "type_v3" = "string"; + }; + { + "name" = "tuple"; + "required" = %true; + "type" = "any"; + "type_v3" = { + "type_name" = "tuple"; + "elements" = [ + { + "type" = "int64"; + }; + { + "type" = "string"; + }; + { + "type" = "bool"; + }; + { + "type" = { + "type_name" = "optional"; + "item" = "double"; + }; + }; + { + "type" = "utf8"; + }; + ]; + }; + }; + { + "name" = "int64"; + "required" = %true; + "type" = "int64"; + "type_v3" = "int64"; + }; + { + "name" = "utf8"; + "required" = %true; + "type" = "utf8"; + "type_v3" = "utf8"; + }; + { + "name" = "yson"; + "required" = %false; + "type" = "any"; + "type_v3" = { + "type_name" = "optional"; + "item" = "yson"; + }; + }; + ]; +}
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/boolean_ops.cfg b/yql/essentials/tests/sql/suites/blocks/boolean_ops.cfg new file mode 100644 index 0000000000..490bd1a7a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/boolean_ops.cfg @@ -0,0 +1 @@ +in Input input_bools.txt diff --git a/yql/essentials/tests/sql/suites/blocks/boolean_ops.sql b/yql/essentials/tests/sql/suites/blocks/boolean_ops.sql new file mode 100644 index 0000000000..e0a8c581aa --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/boolean_ops.sql @@ -0,0 +1,27 @@ +USE plato; + +select + key, + b1 and b2 as abb, + b2 and ob1 as abo, + ob2 and b1 as aob, + ob1 and ob2 as aoo, + + b1 or b2 as obb, + b2 or ob1 as obo, + ob2 or b1 as oob, + ob1 or ob2 as ooo, + + b1 xor b2 as xbb, + b2 xor ob1 as xbo, + ob2 xor b1 as xob, + ob1 xor ob2 as xoo, + + (1 > 2) and b1 and b2 and ob1 and ob2 as chain1, + (1 < 2) xor b1 xor b2 xor ob1 xor ob2 as chain2, + (1/0 < 1) or b1 or b2 or ob1 or ob2 as chain3, + + +from Input + +order by key; diff --git a/yql/essentials/tests/sql/suites/blocks/coalesce_bools.cfg b/yql/essentials/tests/sql/suites/blocks/coalesce_bools.cfg new file mode 100644 index 0000000000..490bd1a7a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/coalesce_bools.cfg @@ -0,0 +1 @@ +in Input input_bools.txt diff --git a/yql/essentials/tests/sql/suites/blocks/coalesce_bools.sql b/yql/essentials/tests/sql/suites/blocks/coalesce_bools.sql new file mode 100644 index 0000000000..2c3ffabb1a --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/coalesce_bools.sql @@ -0,0 +1,16 @@ +USE plato; + +select + key, + ob1 ?? b1, + ob1 ?? false, + ob1 ?? (1/0 > 0), + (1/2 > 0) ?? ob1, + (1/2 == 0) ?? b1, + (key/0 >= 0) ?? true, + (key/0 >= 0) ?? b1, + (key/2 >= 0) ?? false, + +from Input + +order by key; diff --git a/yql/essentials/tests/sql/suites/blocks/coalesce_complex.sql b/yql/essentials/tests/sql/suites/blocks/coalesce_complex.sql new file mode 100644 index 0000000000..576394292f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/coalesce_complex.sql @@ -0,0 +1,37 @@ +USE plato; + +$strings = [ + <|key:Just(Just("foo")), subkey:Just("bar"), value:1|>, + <|key:Just(Nothing(String?)), subkey:Just("two"), value:2|>, + <|key:Nothing(String??), subkey:Just("three"), value:3|>, + <|key:Nothing(String??), subkey:Nothing(String?), value:4|>, +]; + +$tuples = [ + <|key:Just(Just(AsTuple(1, 2))), subkey:Just(AsTuple(3, 4)), value:1|>, + <|key:Just(Nothing(Tuple<Int, Int>?)), subkey:Just(AsTuple(4, 5)), value:2|>, + <|key:Nothing(Tuple<Int, Int>??), subkey:Just(AsTuple(5, 6)), value:3|>, + <|key:Nothing(Tuple<Int, Int>??), subkey:Nothing(Tuple<Int, Int>?), value:4|>, +]; + +insert into @strings +select * from as_table($strings); + +insert into @tuples +select * from as_table($tuples); + +commit; + +select + value, + key ?? subkey, + subkey ?? "xxx", +from @strings +order by value; + +select + value, + key ?? subkey, + subkey ?? AsTuple(100, 500), +from @tuples +order by value; diff --git a/yql/essentials/tests/sql/suites/blocks/coalesce_ints.cfg b/yql/essentials/tests/sql/suites/blocks/coalesce_ints.cfg new file mode 100644 index 0000000000..c1251bbbeb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/coalesce_ints.cfg @@ -0,0 +1 @@ +in Input input_int32_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/coalesce_ints.sql b/yql/essentials/tests/sql/suites/blocks/coalesce_ints.sql new file mode 100644 index 0000000000..b726fbdd66 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/coalesce_ints.sql @@ -0,0 +1,16 @@ +USE plato; + +select + k1, + k2 ?? k1, + k2 ?? 0, + k2 ?? 1/0, + 1/2 ?? k2, + 1/2 ?? k1, + k1/0 ?? 1, + k1/0 ?? k1, + k1/2 ?? 0, +from Input + +order by k1; + diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_avg.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_avg.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_avg.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_avg.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_avg.sql new file mode 100644 index 0000000000..51932b0be2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_avg.sql @@ -0,0 +1,13 @@ +USE plato; + +SELECT + avg(key), + avg(cast(key as int8)), + avg(cast(key as uint16)), + avg(cast(key as int32)), + avg(1u/0u), + avg(2), + avg(if(key=10u,key)), + avg(if(key=100u,key)), + avg(key=10u) +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter.cfg new file mode 100644 index 0000000000..9ffe747df9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter.sql new file mode 100644 index 0000000000..11a70fb362 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + avg(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter_opt.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter_opt.cfg new file mode 100644 index 0000000000..eee6dd16f6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter_opt.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter_opt.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter_opt.sql new file mode 100644 index 0000000000..11a70fb362 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_avg_filter_opt.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + avg(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_count.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_count.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_count.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_count.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_count.sql new file mode 100644 index 0000000000..648f1f4f96 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_count.sql @@ -0,0 +1,9 @@ +USE plato; + +SELECT + count(*), + count(key + 1u/(4u-subkey)), + count(key), + count(1u), + count(1u/0u) +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter.cfg new file mode 100644 index 0000000000..9ffe747df9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter.sql new file mode 100644 index 0000000000..84d84410e6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter.sql @@ -0,0 +1,7 @@ +USE plato; + +SELECT + count(*), + count(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter_opt.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter_opt.cfg new file mode 100644 index 0000000000..eee6dd16f6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter_opt.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter_opt.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter_opt.sql new file mode 100644 index 0000000000..84d84410e6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_count_filter_opt.sql @@ -0,0 +1,7 @@ +USE plato; + +SELECT + count(*), + count(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_decimal.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_decimal.cfg new file mode 100644 index 0000000000..a21c6560ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_decimal.cfg @@ -0,0 +1 @@ +in Input input_decimal.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_decimal.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_decimal.sql new file mode 100644 index 0000000000..1085d83900 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_decimal.sql @@ -0,0 +1,15 @@ +use plato; + +SELECT + count(cs_ext_list_price), + sum(cs_ext_tax), + sum(cs_ext_list_price), + min(cs_sales_price), + max(cs_ext_list_price), + avg(cs_ext_tax), + + sum(cast(cs_sales_price as float)), + min(cast(cs_ext_list_price as float)), + max(cast(cs_ext_tax as float)), + avg(cast(cs_sales_price as float)) +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_decimal_max.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_decimal_max.sql new file mode 100644 index 0000000000..7119d3dc79 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_decimal_max.sql @@ -0,0 +1,9 @@ +use plato; + +SELECT + sum(x), + avg(x) +FROM (values + (Decimal("99999999999999999999999999999999999",35,0)), + (Decimal("1",35,0)) +) as a(x) diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_max.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_max.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_max.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_max.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_max.sql new file mode 100644 index 0000000000..a57479a251 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_max.sql @@ -0,0 +1,19 @@ +USE plato; + +SELECT + max(key), + max(cast(key as int8)), + max(cast(key as uint16)), + max(cast(key as int32)), + max(1u/0u), + max(2), + max(if(key=10u,key)), + max(if(key=100u,key)), + max(false), + max(key=10u), + max(key>=10u), + max(key=20u), + max(if(key=10u,true)), + max(if(key=100u,true)), + max(if(key>=10u,true)), +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter.cfg new file mode 100644 index 0000000000..9ffe747df9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter.sql new file mode 100644 index 0000000000..60f4dcc7a9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + max(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter_opt.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter_opt.cfg new file mode 100644 index 0000000000..eee6dd16f6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter_opt.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter_opt.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter_opt.sql new file mode 100644 index 0000000000..60f4dcc7a9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_max_filter_opt.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + max(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_min.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_min.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_min.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_min.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_min.sql new file mode 100644 index 0000000000..7c7ee6ce15 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_min.sql @@ -0,0 +1,19 @@ +USE plato; + +SELECT + min(key), + min(cast(key as int8)), + min(cast(key as uint16)), + min(cast(key as int32)), + min(1u/0u), + min(2), + min(if(key=10u,key)), + min(if(key=100u,key)), + min(false), + min(key=10u), + min(key>=10u), + min(key=20u), + min(if(key=10u,true)), + min(if(key=100u,true)), + min(if(key>=10u,true)), +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter.cfg new file mode 100644 index 0000000000..9ffe747df9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter.sql new file mode 100644 index 0000000000..7ec8330637 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + min(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter_opt.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter_opt.cfg new file mode 100644 index 0000000000..eee6dd16f6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter_opt.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter_opt.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter_opt.sql new file mode 100644 index 0000000000..7ec8330637 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_min_filter_opt.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + min(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_double.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_double.cfg new file mode 100644 index 0000000000..3777ee5eac --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_double.cfg @@ -0,0 +1 @@ +in Input input_double.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_double.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_double.sql new file mode 100644 index 0000000000..0587e68053 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_double.sql @@ -0,0 +1,6 @@ +USE plato; + +select + min(subkey), + max(subkey), +from Input; diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_nested.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_nested.cfg new file mode 100644 index 0000000000..b892bc468d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_nested.cfg @@ -0,0 +1 @@ +in Input input_nested.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_nested.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_nested.sql new file mode 100644 index 0000000000..81bab54a42 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_minmax_nested.sql @@ -0,0 +1,6 @@ +USE plato; + +select + min(value), + max(value), +from Input; diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_pg.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_pg.cfg new file mode 100644 index 0000000000..72b51dc777 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_pg.cfg @@ -0,0 +1 @@ +in Input input_pg.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_pg.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_pg.sql new file mode 100644 index 0000000000..a9dc82d763 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_pg.sql @@ -0,0 +1,17 @@ +use plato; +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +SELECT + Pg::count(), + Pg::count(a), + Pg::sum(c), + Pg::min(a), + Pg::max(a), + Pg::min(c), + Pg::max(c), + Pg::avg(c), + Pg::avg(PgCast(1p,pgint4)), + Pg::avg(PgCast(1p,pgint8)), + Pg::avg(PgCast(1p,pgfloat8)), + Pg::regr_count(1.0p,1.0p) +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_pg_filter.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_pg_filter.cfg new file mode 100644 index 0000000000..72b51dc777 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_pg_filter.cfg @@ -0,0 +1 @@ +in Input input_pg.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_pg_filter.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_pg_filter.sql new file mode 100644 index 0000000000..e20350e0c3 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_pg_filter.sql @@ -0,0 +1,14 @@ +use plato; +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +SELECT + Pg::count(), + Pg::count(a), + Pg::sum(c), + Pg::min(a), + Pg::max(a), + Pg::min(c), + Pg::max(c), + Pg::avg(c), +FROM Input +where d="aaa"
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_some.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_some.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_some.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_some.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_some.sql new file mode 100644 index 0000000000..5969668a66 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_some.sql @@ -0,0 +1,19 @@ +USE plato; + +SELECT + some(key), + some(cast(key as int8)), + some(cast(key as uint16)), + some(cast(key as int32)), + some(1u/0u), + some(2), + some(if(key=10u,key)), + some(if(key=100u,key)), + some(false), + some(key=10u), + some(key>=10u), + some(key=20u), + some(if(key=10u,true)), + some(if(key=100u,true)), + some(if(key>=10u,true)), +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_some_filter.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_some_filter.cfg new file mode 100644 index 0000000000..9ffe747df9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_some_filter.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_some_filter.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_some_filter.sql new file mode 100644 index 0000000000..de639a661e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_some_filter.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + some(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_sum.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_sum.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_sum.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_sum.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_sum.sql new file mode 100644 index 0000000000..5e71baec72 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_sum.sql @@ -0,0 +1,12 @@ +USE plato; + +SELECT + sum(key), + sum(cast(key as int8)), + sum(cast(key as uint16)), + sum(cast(key as int32)), + sum(1u/0u), + sum(2), + sum(if(key=10u,key)), + sum(if(key=100u,key)) +FROM Input
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter.cfg new file mode 100644 index 0000000000..9ffe747df9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter.sql new file mode 100644 index 0000000000..e61f9c708a --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + sum(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter_opt.cfg b/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter_opt.cfg new file mode 100644 index 0000000000..eee6dd16f6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter_opt.cfg @@ -0,0 +1 @@ +in Input input_uint64_filter_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter_opt.sql b/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter_opt.sql new file mode 100644 index 0000000000..7ec8330637 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_all_sum_filter_opt.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + min(key) +FROM Input +WHERE subkey!=5
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_avg.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_avg.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_avg.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_avg.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_avg.sql new file mode 100644 index 0000000000..8954e98fee --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_avg.sql @@ -0,0 +1,11 @@ +USE plato; + +SELECT + key, + avg(1u/(4u-subkey)), + avg(subkey), + avg(1u), + avg(1u/0u) +FROM Input +GROUP by key +ORDER by key
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_count.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_count.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_count.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_count.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_count.sql new file mode 100644 index 0000000000..2350c5df47 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_count.sql @@ -0,0 +1,12 @@ +USE plato; + +SELECT + key, + count(*), + count(1u/(4u-subkey)), + count(subkey), + count(1u), + count(1u/0u) +FROM Input +GROUP by key +ORDER by key
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_count_filter.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_count_filter.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_count_filter.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_count_filter.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_count_filter.sql new file mode 100644 index 0000000000..be51a39a1b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_count_filter.sql @@ -0,0 +1,9 @@ +USE plato; + +SELECT + key, + count(*), +FROM Input +WHERE subkey!=4 +GROUP by key +ORDER by key
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_max.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_max.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_max.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_max.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_max.sql new file mode 100644 index 0000000000..5719f8c8ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_max.sql @@ -0,0 +1,11 @@ +USE plato; + +SELECT + key, + max(1u/(4u-subkey)), + max(subkey), + max(1u), + max(1u/0u) +FROM Input +GROUP by key +ORDER by key
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_min.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_min.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_min.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_min.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_min.sql new file mode 100644 index 0000000000..5bf681ef9e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_min.sql @@ -0,0 +1,11 @@ +USE plato; + +SELECT + key, + min(1u/(4u-subkey)), + min(subkey), + min(1u), + min(1u/0u) +FROM Input +GROUP by key +ORDER by key
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_double.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_double.cfg new file mode 100644 index 0000000000..3777ee5eac --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_double.cfg @@ -0,0 +1 @@ +in Input input_double.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_double.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_double.sql new file mode 100644 index 0000000000..149e38e883 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_double.sql @@ -0,0 +1,9 @@ +USE plato; + +select + key, + min(subkey), + max(subkey), +from Input +group by key +order by key; diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_nested.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_nested.cfg new file mode 100644 index 0000000000..b892bc468d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_nested.cfg @@ -0,0 +1 @@ +in Input input_nested.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_nested.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_nested.sql new file mode 100644 index 0000000000..8070935f87 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_minmax_nested.sql @@ -0,0 +1,9 @@ +USE plato; + +select + key, + min(value), + max(value), +from Input +group by key +order by key; diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_pg.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_pg.cfg new file mode 100644 index 0000000000..72b51dc777 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_pg.cfg @@ -0,0 +1 @@ +in Input input_pg.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_pg.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_pg.sql new file mode 100644 index 0000000000..7c8c52aab7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_pg.sql @@ -0,0 +1,18 @@ +use plato; +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +SELECT + Pg::count(), + Pg::count(a), + Pg::sum(c), + Pg::min(a), + Pg::max(a), + Pg::min(c), + Pg::max(c), + Pg::avg(c), + Pg::avg(PgCast(1p,pgint4)), + Pg::avg(PgCast(1p,pgint8)), + Pg::avg(PgCast(1p,pgfloat8)), + Pg::regr_count(1.0p,1.0p) +FROM Input +group by len(d) diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_set.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_set.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_set.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_set.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_set.sql new file mode 100644 index 0000000000..ffe4ee0c2e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_set.sql @@ -0,0 +1,7 @@ +USE plato; + +SELECT + key +FROM Input +GROUP by key +ORDER by key; diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_some.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_some.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_some.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_some.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_some.sql new file mode 100644 index 0000000000..6fcca795a6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_some.sql @@ -0,0 +1,11 @@ +USE plato; + +SELECT + key, + some(1u/(4u-subkey)), + some(subkey), + some(1u), + some(1u/0u) +FROM Input +GROUP by key +ORDER by key
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum.sql new file mode 100644 index 0000000000..9c2fc31ab4 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum.sql @@ -0,0 +1,11 @@ +USE plato; + +SELECT + key, + sum(1u/(4u-subkey)), + sum(subkey), + sum(1u), + sum(1u/0u) +FROM Input +GROUP by key +ORDER by key
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum_many_keys.cfg b/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum_many_keys.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum_many_keys.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum_many_keys.sql b/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum_many_keys.sql new file mode 100644 index 0000000000..0c7e8688f6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/combine_hashed_sum_many_keys.sql @@ -0,0 +1,46 @@ +USE plato; + +SELECT + k1, + sum(subkey) +FROM Input +GROUP by key + 1u as k1 +ORDER by k1; + +SELECT + k1, + k2, + sum(subkey) +FROM Input +GROUP by key + 1u as k1, key + 2u as k2 +ORDER by k1, k2; + +SELECT + k1, + k2, + k3, + sum(subkey) +FROM Input +GROUP by key + 1u as k1, key + 2u as k2, key + 3u as k3 +ORDER by k1, k2, k3; + +SELECT + k1, + k2, + k3, + k4, + sum(subkey) +FROM Input +GROUP by key + 1u as k1, key + 2u as k2, key + 3u as k3, key + 4u as k4 +ORDER by k1, k2, k3, k4; + +SELECT + k1, + k2, + k3, + k4, + k5, + sum(subkey) +FROM Input +GROUP by key + 1u as k1, key + 2u as k2, key + 3u as k3, key + 4u as k4, key + 5u as k5 +ORDER by k1, k2, k3, k4, k5; diff --git a/yql/essentials/tests/sql/suites/blocks/compare.cfg b/yql/essentials/tests/sql/suites/blocks/compare.cfg new file mode 100644 index 0000000000..3d3fea34e7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/compare.cfg @@ -0,0 +1 @@ +in Input input_allnums.txt diff --git a/yql/essentials/tests/sql/suites/blocks/compare.sql b/yql/essentials/tests/sql/suites/blocks/compare.sql new file mode 100644 index 0000000000..a0e0d5e5b7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/compare.sql @@ -0,0 +1,24 @@ +select + i8, + i16 == i32, + i32 != ui8, + ui16 < i64, + i8 <= ui8, + ui32 > i64, + ui64 >= i16, + + i16 == i32opt, + i32opt != ui8, + ui16 < i64opt, + i8opt <= ui8opt, + ui32opt > i64, + ui64 >= i16, + + i16 == 6u, + i32opt != 5, + 7 < i64opt, + 1/0 <= ui8opt, + 0 > i64, + ui64 >= 8u, +from plato.Input +order by i8; diff --git a/yql/essentials/tests/sql/suites/blocks/compare_dates_floats_bools.cfg b/yql/essentials/tests/sql/suites/blocks/compare_dates_floats_bools.cfg new file mode 100644 index 0000000000..bb349dd8ab --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/compare_dates_floats_bools.cfg @@ -0,0 +1 @@ +providers yt diff --git a/yql/essentials/tests/sql/suites/blocks/compare_dates_floats_bools.sql b/yql/essentials/tests/sql/suites/blocks/compare_dates_floats_bools.sql new file mode 100644 index 0000000000..5b459bd969 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/compare_dates_floats_bools.sql @@ -0,0 +1,59 @@ +use plato; + +insert into @tmp +select + 1 as key, + + 2.0f as fl1, + 3.0f as fl2, + + 2.5 as db1, + 1.5 as db2, + + true as b1, + false as b2, + + Date('2023-01-08') as d1, + Date('2023-01-05') as d2, + + Datetime('2023-01-08T00:00:00Z') as dt1, + Datetime('2023-01-05T00:00:00Z') as dt2, + + Timestamp('2023-01-08T00:00:00.000000Z') as ts1, + Timestamp('2023-01-05T00:00:00.000000Z') as ts2, + + Interval('PT1M') as i1, + Interval('PT1H') as i2, +; +commit; + +select + t.*, + + fl1 > fl2, + fl1 > key, + fl2 > 2.0, + fl2 > db2, + + db1 > db2, + db2 <= key, + db1 > fl2, + db2 > 1.0f, + + b1 < b2, + b1 == true, + false >= b2, + + d1 < d2, + d1 == dt1, + ts2 == d2, + d1 >= Date('2023-01-01'), + ts1 == d1, + ts2 >= dt2, + Timestamp('2023-01-05T00:00:00.000000Z') <= d2, + + + i1 < i2, + i2 > Interval('PT59M'), +from @tmp as t; + diff --git a/yql/essentials/tests/sql/suites/blocks/complex_scalars.cfg b/yql/essentials/tests/sql/suites/blocks/complex_scalars.cfg new file mode 100644 index 0000000000..b65712414d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/complex_scalars.cfg @@ -0,0 +1 @@ +in Input input_strings.txt diff --git a/yql/essentials/tests/sql/suites/blocks/complex_scalars.sql b/yql/essentials/tests/sql/suites/blocks/complex_scalars.sql new file mode 100644 index 0000000000..225de346de --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/complex_scalars.sql @@ -0,0 +1,12 @@ +USE plato; + +select + subkey || key as k, + Just(Just(1)) as nested_opt, + Just(1p) as opt_pg, + Just(Just(1p)) as nested_opt_pg, + 2p as pg, + AsTuple(1, 2, Just(Just(2))) as tuple, + Just(Just(Just(AsTuple(1, 2, Just(Just(2)))))) as double_tuple +from Input +order by k; diff --git a/yql/essentials/tests/sql/suites/blocks/date_add_interval.cfg b/yql/essentials/tests/sql/suites/blocks/date_add_interval.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_add_interval.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_add_interval.sql b/yql/essentials/tests/sql/suites/blocks/date_add_interval.sql new file mode 100644 index 0000000000..3a920ad0e3 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_add_interval.sql @@ -0,0 +1,31 @@ +USE plato; + +SELECT + a.na + b.ni, + a.na + b.wi, + a.naz + b.ni, + a.naz + b.wi, + a.nd + b.ni, + a.nd + b.wi, + a.ndz + b.ni, + a.ndz + b.wi, + a.nt + b.ni, + a.nt + b.wi, + a.ntz + b.ni, + a.ntz + b.wi, + + a.wa + b.ni, + a.wa + b.wi, + a.waz + b.ni, + a.waz + b.wi, + a.wd + b.ni, + a.wd + b.wi, + a.wdz + b.ni, + a.wdz + b.wi, + a.wt + b.ni, + a.wt + b.wi, + a.wtz + b.ni, + a.wtz + b.wi, +FROM Dates as a CROSS JOIN Dates as b + + diff --git a/yql/essentials/tests/sql/suites/blocks/date_add_interval_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/date_add_interval_scalar.cfg new file mode 100644 index 0000000000..8d2d2a19fc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_add_interval_scalar.cfg @@ -0,0 +1 @@ +in Dates dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/date_add_interval_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_add_interval_scalar.sql new file mode 100644 index 0000000000..da977a614b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_add_interval_scalar.sql @@ -0,0 +1,57 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + Date("2000-01-01") + ni, + Date("2000-01-01") + wi, + TzDate("2000-01-01,Europe/Moscow") + ni, + TzDate("2000-01-01,Europe/Moscow") + wi, + Datetime("2000-01-01T03:04:05Z") + ni, + Datetime("2000-01-01T03:04:05Z") + wi, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") + ni, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") + wi, + Timestamp("2000-01-01T03:04:05.678912Z") + ni, + Timestamp("2000-01-01T03:04:05.678912Z") + wi, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") + ni, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") + wi, + Date32("1900-01-01") + ni, + Date32("1900-01-01") + wi, + Datetime64("1900-01-01T03:04:05Z") + ni, + Datetime64("1900-01-01T03:04:05Z") + wi, + Timestamp64("1900-01-01T03:04:05.678912Z") + ni, + Timestamp64("1900-01-01T03:04:05.678912Z") + wi, + TzDate32("1900-01-01,Europe/Moscow") + ni, + TzDate32("1900-01-01,Europe/Moscow") + wi, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") + ni, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") + wi, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") + ni, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") + wi +FROM Dates; + +SELECT + na + Interval("P1D"), + na + Interval64("P1D"), + naz + Interval("P1D"), + naz + Interval64("P1D"), + nd + Interval("P1D"), + nd + Interval64("P1D"), + ndz + Interval("P1D"), + ndz + Interval64("P1D"), + nt + Interval("P1D"), + nt + Interval64("P1D"), + ntz + Interval("P1D"), + ntz + Interval64("P1D"), + wa + Interval("P1D"), + wa + Interval64("P1D"), + wd + Interval("P1D"), + wd + Interval64("P1D"), + wt + Interval("P1D"), + wt + Interval64("P1D"), + waz + Interval("P1D"), + waz + Interval64("P1D"), + wdz + Interval("P1D"), + wdz + Interval64("P1D"), + wtz + Interval("P1D"), + wtz + Interval64("P1D") +FROM Dates; + diff --git a/yql/essentials/tests/sql/suites/blocks/date_equals.cfg b/yql/essentials/tests/sql/suites/blocks/date_equals.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_equals.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_equals.sql b/yql/essentials/tests/sql/suites/blocks/date_equals.sql new file mode 100644 index 0000000000..397b0a20a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_equals.sql @@ -0,0 +1,169 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + a.na == b.na, + a.na == b.naz, + a.na == b.nd, + a.na == b.ndz, + a.na == b.nt, + a.na == b.ntz, + a.na == b.wa, + a.na == b.wd, + a.na == b.wt, + a.na == b.waz, + a.na == b.wdz, + a.na == b.wtz, + + a.naz == b.na, + a.naz == b.naz, + a.naz == b.nd, + a.naz == b.ndz, + a.naz == b.nt, + a.naz == b.ntz, + a.naz == b.wa, + a.naz == b.wd, + a.naz == b.wt, + a.naz == b.waz, + a.naz == b.wdz, + a.naz == b.wtz, + + a.nd == b.na, + a.nd == b.naz, + a.nd == b.nd, + a.nd == b.ndz, + a.nd == b.nt, + a.nd == b.ntz, + a.nd == b.wa, + a.nd == b.wd, + a.nd == b.wt, + a.nd == b.waz, + a.nd == b.wdz, + a.nd == b.wtz, + + a.ndz == b.na, + a.ndz == b.naz, + a.ndz == b.nd, + a.ndz == b.ndz, + a.ndz == b.nt, + a.ndz == b.ntz, + a.ndz == b.wa, + a.ndz == b.wd, + a.ndz == b.wt, + a.ndz == b.waz, + a.ndz == b.wdz, + a.ndz == b.wtz, + + a.nt == b.na, + a.nt == b.naz, + a.nt == b.nd, + a.nt == b.ndz, + a.nt == b.nt, + a.nt == b.ntz, + a.nt == b.wa, + a.nt == b.wd, + a.nt == b.wt, + a.nt == b.waz, + a.nt == b.wdz, + a.nt == b.wtz, + + a.ntz == b.na, + a.ntz == b.naz, + a.ntz == b.nd, + a.ntz == b.ndz, + a.ntz == b.nt, + a.ntz == b.ntz, + a.ntz == b.wa, + a.ntz == b.wd, + a.ntz == b.wt, + a.ntz == b.waz, + a.ntz == b.wdz, + a.ntz == b.wtz, + + a.ni == b.ni, + a.ni == b.wi, + a.wi == b.ni, + a.wi == b.wi + +FROM Dates as a CROSS JOIN Dates as b; + +SELECT + a.wa == b.na, + a.wa == b.naz, + a.wa == b.nd, + a.wa == b.ndz, + a.wa == b.nt, + a.wa == b.ntz, + a.wa == b.wa, + a.wa == b.wd, + a.wa == b.wt, + a.wa == b.waz, + a.wa == b.wdz, + a.wa == b.wtz, + + a.wd == b.na, + a.wd == b.naz, + a.wd == b.nd, + a.wd == b.ndz, + a.wd == b.nt, + a.wd == b.ntz, + a.wd == b.wa, + a.wd == b.wd, + a.wd == b.wt, + a.wd == b.waz, + a.wd == b.wdz, + a.wd == b.wtz, + + a.wt == b.na, + a.wt == b.naz, + a.wt == b.nd, + a.wt == b.ndz, + a.wt == b.nt, + a.wt == b.ntz, + a.wt == b.wa, + a.wt == b.wd, + a.wt == b.wt, + a.wt == b.waz, + a.wt == b.wdz, + a.wt == b.wtz, + + a.waz == b.na, + a.waz == b.naz, + a.waz == b.nd, + a.waz == b.ndz, + a.waz == b.nt, + a.waz == b.ntz, + a.waz == b.wa, + a.waz == b.wd, + a.waz == b.wt, + a.waz == b.waz, + a.waz == b.wdz, + a.waz == b.wtz, + + a.wdz == b.na, + a.wdz == b.naz, + a.wdz == b.nd, + a.wdz == b.ndz, + a.wdz == b.nt, + a.wdz == b.ntz, + a.wdz == b.wa, + a.wdz == b.wd, + a.wdz == b.wt, + a.wdz == b.waz, + a.wdz == b.wdz, + a.wdz == b.wtz, + + a.wtz == b.na, + a.wtz == b.naz, + a.wtz == b.nd, + a.wtz == b.ndz, + a.wtz == b.nt, + a.wtz == b.ntz, + a.wtz == b.wa, + a.wtz == b.wd, + a.wtz == b.wt, + a.wtz == b.waz, + a.wtz == b.wdz, + a.wtz == b.wtz + +FROM Dates as a CROSS JOIN Dates as b; diff --git a/yql/essentials/tests/sql/suites/blocks/date_equals_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/date_equals_scalar.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_equals_scalar.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_equals_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_equals_scalar.sql new file mode 100644 index 0000000000..568f5cc7c1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_equals_scalar.sql @@ -0,0 +1,332 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + Date("2000-01-01") == na, + Date("2000-01-01") == naz, + Date("2000-01-01") == nd, + Date("2000-01-01") == ndz, + Date("2000-01-01") == nt, + Date("2000-01-01") == ntz, + Date("2000-01-01") == wa, + Date("2000-01-01") == wd, + Date("2000-01-01") == wt, + Date("2000-01-01") == waz, + Date("2000-01-01") == wdz, + Date("2000-01-01") == wtz, + + TzDate("2000-01-01,Europe/Moscow") == na, + TzDate("2000-01-01,Europe/Moscow") == naz, + TzDate("2000-01-01,Europe/Moscow") == nd, + TzDate("2000-01-01,Europe/Moscow") == ndz, + TzDate("2000-01-01,Europe/Moscow") == nt, + TzDate("2000-01-01,Europe/Moscow") == ntz, + TzDate("2000-01-01,Europe/Moscow") == wa, + TzDate("2000-01-01,Europe/Moscow") == wd, + TzDate("2000-01-01,Europe/Moscow") == wt, + TzDate("2000-01-01,Europe/Moscow") == waz, + TzDate("2000-01-01,Europe/Moscow") == wdz, + TzDate("2000-01-01,Europe/Moscow") == wtz, + + Datetime("2000-01-01T03:04:05Z") == na, + Datetime("2000-01-01T03:04:05Z") == naz, + Datetime("2000-01-01T03:04:05Z") == nd, + Datetime("2000-01-01T03:04:05Z") == ndz, + Datetime("2000-01-01T03:04:05Z") == nt, + Datetime("2000-01-01T03:04:05Z") == ntz, + Datetime("2000-01-01T03:04:05Z") == wa, + Datetime("2000-01-01T03:04:05Z") == wd, + Datetime("2000-01-01T03:04:05Z") == wt, + Datetime("2000-01-01T03:04:05Z") == waz, + Datetime("2000-01-01T03:04:05Z") == wdz, + Datetime("2000-01-01T03:04:05Z") == wtz, + + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == na, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == naz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == nd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == ndz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == nt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == ntz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == wa, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == wd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == wt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == waz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == wdz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") == wtz, + + Timestamp("2000-01-01T03:04:05.678912Z") == na, + Timestamp("2000-01-01T03:04:05.678912Z") == naz, + Timestamp("2000-01-01T03:04:05.678912Z") == nd, + Timestamp("2000-01-01T03:04:05.678912Z") == ndz, + Timestamp("2000-01-01T03:04:05.678912Z") == nt, + Timestamp("2000-01-01T03:04:05.678912Z") == ntz, + Timestamp("2000-01-01T03:04:05.678912Z") == wa, + Timestamp("2000-01-01T03:04:05.678912Z") == wd, + Timestamp("2000-01-01T03:04:05.678912Z") == wt, + Timestamp("2000-01-01T03:04:05.678912Z") == waz, + Timestamp("2000-01-01T03:04:05.678912Z") == wdz, + Timestamp("2000-01-01T03:04:05.678912Z") == wtz, + + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == na, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == naz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == nd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == ndz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == nt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == ntz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == wa, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == wd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == wt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == waz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == wdz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") == wtz +FROM Dates; + +SELECT + Date32("1900-01-01") == na, + Date32("1900-01-01") == naz, + Date32("1900-01-01") == nd, + Date32("1900-01-01") == ndz, + Date32("1900-01-01") == nt, + Date32("1900-01-01") == ntz, + Date32("1900-01-01") == wa, + Date32("1900-01-01") == wd, + Date32("1900-01-01") == wt, + Date32("1900-01-01") == waz, + Date32("1900-01-01") == wdz, + Date32("1900-01-01") == wtz, + + Datetime64("1900-01-01T03:04:05Z") == na, + Datetime64("1900-01-01T03:04:05Z") == naz, + Datetime64("1900-01-01T03:04:05Z") == nd, + Datetime64("1900-01-01T03:04:05Z") == ndz, + Datetime64("1900-01-01T03:04:05Z") == nt, + Datetime64("1900-01-01T03:04:05Z") == ntz, + Datetime64("1900-01-01T03:04:05Z") == wa, + Datetime64("1900-01-01T03:04:05Z") == wd, + Datetime64("1900-01-01T03:04:05Z") == wt, + Datetime64("1900-01-01T03:04:05Z") == waz, + Datetime64("1900-01-01T03:04:05Z") == wdz, + Datetime64("1900-01-01T03:04:05Z") == wtz, + + Timestamp64("1900-01-01T03:04:05.678912Z") == na, + Timestamp64("1900-01-01T03:04:05.678912Z") == naz, + Timestamp64("1900-01-01T03:04:05.678912Z") == nd, + Timestamp64("1900-01-01T03:04:05.678912Z") == ndz, + Timestamp64("1900-01-01T03:04:05.678912Z") == nt, + Timestamp64("1900-01-01T03:04:05.678912Z") == ntz, + Timestamp64("1900-01-01T03:04:05.678912Z") == wa, + Timestamp64("1900-01-01T03:04:05.678912Z") == wd, + Timestamp64("1900-01-01T03:04:05.678912Z") == wt, + Timestamp64("1900-01-01T03:04:05.678912Z") == waz, + Timestamp64("1900-01-01T03:04:05.678912Z") == wdz, + Timestamp64("1900-01-01T03:04:05.678912Z") == wtz, + + TzDate32("1900-01-01,Europe/Moscow") == na, + TzDate32("1900-01-01,Europe/Moscow") == naz, + TzDate32("1900-01-01,Europe/Moscow") == nd, + TzDate32("1900-01-01,Europe/Moscow") == ndz, + TzDate32("1900-01-01,Europe/Moscow") == nt, + TzDate32("1900-01-01,Europe/Moscow") == ntz, + TzDate32("1900-01-01,Europe/Moscow") == wa, + TzDate32("1900-01-01,Europe/Moscow") == wd, + TzDate32("1900-01-01,Europe/Moscow") == wt, + TzDate32("1900-01-01,Europe/Moscow") == waz, + TzDate32("1900-01-01,Europe/Moscow") == wdz, + TzDate32("1900-01-01,Europe/Moscow") == wtz, + + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == na, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == naz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == nd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == ndz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == nt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == ntz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == wa, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == wd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == wt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == waz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == wdz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") == wtz, + + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == na, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == naz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == nd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == ndz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == nt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == ntz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == wa, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == wd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == wt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == waz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == wdz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") == wtz, + + Interval("P1D") == ni, + Interval("P1D") == wi, + Interval64("P1D") == ni, + Interval64("P1D") == wi, +FROM Dates; + +SELECT + na == Date("2000-01-01"), + naz == Date("2000-01-01"), + nd == Date("2000-01-01"), + ndz == Date("2000-01-01"), + nt == Date("2000-01-01"), + ntz == Date("2000-01-01"), + wa == Date("2000-01-01"), + wd == Date("2000-01-01"), + wt == Date("2000-01-01"), + waz == Date("2000-01-01"), + wdz == Date("2000-01-01"), + wtz == Date("2000-01-01"), + + na == TzDate("2000-01-01,Europe/Moscow"), + naz == TzDate("2000-01-01,Europe/Moscow"), + nd == TzDate("2000-01-01,Europe/Moscow"), + ndz == TzDate("2000-01-01,Europe/Moscow"), + nt == TzDate("2000-01-01,Europe/Moscow"), + ntz == TzDate("2000-01-01,Europe/Moscow"), + wa == TzDate("2000-01-01,Europe/Moscow"), + wd == TzDate("2000-01-01,Europe/Moscow"), + wt == TzDate("2000-01-01,Europe/Moscow"), + waz == TzDate("2000-01-01,Europe/Moscow"), + wdz == TzDate("2000-01-01,Europe/Moscow"), + wtz == TzDate("2000-01-01,Europe/Moscow"), + + na == Datetime("2000-01-01T03:04:05Z"), + naz == Datetime("2000-01-01T03:04:05Z"), + nd == Datetime("2000-01-01T03:04:05Z"), + ndz == Datetime("2000-01-01T03:04:05Z"), + nt == Datetime("2000-01-01T03:04:05Z"), + ntz == Datetime("2000-01-01T03:04:05Z"), + wa == Datetime("2000-01-01T03:04:05Z"), + wd == Datetime("2000-01-01T03:04:05Z"), + wt == Datetime("2000-01-01T03:04:05Z"), + waz == Datetime("2000-01-01T03:04:05Z"), + wdz == Datetime("2000-01-01T03:04:05Z"), + wtz == Datetime("2000-01-01T03:04:05Z"), + + na == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + naz == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nd == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ndz == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nt == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ntz == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wa == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wd == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wt == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + waz == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wdz == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wtz == TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + + na == Timestamp("2000-01-01T03:04:05.678912Z"), + naz == Timestamp("2000-01-01T03:04:05.678912Z"), + nd == Timestamp("2000-01-01T03:04:05.678912Z"), + ndz == Timestamp("2000-01-01T03:04:05.678912Z"), + nt == Timestamp("2000-01-01T03:04:05.678912Z"), + ntz == Timestamp("2000-01-01T03:04:05.678912Z"), + wa == Timestamp("2000-01-01T03:04:05.678912Z"), + wd == Timestamp("2000-01-01T03:04:05.678912Z"), + wt == Timestamp("2000-01-01T03:04:05.678912Z"), + waz == Timestamp("2000-01-01T03:04:05.678912Z"), + wdz == Timestamp("2000-01-01T03:04:05.678912Z"), + wtz == Timestamp("2000-01-01T03:04:05.678912Z"), + + na == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + naz == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nd == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ndz == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nt == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ntz == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wa == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wd == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wt == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + waz == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wdz == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wtz == TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") +FROM Dates; + +SELECT + na == Date32("1900-01-01"), + naz == Date32("1900-01-01"), + nd == Date32("1900-01-01"), + ndz == Date32("1900-01-01"), + nt == Date32("1900-01-01"), + ntz == Date32("1900-01-01"), + wa == Date32("1900-01-01"), + wd == Date32("1900-01-01"), + wt == Date32("1900-01-01"), + waz == Date32("1900-01-01"), + wdz == Date32("1900-01-01"), + wtz == Date32("1900-01-01"), + + na == Datetime64("1900-01-01T03:04:05Z"), + naz == Datetime64("1900-01-01T03:04:05Z"), + nd == Datetime64("1900-01-01T03:04:05Z"), + ndz == Datetime64("1900-01-01T03:04:05Z"), + nt == Datetime64("1900-01-01T03:04:05Z"), + ntz == Datetime64("1900-01-01T03:04:05Z"), + wa == Datetime64("1900-01-01T03:04:05Z"), + wd == Datetime64("1900-01-01T03:04:05Z"), + wt == Datetime64("1900-01-01T03:04:05Z"), + waz == Datetime64("1900-01-01T03:04:05Z"), + wdz == Datetime64("1900-01-01T03:04:05Z"), + wtz == Datetime64("1900-01-01T03:04:05Z"), + + na == Timestamp64("1900-01-01T03:04:05.678912Z"), + naz == Timestamp64("1900-01-01T03:04:05.678912Z"), + nd == Timestamp64("1900-01-01T03:04:05.678912Z"), + ndz == Timestamp64("1900-01-01T03:04:05.678912Z"), + nt == Timestamp64("1900-01-01T03:04:05.678912Z"), + ntz == Timestamp64("1900-01-01T03:04:05.678912Z"), + wa == Timestamp64("1900-01-01T03:04:05.678912Z"), + wd == Timestamp64("1900-01-01T03:04:05.678912Z"), + wt == Timestamp64("1900-01-01T03:04:05.678912Z"), + waz == Timestamp64("1900-01-01T03:04:05.678912Z"), + wdz == Timestamp64("1900-01-01T03:04:05.678912Z"), + wtz == Timestamp64("1900-01-01T03:04:05.678912Z"), + + na == TzDate32("1900-01-01,Europe/Moscow"), + naz == TzDate32("1900-01-01,Europe/Moscow"), + nd == TzDate32("1900-01-01,Europe/Moscow"), + ndz == TzDate32("1900-01-01,Europe/Moscow"), + nt == TzDate32("1900-01-01,Europe/Moscow"), + ntz == TzDate32("1900-01-01,Europe/Moscow"), + wa == TzDate32("1900-01-01,Europe/Moscow"), + wd == TzDate32("1900-01-01,Europe/Moscow"), + wt == TzDate32("1900-01-01,Europe/Moscow"), + waz == TzDate32("1900-01-01,Europe/Moscow"), + wdz == TzDate32("1900-01-01,Europe/Moscow"), + wtz == TzDate32("1900-01-01,Europe/Moscow"), + + na == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + naz == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nd == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ndz == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nt == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ntz == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wa == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wd == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wt == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + waz == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wdz == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wtz == TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + + na == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + naz == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nd == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ndz == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nt == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ntz == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wa == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wd == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wt == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + waz == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wdz == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wtz == TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + + ni == Interval("P1D"), + wi == Interval("P1D"), + ni == Interval64("P1D"), + wi == Interval64("P1D"), +FROM Dates; diff --git a/yql/essentials/tests/sql/suites/blocks/date_greater.cfg b/yql/essentials/tests/sql/suites/blocks/date_greater.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_greater.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_greater.sql b/yql/essentials/tests/sql/suites/blocks/date_greater.sql new file mode 100644 index 0000000000..27c334fa61 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_greater.sql @@ -0,0 +1,169 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + a.na > b.na, + a.na > b.naz, + a.na > b.nd, + a.na > b.ndz, + a.na > b.nt, + a.na > b.ntz, + a.na > b.wa, + a.na > b.wd, + a.na > b.wt, + a.na > b.waz, + a.na > b.wdz, + a.na > b.wtz, + + a.naz > b.na, + a.naz > b.naz, + a.naz > b.nd, + a.naz > b.ndz, + a.naz > b.nt, + a.naz > b.ntz, + a.naz > b.wa, + a.naz > b.wd, + a.naz > b.wt, + a.naz > b.waz, + a.naz > b.wdz, + a.naz > b.wtz, + + a.nd > b.na, + a.nd > b.naz, + a.nd > b.nd, + a.nd > b.ndz, + a.nd > b.nt, + a.nd > b.ntz, + a.nd > b.wa, + a.nd > b.wd, + a.nd > b.wt, + a.nd > b.waz, + a.nd > b.wdz, + a.nd > b.wtz, + + a.ndz > b.na, + a.ndz > b.naz, + a.ndz > b.nd, + a.ndz > b.ndz, + a.ndz > b.nt, + a.ndz > b.ntz, + a.ndz > b.wa, + a.ndz > b.wd, + a.ndz > b.wt, + a.ndz > b.waz, + a.ndz > b.wdz, + a.ndz > b.wtz, + + a.nt > b.na, + a.nt > b.naz, + a.nt > b.nd, + a.nt > b.ndz, + a.nt > b.nt, + a.nt > b.ntz, + a.nt > b.wa, + a.nt > b.wd, + a.nt > b.wt, + a.nt > b.waz, + a.nt > b.wdz, + a.nt > b.wtz, + + a.ntz > b.na, + a.ntz > b.naz, + a.ntz > b.nd, + a.ntz > b.ndz, + a.ntz > b.nt, + a.ntz > b.ntz, + a.ntz > b.wa, + a.ntz > b.wd, + a.ntz > b.wt, + a.ntz > b.waz, + a.ntz > b.wdz, + a.ntz > b.wtz, + + a.ni > b.ni, + a.ni > b.wi, + a.wi > b.ni, + a.wi > b.wi + +FROM Dates as a CROSS JOIN Dates as b; + +SELECT + a.wa > b.na, + a.wa > b.naz, + a.wa > b.nd, + a.wa > b.ndz, + a.wa > b.nt, + a.wa > b.ntz, + a.wa > b.wa, + a.wa > b.wd, + a.wa > b.wt, + a.wa > b.waz, + a.wa > b.wdz, + a.wa > b.wtz, + + a.wd > b.na, + a.wd > b.naz, + a.wd > b.nd, + a.wd > b.ndz, + a.wd > b.nt, + a.wd > b.ntz, + a.wd > b.wa, + a.wd > b.wd, + a.wd > b.wt, + a.wd > b.waz, + a.wd > b.wdz, + a.wd > b.wtz, + + a.wt > b.na, + a.wt > b.naz, + a.wt > b.nd, + a.wt > b.ndz, + a.wt > b.nt, + a.wt > b.ntz, + a.wt > b.wa, + a.wt > b.wd, + a.wt > b.wt, + a.wt > b.waz, + a.wt > b.wdz, + a.wt > b.wtz, + + a.waz > b.na, + a.waz > b.naz, + a.waz > b.nd, + a.waz > b.ndz, + a.waz > b.nt, + a.waz > b.ntz, + a.waz > b.wa, + a.waz > b.wd, + a.waz > b.wt, + a.waz > b.waz, + a.waz > b.wdz, + a.waz > b.wtz, + + a.wdz > b.na, + a.wdz > b.naz, + a.wdz > b.nd, + a.wdz > b.ndz, + a.wdz > b.nt, + a.wdz > b.ntz, + a.wdz > b.wa, + a.wdz > b.wd, + a.wdz > b.wt, + a.wdz > b.waz, + a.wdz > b.wdz, + a.wdz > b.wtz, + + a.wtz > b.na, + a.wtz > b.naz, + a.wtz > b.nd, + a.wtz > b.ndz, + a.wtz > b.nt, + a.wtz > b.ntz, + a.wtz > b.wa, + a.wtz > b.wd, + a.wtz > b.wt, + a.wtz > b.waz, + a.wtz > b.wdz, + a.wtz > b.wtz + +FROM Dates as a CROSS JOIN Dates as b; diff --git a/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal.cfg b/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal.sql b/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal.sql new file mode 100644 index 0000000000..f8508d2d3e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal.sql @@ -0,0 +1,169 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + a.na >= b.na, + a.na >= b.naz, + a.na >= b.nd, + a.na >= b.ndz, + a.na >= b.nt, + a.na >= b.ntz, + a.na >= b.wa, + a.na >= b.wd, + a.na >= b.wt, + a.na >= b.waz, + a.na >= b.wdz, + a.na >= b.wtz, + + a.naz >= b.na, + a.naz >= b.naz, + a.naz >= b.nd, + a.naz >= b.ndz, + a.naz >= b.nt, + a.naz >= b.ntz, + a.naz >= b.wa, + a.naz >= b.wd, + a.naz >= b.wt, + a.naz >= b.waz, + a.naz >= b.wdz, + a.naz >= b.wtz, + + a.nd >= b.na, + a.nd >= b.naz, + a.nd >= b.nd, + a.nd >= b.ndz, + a.nd >= b.nt, + a.nd >= b.ntz, + a.nd >= b.wa, + a.nd >= b.wd, + a.nd >= b.wt, + a.nd >= b.waz, + a.nd >= b.wdz, + a.nd >= b.wtz, + + a.ndz >= b.na, + a.ndz >= b.naz, + a.ndz >= b.nd, + a.ndz >= b.ndz, + a.ndz >= b.nt, + a.ndz >= b.ntz, + a.ndz >= b.wa, + a.ndz >= b.wd, + a.ndz >= b.wt, + a.ndz >= b.waz, + a.ndz >= b.wdz, + a.ndz >= b.wtz, + + a.nt >= b.na, + a.nt >= b.naz, + a.nt >= b.nd, + a.nt >= b.ndz, + a.nt >= b.nt, + a.nt >= b.ntz, + a.nt >= b.wa, + a.nt >= b.wd, + a.nt >= b.wt, + a.nt >= b.waz, + a.nt >= b.wdz, + a.nt >= b.wtz, + + a.ntz >= b.na, + a.ntz >= b.naz, + a.ntz >= b.nd, + a.ntz >= b.ndz, + a.ntz >= b.nt, + a.ntz >= b.ntz, + a.ntz >= b.wa, + a.ntz >= b.wd, + a.ntz >= b.wt, + a.ntz >= b.waz, + a.ntz >= b.wdz, + a.ntz >= b.wtz, + + a.ni >= b.ni, + a.ni >= b.wi, + a.wi >= b.ni, + a.wi >= b.wi + +FROM Dates as a CROSS JOIN Dates as b; + +SELECT + a.wa >= b.na, + a.wa >= b.naz, + a.wa >= b.nd, + a.wa >= b.ndz, + a.wa >= b.nt, + a.wa >= b.ntz, + a.wa >= b.wa, + a.wa >= b.wd, + a.wa >= b.wt, + a.wa >= b.waz, + a.wa >= b.wdz, + a.wa >= b.wtz, + + a.wd >= b.na, + a.wd >= b.naz, + a.wd >= b.nd, + a.wd >= b.ndz, + a.wd >= b.nt, + a.wd >= b.ntz, + a.wd >= b.wa, + a.wd >= b.wd, + a.wd >= b.wt, + a.wd >= b.waz, + a.wd >= b.wdz, + a.wd >= b.wtz, + + a.wt >= b.na, + a.wt >= b.naz, + a.wt >= b.nd, + a.wt >= b.ndz, + a.wt >= b.nt, + a.wt >= b.ntz, + a.wt >= b.wa, + a.wt >= b.wd, + a.wt >= b.wt, + a.wt >= b.waz, + a.wt >= b.wdz, + a.wt >= b.wtz, + + a.waz >= b.na, + a.waz >= b.naz, + a.waz >= b.nd, + a.waz >= b.ndz, + a.waz >= b.nt, + a.waz >= b.ntz, + a.waz >= b.wa, + a.waz >= b.wd, + a.waz >= b.wt, + a.waz >= b.waz, + a.waz >= b.wdz, + a.waz >= b.wtz, + + a.wdz >= b.na, + a.wdz >= b.naz, + a.wdz >= b.nd, + a.wdz >= b.ndz, + a.wdz >= b.nt, + a.wdz >= b.ntz, + a.wdz >= b.wa, + a.wdz >= b.wd, + a.wdz >= b.wt, + a.wdz >= b.waz, + a.wdz >= b.wdz, + a.wdz >= b.wtz, + + a.wtz >= b.na, + a.wtz >= b.naz, + a.wtz >= b.nd, + a.wtz >= b.ndz, + a.wtz >= b.nt, + a.wtz >= b.ntz, + a.wtz >= b.wa, + a.wtz >= b.wd, + a.wtz >= b.wt, + a.wtz >= b.waz, + a.wtz >= b.wdz, + a.wtz >= b.wtz + +FROM Dates as a CROSS JOIN Dates as b; diff --git a/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal_scalar.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal_scalar.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal_scalar.sql new file mode 100644 index 0000000000..f200b0deaa --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_greater_or_equal_scalar.sql @@ -0,0 +1,332 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + Date("2000-01-01") >= na, + Date("2000-01-01") >= naz, + Date("2000-01-01") >= nd, + Date("2000-01-01") >= ndz, + Date("2000-01-01") >= nt, + Date("2000-01-01") >= ntz, + Date("2000-01-01") >= wa, + Date("2000-01-01") >= wd, + Date("2000-01-01") >= wt, + Date("2000-01-01") >= waz, + Date("2000-01-01") >= wdz, + Date("2000-01-01") >= wtz, + + TzDate("2000-01-01,Europe/Moscow") >= na, + TzDate("2000-01-01,Europe/Moscow") >= naz, + TzDate("2000-01-01,Europe/Moscow") >= nd, + TzDate("2000-01-01,Europe/Moscow") >= ndz, + TzDate("2000-01-01,Europe/Moscow") >= nt, + TzDate("2000-01-01,Europe/Moscow") >= ntz, + TzDate("2000-01-01,Europe/Moscow") >= wa, + TzDate("2000-01-01,Europe/Moscow") >= wd, + TzDate("2000-01-01,Europe/Moscow") >= wt, + TzDate("2000-01-01,Europe/Moscow") >= waz, + TzDate("2000-01-01,Europe/Moscow") >= wdz, + TzDate("2000-01-01,Europe/Moscow") >= wtz, + + Datetime("2000-01-01T03:04:05Z") >= na, + Datetime("2000-01-01T03:04:05Z") >= naz, + Datetime("2000-01-01T03:04:05Z") >= nd, + Datetime("2000-01-01T03:04:05Z") >= ndz, + Datetime("2000-01-01T03:04:05Z") >= nt, + Datetime("2000-01-01T03:04:05Z") >= ntz, + Datetime("2000-01-01T03:04:05Z") >= wa, + Datetime("2000-01-01T03:04:05Z") >= wd, + Datetime("2000-01-01T03:04:05Z") >= wt, + Datetime("2000-01-01T03:04:05Z") >= waz, + Datetime("2000-01-01T03:04:05Z") >= wdz, + Datetime("2000-01-01T03:04:05Z") >= wtz, + + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= na, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= naz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= nd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= ndz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= nt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= ntz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= wa, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= wd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= wt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= waz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= wdz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") >= wtz, + + Timestamp("2000-01-01T03:04:05.678912Z") >= na, + Timestamp("2000-01-01T03:04:05.678912Z") >= naz, + Timestamp("2000-01-01T03:04:05.678912Z") >= nd, + Timestamp("2000-01-01T03:04:05.678912Z") >= ndz, + Timestamp("2000-01-01T03:04:05.678912Z") >= nt, + Timestamp("2000-01-01T03:04:05.678912Z") >= ntz, + Timestamp("2000-01-01T03:04:05.678912Z") >= wa, + Timestamp("2000-01-01T03:04:05.678912Z") >= wd, + Timestamp("2000-01-01T03:04:05.678912Z") >= wt, + Timestamp("2000-01-01T03:04:05.678912Z") >= waz, + Timestamp("2000-01-01T03:04:05.678912Z") >= wdz, + Timestamp("2000-01-01T03:04:05.678912Z") >= wtz, + + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= na, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= naz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= nd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= ndz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= nt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= ntz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= wa, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= wd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= wt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= waz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= wdz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") >= wtz +FROM Dates; + +SELECT + Date32("1900-01-01") >= na, + Date32("1900-01-01") >= naz, + Date32("1900-01-01") >= nd, + Date32("1900-01-01") >= ndz, + Date32("1900-01-01") >= nt, + Date32("1900-01-01") >= ntz, + Date32("1900-01-01") >= wa, + Date32("1900-01-01") >= wd, + Date32("1900-01-01") >= wt, + Date32("1900-01-01") >= waz, + Date32("1900-01-01") >= wdz, + Date32("1900-01-01") >= wtz, + + Datetime64("1900-01-01T03:04:05Z") >= na, + Datetime64("1900-01-01T03:04:05Z") >= naz, + Datetime64("1900-01-01T03:04:05Z") >= nd, + Datetime64("1900-01-01T03:04:05Z") >= ndz, + Datetime64("1900-01-01T03:04:05Z") >= nt, + Datetime64("1900-01-01T03:04:05Z") >= ntz, + Datetime64("1900-01-01T03:04:05Z") >= wa, + Datetime64("1900-01-01T03:04:05Z") >= wd, + Datetime64("1900-01-01T03:04:05Z") >= wt, + Datetime64("1900-01-01T03:04:05Z") >= waz, + Datetime64("1900-01-01T03:04:05Z") >= wdz, + Datetime64("1900-01-01T03:04:05Z") >= wtz, + + Timestamp64("1900-01-01T03:04:05.678912Z") >= na, + Timestamp64("1900-01-01T03:04:05.678912Z") >= naz, + Timestamp64("1900-01-01T03:04:05.678912Z") >= nd, + Timestamp64("1900-01-01T03:04:05.678912Z") >= ndz, + Timestamp64("1900-01-01T03:04:05.678912Z") >= nt, + Timestamp64("1900-01-01T03:04:05.678912Z") >= ntz, + Timestamp64("1900-01-01T03:04:05.678912Z") >= wa, + Timestamp64("1900-01-01T03:04:05.678912Z") >= wd, + Timestamp64("1900-01-01T03:04:05.678912Z") >= wt, + Timestamp64("1900-01-01T03:04:05.678912Z") >= waz, + Timestamp64("1900-01-01T03:04:05.678912Z") >= wdz, + Timestamp64("1900-01-01T03:04:05.678912Z") >= wtz, + + TzDate32("1900-01-01,Europe/Moscow") >= na, + TzDate32("1900-01-01,Europe/Moscow") >= naz, + TzDate32("1900-01-01,Europe/Moscow") >= nd, + TzDate32("1900-01-01,Europe/Moscow") >= ndz, + TzDate32("1900-01-01,Europe/Moscow") >= nt, + TzDate32("1900-01-01,Europe/Moscow") >= ntz, + TzDate32("1900-01-01,Europe/Moscow") >= wa, + TzDate32("1900-01-01,Europe/Moscow") >= wd, + TzDate32("1900-01-01,Europe/Moscow") >= wt, + TzDate32("1900-01-01,Europe/Moscow") >= waz, + TzDate32("1900-01-01,Europe/Moscow") >= wdz, + TzDate32("1900-01-01,Europe/Moscow") >= wtz, + + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= na, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= naz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= nd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= ndz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= nt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= ntz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= wa, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= wd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= wt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= waz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= wdz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") >= wtz, + + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= na, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= naz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= nd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= ndz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= nt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= ntz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= wa, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= wd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= wt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= waz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= wdz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") >= wtz, + + Interval("P1D") >= ni, + Interval("P1D") >= wi, + Interval64("P1D") >= ni, + Interval64("P1D") >= wi, +FROM Dates; + +SELECT + na >= Date("2000-01-01"), + naz >= Date("2000-01-01"), + nd >= Date("2000-01-01"), + ndz >= Date("2000-01-01"), + nt >= Date("2000-01-01"), + ntz >= Date("2000-01-01"), + wa >= Date("2000-01-01"), + wd >= Date("2000-01-01"), + wt >= Date("2000-01-01"), + waz >= Date("2000-01-01"), + wdz >= Date("2000-01-01"), + wtz >= Date("2000-01-01"), + + na >= TzDate("2000-01-01,Europe/Moscow"), + naz >= TzDate("2000-01-01,Europe/Moscow"), + nd >= TzDate("2000-01-01,Europe/Moscow"), + ndz >= TzDate("2000-01-01,Europe/Moscow"), + nt >= TzDate("2000-01-01,Europe/Moscow"), + ntz >= TzDate("2000-01-01,Europe/Moscow"), + wa >= TzDate("2000-01-01,Europe/Moscow"), + wd >= TzDate("2000-01-01,Europe/Moscow"), + wt >= TzDate("2000-01-01,Europe/Moscow"), + waz >= TzDate("2000-01-01,Europe/Moscow"), + wdz >= TzDate("2000-01-01,Europe/Moscow"), + wtz >= TzDate("2000-01-01,Europe/Moscow"), + + na >= Datetime("2000-01-01T03:04:05Z"), + naz >= Datetime("2000-01-01T03:04:05Z"), + nd >= Datetime("2000-01-01T03:04:05Z"), + ndz >= Datetime("2000-01-01T03:04:05Z"), + nt >= Datetime("2000-01-01T03:04:05Z"), + ntz >= Datetime("2000-01-01T03:04:05Z"), + wa >= Datetime("2000-01-01T03:04:05Z"), + wd >= Datetime("2000-01-01T03:04:05Z"), + wt >= Datetime("2000-01-01T03:04:05Z"), + waz >= Datetime("2000-01-01T03:04:05Z"), + wdz >= Datetime("2000-01-01T03:04:05Z"), + wtz >= Datetime("2000-01-01T03:04:05Z"), + + na >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + naz >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nd >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ndz >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nt >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ntz >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wa >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wd >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wt >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + waz >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wdz >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wtz >= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + + na >= Timestamp("2000-01-01T03:04:05.678912Z"), + naz >= Timestamp("2000-01-01T03:04:05.678912Z"), + nd >= Timestamp("2000-01-01T03:04:05.678912Z"), + ndz >= Timestamp("2000-01-01T03:04:05.678912Z"), + nt >= Timestamp("2000-01-01T03:04:05.678912Z"), + ntz >= Timestamp("2000-01-01T03:04:05.678912Z"), + wa >= Timestamp("2000-01-01T03:04:05.678912Z"), + wd >= Timestamp("2000-01-01T03:04:05.678912Z"), + wt >= Timestamp("2000-01-01T03:04:05.678912Z"), + waz >= Timestamp("2000-01-01T03:04:05.678912Z"), + wdz >= Timestamp("2000-01-01T03:04:05.678912Z"), + wtz >= Timestamp("2000-01-01T03:04:05.678912Z"), + + na >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + naz >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nd >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ndz >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nt >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ntz >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wa >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wd >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wt >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + waz >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wdz >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wtz >= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") +FROM Dates; + +SELECT + na >= Date32("1900-01-01"), + naz >= Date32("1900-01-01"), + nd >= Date32("1900-01-01"), + ndz >= Date32("1900-01-01"), + nt >= Date32("1900-01-01"), + ntz >= Date32("1900-01-01"), + wa >= Date32("1900-01-01"), + wd >= Date32("1900-01-01"), + wt >= Date32("1900-01-01"), + waz >= Date32("1900-01-01"), + wdz >= Date32("1900-01-01"), + wtz >= Date32("1900-01-01"), + + na >= Datetime64("1900-01-01T03:04:05Z"), + naz >= Datetime64("1900-01-01T03:04:05Z"), + nd >= Datetime64("1900-01-01T03:04:05Z"), + ndz >= Datetime64("1900-01-01T03:04:05Z"), + nt >= Datetime64("1900-01-01T03:04:05Z"), + ntz >= Datetime64("1900-01-01T03:04:05Z"), + wa >= Datetime64("1900-01-01T03:04:05Z"), + wd >= Datetime64("1900-01-01T03:04:05Z"), + wt >= Datetime64("1900-01-01T03:04:05Z"), + waz >= Datetime64("1900-01-01T03:04:05Z"), + wdz >= Datetime64("1900-01-01T03:04:05Z"), + wtz >= Datetime64("1900-01-01T03:04:05Z"), + + na >= Timestamp64("1900-01-01T03:04:05.678912Z"), + naz >= Timestamp64("1900-01-01T03:04:05.678912Z"), + nd >= Timestamp64("1900-01-01T03:04:05.678912Z"), + ndz >= Timestamp64("1900-01-01T03:04:05.678912Z"), + nt >= Timestamp64("1900-01-01T03:04:05.678912Z"), + ntz >= Timestamp64("1900-01-01T03:04:05.678912Z"), + wa >= Timestamp64("1900-01-01T03:04:05.678912Z"), + wd >= Timestamp64("1900-01-01T03:04:05.678912Z"), + wt >= Timestamp64("1900-01-01T03:04:05.678912Z"), + waz >= Timestamp64("1900-01-01T03:04:05.678912Z"), + wdz >= Timestamp64("1900-01-01T03:04:05.678912Z"), + wtz >= Timestamp64("1900-01-01T03:04:05.678912Z"), + + na >= TzDate32("1900-01-01,Europe/Moscow"), + naz >= TzDate32("1900-01-01,Europe/Moscow"), + nd >= TzDate32("1900-01-01,Europe/Moscow"), + ndz >= TzDate32("1900-01-01,Europe/Moscow"), + nt >= TzDate32("1900-01-01,Europe/Moscow"), + ntz >= TzDate32("1900-01-01,Europe/Moscow"), + wa >= TzDate32("1900-01-01,Europe/Moscow"), + wd >= TzDate32("1900-01-01,Europe/Moscow"), + wt >= TzDate32("1900-01-01,Europe/Moscow"), + waz >= TzDate32("1900-01-01,Europe/Moscow"), + wdz >= TzDate32("1900-01-01,Europe/Moscow"), + wtz >= TzDate32("1900-01-01,Europe/Moscow"), + + na >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + naz >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nd >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ndz >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nt >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ntz >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wa >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wd >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wt >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + waz >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wdz >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wtz >= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + + na >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + naz >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nd >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ndz >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nt >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ntz >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wa >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wd >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wt >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + waz >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wdz >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wtz >= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + + ni >= Interval("P1D"), + wi >= Interval("P1D"), + ni >= Interval64("P1D"), + wi >= Interval64("P1D"), +FROM Dates; diff --git a/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql new file mode 100644 index 0000000000..b390aab2ec --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_greater_scalar.sql @@ -0,0 +1,332 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + Date("2000-01-01") > na, + Date("2000-01-01") > naz, + Date("2000-01-01") > nd, + Date("2000-01-01") > ndz, + Date("2000-01-01") > nt, + Date("2000-01-01") > ntz, + Date("2000-01-01") > wa, + Date("2000-01-01") > wd, + Date("2000-01-01") > wt, + Date("2000-01-01") > waz, + Date("2000-01-01") > wdz, + Date("2000-01-01") > wtz, + + TzDate("2000-01-01,Europe/Moscow") > na, + TzDate("2000-01-01,Europe/Moscow") > naz, + TzDate("2000-01-01,Europe/Moscow") > nd, + TzDate("2000-01-01,Europe/Moscow") > ndz, + TzDate("2000-01-01,Europe/Moscow") > nt, + TzDate("2000-01-01,Europe/Moscow") > ntz, + TzDate("2000-01-01,Europe/Moscow") > wa, + TzDate("2000-01-01,Europe/Moscow") > wd, + TzDate("2000-01-01,Europe/Moscow") > wt, + TzDate("2000-01-01,Europe/Moscow") > waz, + TzDate("2000-01-01,Europe/Moscow") > wdz, + TzDate("2000-01-01,Europe/Moscow") > wtz, + + Datetime("2000-01-01T03:04:05Z") > na, + Datetime("2000-01-01T03:04:05Z") > naz, + Datetime("2000-01-01T03:04:05Z") > nd, + Datetime("2000-01-01T03:04:05Z") > ndz, + Datetime("2000-01-01T03:04:05Z") > nt, + Datetime("2000-01-01T03:04:05Z") > ntz, + Datetime("2000-01-01T03:04:05Z") > wa, + Datetime("2000-01-01T03:04:05Z") > wd, + Datetime("2000-01-01T03:04:05Z") > wt, + Datetime("2000-01-01T03:04:05Z") > waz, + Datetime("2000-01-01T03:04:05Z") > wdz, + Datetime("2000-01-01T03:04:05Z") > wtz, + + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > na, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > naz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > nd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > ndz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > nt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > ntz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wa, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > waz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wdz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") > wtz, + + Timestamp("2000-01-01T03:04:05.678912Z") > na, + Timestamp("2000-01-01T03:04:05.678912Z") > naz, + Timestamp("2000-01-01T03:04:05.678912Z") > nd, + Timestamp("2000-01-01T03:04:05.678912Z") > ndz, + Timestamp("2000-01-01T03:04:05.678912Z") > nt, + Timestamp("2000-01-01T03:04:05.678912Z") > ntz, + Timestamp("2000-01-01T03:04:05.678912Z") > wa, + Timestamp("2000-01-01T03:04:05.678912Z") > wd, + Timestamp("2000-01-01T03:04:05.678912Z") > wt, + Timestamp("2000-01-01T03:04:05.678912Z") > waz, + Timestamp("2000-01-01T03:04:05.678912Z") > wdz, + Timestamp("2000-01-01T03:04:05.678912Z") > wtz, + + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > na, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > naz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > nd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > ndz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > nt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > ntz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wa, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > waz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wdz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") > wtz +FROM Dates; + +SELECT + Date32("1900-01-01") > na, + Date32("1900-01-01") > naz, + Date32("1900-01-01") > nd, + Date32("1900-01-01") > ndz, + Date32("1900-01-01") > nt, + Date32("1900-01-01") > ntz, + Date32("1900-01-01") > wa, + Date32("1900-01-01") > wd, + Date32("1900-01-01") > wt, + Date32("1900-01-01") > waz, + Date32("1900-01-01") > wdz, + Date32("1900-01-01") > wtz, + + Datetime64("1900-01-01T03:04:05Z") > na, + Datetime64("1900-01-01T03:04:05Z") > naz, + Datetime64("1900-01-01T03:04:05Z") > nd, + Datetime64("1900-01-01T03:04:05Z") > ndz, + Datetime64("1900-01-01T03:04:05Z") > nt, + Datetime64("1900-01-01T03:04:05Z") > ntz, + Datetime64("1900-01-01T03:04:05Z") > wa, + Datetime64("1900-01-01T03:04:05Z") > wd, + Datetime64("1900-01-01T03:04:05Z") > wt, + Datetime64("1900-01-01T03:04:05Z") > waz, + Datetime64("1900-01-01T03:04:05Z") > wdz, + Datetime64("1900-01-01T03:04:05Z") > wtz, + + Timestamp64("1900-01-01T03:04:05.678912Z") > na, + Timestamp64("1900-01-01T03:04:05.678912Z") > naz, + Timestamp64("1900-01-01T03:04:05.678912Z") > nd, + Timestamp64("1900-01-01T03:04:05.678912Z") > ndz, + Timestamp64("1900-01-01T03:04:05.678912Z") > nt, + Timestamp64("1900-01-01T03:04:05.678912Z") > ntz, + Timestamp64("1900-01-01T03:04:05.678912Z") > wa, + Timestamp64("1900-01-01T03:04:05.678912Z") > wd, + Timestamp64("1900-01-01T03:04:05.678912Z") > wt, + Timestamp64("1900-01-01T03:04:05.678912Z") > waz, + Timestamp64("1900-01-01T03:04:05.678912Z") > wdz, + Timestamp64("1900-01-01T03:04:05.678912Z") > wtz, + + TzDate32("1900-01-01,Europe/Moscow") > na, + TzDate32("1900-01-01,Europe/Moscow") > naz, + TzDate32("1900-01-01,Europe/Moscow") > nd, + TzDate32("1900-01-01,Europe/Moscow") > ndz, + TzDate32("1900-01-01,Europe/Moscow") > nt, + TzDate32("1900-01-01,Europe/Moscow") > ntz, + TzDate32("1900-01-01,Europe/Moscow") > wa, + TzDate32("1900-01-01,Europe/Moscow") > wd, + TzDate32("1900-01-01,Europe/Moscow") > wt, + TzDate32("1900-01-01,Europe/Moscow") > waz, + TzDate32("1900-01-01,Europe/Moscow") > wdz, + TzDate32("1900-01-01,Europe/Moscow") > wtz, + + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > na, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > naz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > nd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > ndz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > nt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > ntz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wa, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > waz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wdz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") > wtz, + + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > na, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > naz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > nd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > ndz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > nt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > ntz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wa, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > waz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wdz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") > wtz, + + Interval("P1D") > ni, + Interval("P1D") > wi, + Interval64("P1D") > ni, + Interval64("P1D") > wi, +FROM Dates; + +SELECT + na > Date("2000-01-01"), + naz > Date("2000-01-01"), + nd > Date("2000-01-01"), + ndz > Date("2000-01-01"), + nt > Date("2000-01-01"), + ntz > Date("2000-01-01"), + wa > Date("2000-01-01"), + wd > Date("2000-01-01"), + wt > Date("2000-01-01"), + waz > Date("2000-01-01"), + wdz > Date("2000-01-01"), + wtz > Date("2000-01-01"), + + na > TzDate("2000-01-01,Europe/Moscow"), + naz > TzDate("2000-01-01,Europe/Moscow"), + nd > TzDate("2000-01-01,Europe/Moscow"), + ndz > TzDate("2000-01-01,Europe/Moscow"), + nt > TzDate("2000-01-01,Europe/Moscow"), + ntz > TzDate("2000-01-01,Europe/Moscow"), + wa > TzDate("2000-01-01,Europe/Moscow"), + wd > TzDate("2000-01-01,Europe/Moscow"), + wt > TzDate("2000-01-01,Europe/Moscow"), + waz > TzDate("2000-01-01,Europe/Moscow"), + wdz > TzDate("2000-01-01,Europe/Moscow"), + wtz > TzDate("2000-01-01,Europe/Moscow"), + + na > Datetime("2000-01-01T03:04:05Z"), + naz > Datetime("2000-01-01T03:04:05Z"), + nd > Datetime("2000-01-01T03:04:05Z"), + ndz > Datetime("2000-01-01T03:04:05Z"), + nt > Datetime("2000-01-01T03:04:05Z"), + ntz > Datetime("2000-01-01T03:04:05Z"), + wa > Datetime("2000-01-01T03:04:05Z"), + wd > Datetime("2000-01-01T03:04:05Z"), + wt > Datetime("2000-01-01T03:04:05Z"), + waz > Datetime("2000-01-01T03:04:05Z"), + wdz > Datetime("2000-01-01T03:04:05Z"), + wtz > Datetime("2000-01-01T03:04:05Z"), + + na > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + naz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nd > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ndz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nt > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ntz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wa > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wd > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wt > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + waz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wdz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wtz > TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + + na > Timestamp("2000-01-01T03:04:05.678912Z"), + naz > Timestamp("2000-01-01T03:04:05.678912Z"), + nd > Timestamp("2000-01-01T03:04:05.678912Z"), + ndz > Timestamp("2000-01-01T03:04:05.678912Z"), + nt > Timestamp("2000-01-01T03:04:05.678912Z"), + ntz > Timestamp("2000-01-01T03:04:05.678912Z"), + wa > Timestamp("2000-01-01T03:04:05.678912Z"), + wd > Timestamp("2000-01-01T03:04:05.678912Z"), + wt > Timestamp("2000-01-01T03:04:05.678912Z"), + waz > Timestamp("2000-01-01T03:04:05.678912Z"), + wdz > Timestamp("2000-01-01T03:04:05.678912Z"), + wtz > Timestamp("2000-01-01T03:04:05.678912Z"), + + na > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + naz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nd > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ndz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nt > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ntz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wa > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wd > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wt > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + waz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wdz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wtz > TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") +FROM Dates; + +SELECT + na > Date32("1900-01-01"), + naz > Date32("1900-01-01"), + nd > Date32("1900-01-01"), + ndz > Date32("1900-01-01"), + nt > Date32("1900-01-01"), + ntz > Date32("1900-01-01"), + wa > Date32("1900-01-01"), + wd > Date32("1900-01-01"), + wt > Date32("1900-01-01"), + waz > Date32("1900-01-01"), + wdz > Date32("1900-01-01"), + wtz > Date32("1900-01-01"), + + na > Datetime64("1900-01-01T03:04:05Z"), + naz > Datetime64("1900-01-01T03:04:05Z"), + nd > Datetime64("1900-01-01T03:04:05Z"), + ndz > Datetime64("1900-01-01T03:04:05Z"), + nt > Datetime64("1900-01-01T03:04:05Z"), + ntz > Datetime64("1900-01-01T03:04:05Z"), + wa > Datetime64("1900-01-01T03:04:05Z"), + wd > Datetime64("1900-01-01T03:04:05Z"), + wt > Datetime64("1900-01-01T03:04:05Z"), + waz > Datetime64("1900-01-01T03:04:05Z"), + wdz > Datetime64("1900-01-01T03:04:05Z"), + wtz > Datetime64("1900-01-01T03:04:05Z"), + + na > Timestamp64("1900-01-01T03:04:05.678912Z"), + naz > Timestamp64("1900-01-01T03:04:05.678912Z"), + nd > Timestamp64("1900-01-01T03:04:05.678912Z"), + ndz > Timestamp64("1900-01-01T03:04:05.678912Z"), + nt > Timestamp64("1900-01-01T03:04:05.678912Z"), + ntz > Timestamp64("1900-01-01T03:04:05.678912Z"), + wa > Timestamp64("1900-01-01T03:04:05.678912Z"), + wd > Timestamp64("1900-01-01T03:04:05.678912Z"), + wt > Timestamp64("1900-01-01T03:04:05.678912Z"), + waz > Timestamp64("1900-01-01T03:04:05.678912Z"), + wdz > Timestamp64("1900-01-01T03:04:05.678912Z"), + wtz > Timestamp64("1900-01-01T03:04:05.678912Z"), + + na > TzDate32("1900-01-01,Europe/Moscow"), + naz > TzDate32("1900-01-01,Europe/Moscow"), + nd > TzDate32("1900-01-01,Europe/Moscow"), + ndz > TzDate32("1900-01-01,Europe/Moscow"), + nt > TzDate32("1900-01-01,Europe/Moscow"), + ntz > TzDate32("1900-01-01,Europe/Moscow"), + wa > TzDate32("1900-01-01,Europe/Moscow"), + wd > TzDate32("1900-01-01,Europe/Moscow"), + wt > TzDate32("1900-01-01,Europe/Moscow"), + waz > TzDate32("1900-01-01,Europe/Moscow"), + wdz > TzDate32("1900-01-01,Europe/Moscow"), + wtz > TzDate32("1900-01-01,Europe/Moscow"), + + na > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + naz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nd > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ndz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nt > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ntz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wa > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wd > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wt > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + waz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wdz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wtz > TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + + na > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + naz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nd > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ndz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nt > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ntz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wa > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wd > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wt > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + waz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wdz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wtz > TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + + ni > Interval("P1D"), + wi > Interval("P1D"), + ni > Interval64("P1D"), + wi > Interval64("P1D"), +FROM Dates; diff --git a/yql/essentials/tests/sql/suites/blocks/date_group_by.cfg b/yql/essentials/tests/sql/suites/blocks/date_group_by.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_group_by.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_group_by.sql b/yql/essentials/tests/sql/suites/blocks/date_group_by.sql new file mode 100644 index 0000000000..52354c9ea8 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_group_by.sql @@ -0,0 +1,9 @@ +USE plato; +pragma yt.UseNativeDescSort; +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +SELECT + count(*),min(i8) +FROM (SELECT * FROM concat(Dates,Dates)) as t +GROUP BY na,wa,naz,waz,nd,ndz,wd,wdz,nt,ntz,wt,wtz,ni,wi; + diff --git a/yql/essentials/tests/sql/suites/blocks/date_less.cfg b/yql/essentials/tests/sql/suites/blocks/date_less.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_less.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_less.sql b/yql/essentials/tests/sql/suites/blocks/date_less.sql new file mode 100644 index 0000000000..7145452b86 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_less.sql @@ -0,0 +1,169 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + a.na < b.na, + a.na < b.naz, + a.na < b.nd, + a.na < b.ndz, + a.na < b.nt, + a.na < b.ntz, + a.na < b.wa, + a.na < b.wd, + a.na < b.wt, + a.na < b.waz, + a.na < b.wdz, + a.na < b.wtz, + + a.naz < b.na, + a.naz < b.naz, + a.naz < b.nd, + a.naz < b.ndz, + a.naz < b.nt, + a.naz < b.ntz, + a.naz < b.wa, + a.naz < b.wd, + a.naz < b.wt, + a.naz < b.waz, + a.naz < b.wdz, + a.naz < b.wtz, + + a.nd < b.na, + a.nd < b.naz, + a.nd < b.nd, + a.nd < b.ndz, + a.nd < b.nt, + a.nd < b.ntz, + a.nd < b.wa, + a.nd < b.wd, + a.nd < b.wt, + a.nd < b.waz, + a.nd < b.wdz, + a.nd < b.wtz, + + a.ndz < b.na, + a.ndz < b.naz, + a.ndz < b.nd, + a.ndz < b.ndz, + a.ndz < b.nt, + a.ndz < b.ntz, + a.ndz < b.wa, + a.ndz < b.wd, + a.ndz < b.wt, + a.ndz < b.waz, + a.ndz < b.wdz, + a.ndz < b.wtz, + + a.nt < b.na, + a.nt < b.naz, + a.nt < b.nd, + a.nt < b.ndz, + a.nt < b.nt, + a.nt < b.ntz, + a.nt < b.wa, + a.nt < b.wd, + a.nt < b.wt, + a.nt < b.waz, + a.nt < b.wdz, + a.nt < b.wtz, + + a.ntz < b.na, + a.ntz < b.naz, + a.ntz < b.nd, + a.ntz < b.ndz, + a.ntz < b.nt, + a.ntz < b.ntz, + a.ntz < b.wa, + a.ntz < b.wd, + a.ntz < b.wt, + a.ntz < b.waz, + a.ntz < b.wdz, + a.ntz < b.wtz, + + a.ni < b.ni, + a.ni < b.wi, + a.wi < b.ni, + a.wi < b.wi + +FROM Dates as a CROSS JOIN Dates as b; + +SELECT + a.wa < b.na, + a.wa < b.naz, + a.wa < b.nd, + a.wa < b.ndz, + a.wa < b.nt, + a.wa < b.ntz, + a.wa < b.wa, + a.wa < b.wd, + a.wa < b.wt, + a.wa < b.waz, + a.wa < b.wdz, + a.wa < b.wtz, + + a.wd < b.na, + a.wd < b.naz, + a.wd < b.nd, + a.wd < b.ndz, + a.wd < b.nt, + a.wd < b.ntz, + a.wd < b.wa, + a.wd < b.wd, + a.wd < b.wt, + a.wd < b.waz, + a.wd < b.wdz, + a.wd < b.wtz, + + a.wt < b.na, + a.wt < b.naz, + a.wt < b.nd, + a.wt < b.ndz, + a.wt < b.nt, + a.wt < b.ntz, + a.wt < b.wa, + a.wt < b.wd, + a.wt < b.wt, + a.wt < b.waz, + a.wt < b.wdz, + a.wt < b.wtz, + + a.waz < b.na, + a.waz < b.naz, + a.waz < b.nd, + a.waz < b.ndz, + a.waz < b.nt, + a.waz < b.ntz, + a.waz < b.wa, + a.waz < b.wd, + a.waz < b.wt, + a.waz < b.waz, + a.waz < b.wdz, + a.waz < b.wtz, + + a.wdz < b.na, + a.wdz < b.naz, + a.wdz < b.nd, + a.wdz < b.ndz, + a.wdz < b.nt, + a.wdz < b.ntz, + a.wdz < b.wa, + a.wdz < b.wd, + a.wdz < b.wt, + a.wdz < b.waz, + a.wdz < b.wdz, + a.wdz < b.wtz, + + a.wtz < b.na, + a.wtz < b.naz, + a.wtz < b.nd, + a.wtz < b.ndz, + a.wtz < b.nt, + a.wtz < b.ntz, + a.wtz < b.wa, + a.wtz < b.wd, + a.wtz < b.wt, + a.wtz < b.waz, + a.wtz < b.wdz, + a.wtz < b.wtz + +FROM Dates as a CROSS JOIN Dates as b; diff --git a/yql/essentials/tests/sql/suites/blocks/date_less_or_equal.cfg b/yql/essentials/tests/sql/suites/blocks/date_less_or_equal.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_less_or_equal.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_less_or_equal.sql b/yql/essentials/tests/sql/suites/blocks/date_less_or_equal.sql new file mode 100644 index 0000000000..e0ea714ca5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_less_or_equal.sql @@ -0,0 +1,169 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + a.na <= b.na, + a.na <= b.naz, + a.na <= b.nd, + a.na <= b.ndz, + a.na <= b.nt, + a.na <= b.ntz, + a.na <= b.wa, + a.na <= b.wd, + a.na <= b.wt, + a.na <= b.waz, + a.na <= b.wdz, + a.na <= b.wtz, + + a.naz <= b.na, + a.naz <= b.naz, + a.naz <= b.nd, + a.naz <= b.ndz, + a.naz <= b.nt, + a.naz <= b.ntz, + a.naz <= b.wa, + a.naz <= b.wd, + a.naz <= b.wt, + a.naz <= b.waz, + a.naz <= b.wdz, + a.naz <= b.wtz, + + a.nd <= b.na, + a.nd <= b.naz, + a.nd <= b.nd, + a.nd <= b.ndz, + a.nd <= b.nt, + a.nd <= b.ntz, + a.nd <= b.wa, + a.nd <= b.wd, + a.nd <= b.wt, + a.nd <= b.waz, + a.nd <= b.wdz, + a.nd <= b.wtz, + + a.ndz <= b.na, + a.ndz <= b.naz, + a.ndz <= b.nd, + a.ndz <= b.ndz, + a.ndz <= b.nt, + a.ndz <= b.ntz, + a.ndz <= b.wa, + a.ndz <= b.wd, + a.ndz <= b.wt, + a.ndz <= b.waz, + a.ndz <= b.wdz, + a.ndz <= b.wtz, + + a.nt <= b.na, + a.nt <= b.naz, + a.nt <= b.nd, + a.nt <= b.ndz, + a.nt <= b.nt, + a.nt <= b.ntz, + a.nt <= b.wa, + a.nt <= b.wd, + a.nt <= b.wt, + a.nt <= b.waz, + a.nt <= b.wdz, + a.nt <= b.wtz, + + a.ntz <= b.na, + a.ntz <= b.naz, + a.ntz <= b.nd, + a.ntz <= b.ndz, + a.ntz <= b.nt, + a.ntz <= b.ntz, + a.ntz <= b.wa, + a.ntz <= b.wd, + a.ntz <= b.wt, + a.ntz <= b.waz, + a.ntz <= b.wdz, + a.ntz <= b.wtz, + + a.ni <= b.ni, + a.ni <= b.wi, + a.wi <= b.ni, + a.wi <= b.wi + +FROM Dates as a CROSS JOIN Dates as b; + +SELECT + a.wa <= b.na, + a.wa <= b.naz, + a.wa <= b.nd, + a.wa <= b.ndz, + a.wa <= b.nt, + a.wa <= b.ntz, + a.wa <= b.wa, + a.wa <= b.wd, + a.wa <= b.wt, + a.wa <= b.waz, + a.wa <= b.wdz, + a.wa <= b.wtz, + + a.wd <= b.na, + a.wd <= b.naz, + a.wd <= b.nd, + a.wd <= b.ndz, + a.wd <= b.nt, + a.wd <= b.ntz, + a.wd <= b.wa, + a.wd <= b.wd, + a.wd <= b.wt, + a.wd <= b.waz, + a.wd <= b.wdz, + a.wd <= b.wtz, + + a.wt <= b.na, + a.wt <= b.naz, + a.wt <= b.nd, + a.wt <= b.ndz, + a.wt <= b.nt, + a.wt <= b.ntz, + a.wt <= b.wa, + a.wt <= b.wd, + a.wt <= b.wt, + a.wt <= b.waz, + a.wt <= b.wdz, + a.wt <= b.wtz, + + a.waz <= b.na, + a.waz <= b.naz, + a.waz <= b.nd, + a.waz <= b.ndz, + a.waz <= b.nt, + a.waz <= b.ntz, + a.waz <= b.wa, + a.waz <= b.wd, + a.waz <= b.wt, + a.waz <= b.waz, + a.waz <= b.wdz, + a.waz <= b.wtz, + + a.wdz <= b.na, + a.wdz <= b.naz, + a.wdz <= b.nd, + a.wdz <= b.ndz, + a.wdz <= b.nt, + a.wdz <= b.ntz, + a.wdz <= b.wa, + a.wdz <= b.wd, + a.wdz <= b.wt, + a.wdz <= b.waz, + a.wdz <= b.wdz, + a.wdz <= b.wtz, + + a.wtz <= b.na, + a.wtz <= b.naz, + a.wtz <= b.nd, + a.wtz <= b.ndz, + a.wtz <= b.nt, + a.wtz <= b.ntz, + a.wtz <= b.wa, + a.wtz <= b.wd, + a.wtz <= b.wt, + a.wtz <= b.waz, + a.wtz <= b.wdz, + a.wtz <= b.wtz + +FROM Dates as a CROSS JOIN Dates as b; diff --git a/yql/essentials/tests/sql/suites/blocks/date_less_or_equal_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/date_less_or_equal_scalar.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_less_or_equal_scalar.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_less_or_equal_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_less_or_equal_scalar.sql new file mode 100644 index 0000000000..2f2db17af9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_less_or_equal_scalar.sql @@ -0,0 +1,332 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + Date("2000-01-01") <= na, + Date("2000-01-01") <= naz, + Date("2000-01-01") <= nd, + Date("2000-01-01") <= ndz, + Date("2000-01-01") <= nt, + Date("2000-01-01") <= ntz, + Date("2000-01-01") <= wa, + Date("2000-01-01") <= wd, + Date("2000-01-01") <= wt, + Date("2000-01-01") <= waz, + Date("2000-01-01") <= wdz, + Date("2000-01-01") <= wtz, + + TzDate("2000-01-01,Europe/Moscow") <= na, + TzDate("2000-01-01,Europe/Moscow") <= naz, + TzDate("2000-01-01,Europe/Moscow") <= nd, + TzDate("2000-01-01,Europe/Moscow") <= ndz, + TzDate("2000-01-01,Europe/Moscow") <= nt, + TzDate("2000-01-01,Europe/Moscow") <= ntz, + TzDate("2000-01-01,Europe/Moscow") <= wa, + TzDate("2000-01-01,Europe/Moscow") <= wd, + TzDate("2000-01-01,Europe/Moscow") <= wt, + TzDate("2000-01-01,Europe/Moscow") <= waz, + TzDate("2000-01-01,Europe/Moscow") <= wdz, + TzDate("2000-01-01,Europe/Moscow") <= wtz, + + Datetime("2000-01-01T03:04:05Z") <= na, + Datetime("2000-01-01T03:04:05Z") <= naz, + Datetime("2000-01-01T03:04:05Z") <= nd, + Datetime("2000-01-01T03:04:05Z") <= ndz, + Datetime("2000-01-01T03:04:05Z") <= nt, + Datetime("2000-01-01T03:04:05Z") <= ntz, + Datetime("2000-01-01T03:04:05Z") <= wa, + Datetime("2000-01-01T03:04:05Z") <= wd, + Datetime("2000-01-01T03:04:05Z") <= wt, + Datetime("2000-01-01T03:04:05Z") <= waz, + Datetime("2000-01-01T03:04:05Z") <= wdz, + Datetime("2000-01-01T03:04:05Z") <= wtz, + + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= na, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= naz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= nd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= ndz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= nt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= ntz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= wa, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= wd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= wt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= waz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= wdz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") <= wtz, + + Timestamp("2000-01-01T03:04:05.678912Z") <= na, + Timestamp("2000-01-01T03:04:05.678912Z") <= naz, + Timestamp("2000-01-01T03:04:05.678912Z") <= nd, + Timestamp("2000-01-01T03:04:05.678912Z") <= ndz, + Timestamp("2000-01-01T03:04:05.678912Z") <= nt, + Timestamp("2000-01-01T03:04:05.678912Z") <= ntz, + Timestamp("2000-01-01T03:04:05.678912Z") <= wa, + Timestamp("2000-01-01T03:04:05.678912Z") <= wd, + Timestamp("2000-01-01T03:04:05.678912Z") <= wt, + Timestamp("2000-01-01T03:04:05.678912Z") <= waz, + Timestamp("2000-01-01T03:04:05.678912Z") <= wdz, + Timestamp("2000-01-01T03:04:05.678912Z") <= wtz, + + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= na, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= naz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= nd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= ndz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= nt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= ntz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= wa, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= wd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= wt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= waz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= wdz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") <= wtz +FROM Dates; + +SELECT + Date32("1900-01-01") <= na, + Date32("1900-01-01") <= naz, + Date32("1900-01-01") <= nd, + Date32("1900-01-01") <= ndz, + Date32("1900-01-01") <= nt, + Date32("1900-01-01") <= ntz, + Date32("1900-01-01") <= wa, + Date32("1900-01-01") <= wd, + Date32("1900-01-01") <= wt, + Date32("1900-01-01") <= waz, + Date32("1900-01-01") <= wdz, + Date32("1900-01-01") <= wtz, + + Datetime64("1900-01-01T03:04:05Z") <= na, + Datetime64("1900-01-01T03:04:05Z") <= naz, + Datetime64("1900-01-01T03:04:05Z") <= nd, + Datetime64("1900-01-01T03:04:05Z") <= ndz, + Datetime64("1900-01-01T03:04:05Z") <= nt, + Datetime64("1900-01-01T03:04:05Z") <= ntz, + Datetime64("1900-01-01T03:04:05Z") <= wa, + Datetime64("1900-01-01T03:04:05Z") <= wd, + Datetime64("1900-01-01T03:04:05Z") <= wt, + Datetime64("1900-01-01T03:04:05Z") <= waz, + Datetime64("1900-01-01T03:04:05Z") <= wdz, + Datetime64("1900-01-01T03:04:05Z") <= wtz, + + Timestamp64("1900-01-01T03:04:05.678912Z") <= na, + Timestamp64("1900-01-01T03:04:05.678912Z") <= naz, + Timestamp64("1900-01-01T03:04:05.678912Z") <= nd, + Timestamp64("1900-01-01T03:04:05.678912Z") <= ndz, + Timestamp64("1900-01-01T03:04:05.678912Z") <= nt, + Timestamp64("1900-01-01T03:04:05.678912Z") <= ntz, + Timestamp64("1900-01-01T03:04:05.678912Z") <= wa, + Timestamp64("1900-01-01T03:04:05.678912Z") <= wd, + Timestamp64("1900-01-01T03:04:05.678912Z") <= wt, + Timestamp64("1900-01-01T03:04:05.678912Z") <= waz, + Timestamp64("1900-01-01T03:04:05.678912Z") <= wdz, + Timestamp64("1900-01-01T03:04:05.678912Z") <= wtz, + + TzDate32("1900-01-01,Europe/Moscow") <= na, + TzDate32("1900-01-01,Europe/Moscow") <= naz, + TzDate32("1900-01-01,Europe/Moscow") <= nd, + TzDate32("1900-01-01,Europe/Moscow") <= ndz, + TzDate32("1900-01-01,Europe/Moscow") <= nt, + TzDate32("1900-01-01,Europe/Moscow") <= ntz, + TzDate32("1900-01-01,Europe/Moscow") <= wa, + TzDate32("1900-01-01,Europe/Moscow") <= wd, + TzDate32("1900-01-01,Europe/Moscow") <= wt, + TzDate32("1900-01-01,Europe/Moscow") <= waz, + TzDate32("1900-01-01,Europe/Moscow") <= wdz, + TzDate32("1900-01-01,Europe/Moscow") <= wtz, + + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= na, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= naz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= nd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= ndz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= nt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= ntz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= wa, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= wd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= wt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= waz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= wdz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") <= wtz, + + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= na, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= naz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= nd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= ndz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= nt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= ntz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= wa, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= wd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= wt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= waz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= wdz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") <= wtz, + + Interval("P1D") <= ni, + Interval("P1D") <= wi, + Interval64("P1D") <= ni, + Interval64("P1D") <= wi, +FROM Dates; + +SELECT + na <= Date("2000-01-01"), + naz <= Date("2000-01-01"), + nd <= Date("2000-01-01"), + ndz <= Date("2000-01-01"), + nt <= Date("2000-01-01"), + ntz <= Date("2000-01-01"), + wa <= Date("2000-01-01"), + wd <= Date("2000-01-01"), + wt <= Date("2000-01-01"), + waz <= Date("2000-01-01"), + wdz <= Date("2000-01-01"), + wtz <= Date("2000-01-01"), + + na <= TzDate("2000-01-01,Europe/Moscow"), + naz <= TzDate("2000-01-01,Europe/Moscow"), + nd <= TzDate("2000-01-01,Europe/Moscow"), + ndz <= TzDate("2000-01-01,Europe/Moscow"), + nt <= TzDate("2000-01-01,Europe/Moscow"), + ntz <= TzDate("2000-01-01,Europe/Moscow"), + wa <= TzDate("2000-01-01,Europe/Moscow"), + wd <= TzDate("2000-01-01,Europe/Moscow"), + wt <= TzDate("2000-01-01,Europe/Moscow"), + waz <= TzDate("2000-01-01,Europe/Moscow"), + wdz <= TzDate("2000-01-01,Europe/Moscow"), + wtz <= TzDate("2000-01-01,Europe/Moscow"), + + na <= Datetime("2000-01-01T03:04:05Z"), + naz <= Datetime("2000-01-01T03:04:05Z"), + nd <= Datetime("2000-01-01T03:04:05Z"), + ndz <= Datetime("2000-01-01T03:04:05Z"), + nt <= Datetime("2000-01-01T03:04:05Z"), + ntz <= Datetime("2000-01-01T03:04:05Z"), + wa <= Datetime("2000-01-01T03:04:05Z"), + wd <= Datetime("2000-01-01T03:04:05Z"), + wt <= Datetime("2000-01-01T03:04:05Z"), + waz <= Datetime("2000-01-01T03:04:05Z"), + wdz <= Datetime("2000-01-01T03:04:05Z"), + wtz <= Datetime("2000-01-01T03:04:05Z"), + + na <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + naz <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nd <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ndz <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nt <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ntz <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wa <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wd <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wt <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + waz <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wdz <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wtz <= TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + + na <= Timestamp("2000-01-01T03:04:05.678912Z"), + naz <= Timestamp("2000-01-01T03:04:05.678912Z"), + nd <= Timestamp("2000-01-01T03:04:05.678912Z"), + ndz <= Timestamp("2000-01-01T03:04:05.678912Z"), + nt <= Timestamp("2000-01-01T03:04:05.678912Z"), + ntz <= Timestamp("2000-01-01T03:04:05.678912Z"), + wa <= Timestamp("2000-01-01T03:04:05.678912Z"), + wd <= Timestamp("2000-01-01T03:04:05.678912Z"), + wt <= Timestamp("2000-01-01T03:04:05.678912Z"), + waz <= Timestamp("2000-01-01T03:04:05.678912Z"), + wdz <= Timestamp("2000-01-01T03:04:05.678912Z"), + wtz <= Timestamp("2000-01-01T03:04:05.678912Z"), + + na <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + naz <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nd <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ndz <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nt <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ntz <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wa <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wd <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wt <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + waz <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wdz <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wtz <= TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") +FROM Dates; + +SELECT + na <= Date32("1900-01-01"), + naz <= Date32("1900-01-01"), + nd <= Date32("1900-01-01"), + ndz <= Date32("1900-01-01"), + nt <= Date32("1900-01-01"), + ntz <= Date32("1900-01-01"), + wa <= Date32("1900-01-01"), + wd <= Date32("1900-01-01"), + wt <= Date32("1900-01-01"), + waz <= Date32("1900-01-01"), + wdz <= Date32("1900-01-01"), + wtz <= Date32("1900-01-01"), + + na <= Datetime64("1900-01-01T03:04:05Z"), + naz <= Datetime64("1900-01-01T03:04:05Z"), + nd <= Datetime64("1900-01-01T03:04:05Z"), + ndz <= Datetime64("1900-01-01T03:04:05Z"), + nt <= Datetime64("1900-01-01T03:04:05Z"), + ntz <= Datetime64("1900-01-01T03:04:05Z"), + wa <= Datetime64("1900-01-01T03:04:05Z"), + wd <= Datetime64("1900-01-01T03:04:05Z"), + wt <= Datetime64("1900-01-01T03:04:05Z"), + waz <= Datetime64("1900-01-01T03:04:05Z"), + wdz <= Datetime64("1900-01-01T03:04:05Z"), + wtz <= Datetime64("1900-01-01T03:04:05Z"), + + na <= Timestamp64("1900-01-01T03:04:05.678912Z"), + naz <= Timestamp64("1900-01-01T03:04:05.678912Z"), + nd <= Timestamp64("1900-01-01T03:04:05.678912Z"), + ndz <= Timestamp64("1900-01-01T03:04:05.678912Z"), + nt <= Timestamp64("1900-01-01T03:04:05.678912Z"), + ntz <= Timestamp64("1900-01-01T03:04:05.678912Z"), + wa <= Timestamp64("1900-01-01T03:04:05.678912Z"), + wd <= Timestamp64("1900-01-01T03:04:05.678912Z"), + wt <= Timestamp64("1900-01-01T03:04:05.678912Z"), + waz <= Timestamp64("1900-01-01T03:04:05.678912Z"), + wdz <= Timestamp64("1900-01-01T03:04:05.678912Z"), + wtz <= Timestamp64("1900-01-01T03:04:05.678912Z"), + + na <= TzDate32("1900-01-01,Europe/Moscow"), + naz <= TzDate32("1900-01-01,Europe/Moscow"), + nd <= TzDate32("1900-01-01,Europe/Moscow"), + ndz <= TzDate32("1900-01-01,Europe/Moscow"), + nt <= TzDate32("1900-01-01,Europe/Moscow"), + ntz <= TzDate32("1900-01-01,Europe/Moscow"), + wa <= TzDate32("1900-01-01,Europe/Moscow"), + wd <= TzDate32("1900-01-01,Europe/Moscow"), + wt <= TzDate32("1900-01-01,Europe/Moscow"), + waz <= TzDate32("1900-01-01,Europe/Moscow"), + wdz <= TzDate32("1900-01-01,Europe/Moscow"), + wtz <= TzDate32("1900-01-01,Europe/Moscow"), + + na <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + naz <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nd <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ndz <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nt <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ntz <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wa <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wd <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wt <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + waz <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wdz <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wtz <= TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + + na <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + naz <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nd <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ndz <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nt <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ntz <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wa <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wd <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wt <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + waz <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wdz <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wtz <= TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + + ni <= Interval("P1D"), + wi <= Interval("P1D"), + ni <= Interval64("P1D"), + wi <= Interval64("P1D"), +FROM Dates; diff --git a/yql/essentials/tests/sql/suites/blocks/date_less_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/date_less_scalar.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_less_scalar.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_less_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_less_scalar.sql new file mode 100644 index 0000000000..d62f54d430 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_less_scalar.sql @@ -0,0 +1,332 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + Date("2000-01-01") < na, + Date("2000-01-01") < naz, + Date("2000-01-01") < nd, + Date("2000-01-01") < ndz, + Date("2000-01-01") < nt, + Date("2000-01-01") < ntz, + Date("2000-01-01") < wa, + Date("2000-01-01") < wd, + Date("2000-01-01") < wt, + Date("2000-01-01") < waz, + Date("2000-01-01") < wdz, + Date("2000-01-01") < wtz, + + TzDate("2000-01-01,Europe/Moscow") < na, + TzDate("2000-01-01,Europe/Moscow") < naz, + TzDate("2000-01-01,Europe/Moscow") < nd, + TzDate("2000-01-01,Europe/Moscow") < ndz, + TzDate("2000-01-01,Europe/Moscow") < nt, + TzDate("2000-01-01,Europe/Moscow") < ntz, + TzDate("2000-01-01,Europe/Moscow") < wa, + TzDate("2000-01-01,Europe/Moscow") < wd, + TzDate("2000-01-01,Europe/Moscow") < wt, + TzDate("2000-01-01,Europe/Moscow") < waz, + TzDate("2000-01-01,Europe/Moscow") < wdz, + TzDate("2000-01-01,Europe/Moscow") < wtz, + + Datetime("2000-01-01T03:04:05Z") < na, + Datetime("2000-01-01T03:04:05Z") < naz, + Datetime("2000-01-01T03:04:05Z") < nd, + Datetime("2000-01-01T03:04:05Z") < ndz, + Datetime("2000-01-01T03:04:05Z") < nt, + Datetime("2000-01-01T03:04:05Z") < ntz, + Datetime("2000-01-01T03:04:05Z") < wa, + Datetime("2000-01-01T03:04:05Z") < wd, + Datetime("2000-01-01T03:04:05Z") < wt, + Datetime("2000-01-01T03:04:05Z") < waz, + Datetime("2000-01-01T03:04:05Z") < wdz, + Datetime("2000-01-01T03:04:05Z") < wtz, + + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < na, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < naz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < nd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < ndz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < nt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < ntz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < wa, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < wd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < wt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < waz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < wdz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") < wtz, + + Timestamp("2000-01-01T03:04:05.678912Z") < na, + Timestamp("2000-01-01T03:04:05.678912Z") < naz, + Timestamp("2000-01-01T03:04:05.678912Z") < nd, + Timestamp("2000-01-01T03:04:05.678912Z") < ndz, + Timestamp("2000-01-01T03:04:05.678912Z") < nt, + Timestamp("2000-01-01T03:04:05.678912Z") < ntz, + Timestamp("2000-01-01T03:04:05.678912Z") < wa, + Timestamp("2000-01-01T03:04:05.678912Z") < wd, + Timestamp("2000-01-01T03:04:05.678912Z") < wt, + Timestamp("2000-01-01T03:04:05.678912Z") < waz, + Timestamp("2000-01-01T03:04:05.678912Z") < wdz, + Timestamp("2000-01-01T03:04:05.678912Z") < wtz, + + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < na, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < naz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < nd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < ndz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < nt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < ntz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < wa, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < wd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < wt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < waz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < wdz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") < wtz +FROM Dates; + +SELECT + Date32("1900-01-01") < na, + Date32("1900-01-01") < naz, + Date32("1900-01-01") < nd, + Date32("1900-01-01") < ndz, + Date32("1900-01-01") < nt, + Date32("1900-01-01") < ntz, + Date32("1900-01-01") < wa, + Date32("1900-01-01") < wd, + Date32("1900-01-01") < wt, + Date32("1900-01-01") < waz, + Date32("1900-01-01") < wdz, + Date32("1900-01-01") < wtz, + + Datetime64("1900-01-01T03:04:05Z") < na, + Datetime64("1900-01-01T03:04:05Z") < naz, + Datetime64("1900-01-01T03:04:05Z") < nd, + Datetime64("1900-01-01T03:04:05Z") < ndz, + Datetime64("1900-01-01T03:04:05Z") < nt, + Datetime64("1900-01-01T03:04:05Z") < ntz, + Datetime64("1900-01-01T03:04:05Z") < wa, + Datetime64("1900-01-01T03:04:05Z") < wd, + Datetime64("1900-01-01T03:04:05Z") < wt, + Datetime64("1900-01-01T03:04:05Z") < waz, + Datetime64("1900-01-01T03:04:05Z") < wdz, + Datetime64("1900-01-01T03:04:05Z") < wtz, + + Timestamp64("1900-01-01T03:04:05.678912Z") < na, + Timestamp64("1900-01-01T03:04:05.678912Z") < naz, + Timestamp64("1900-01-01T03:04:05.678912Z") < nd, + Timestamp64("1900-01-01T03:04:05.678912Z") < ndz, + Timestamp64("1900-01-01T03:04:05.678912Z") < nt, + Timestamp64("1900-01-01T03:04:05.678912Z") < ntz, + Timestamp64("1900-01-01T03:04:05.678912Z") < wa, + Timestamp64("1900-01-01T03:04:05.678912Z") < wd, + Timestamp64("1900-01-01T03:04:05.678912Z") < wt, + Timestamp64("1900-01-01T03:04:05.678912Z") < waz, + Timestamp64("1900-01-01T03:04:05.678912Z") < wdz, + Timestamp64("1900-01-01T03:04:05.678912Z") < wtz, + + TzDate32("1900-01-01,Europe/Moscow") < na, + TzDate32("1900-01-01,Europe/Moscow") < naz, + TzDate32("1900-01-01,Europe/Moscow") < nd, + TzDate32("1900-01-01,Europe/Moscow") < ndz, + TzDate32("1900-01-01,Europe/Moscow") < nt, + TzDate32("1900-01-01,Europe/Moscow") < ntz, + TzDate32("1900-01-01,Europe/Moscow") < wa, + TzDate32("1900-01-01,Europe/Moscow") < wd, + TzDate32("1900-01-01,Europe/Moscow") < wt, + TzDate32("1900-01-01,Europe/Moscow") < waz, + TzDate32("1900-01-01,Europe/Moscow") < wdz, + TzDate32("1900-01-01,Europe/Moscow") < wtz, + + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < na, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < naz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < nd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < ndz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < nt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < ntz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < wa, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < wd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < wt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < waz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < wdz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") < wtz, + + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < na, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < naz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < nd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < ndz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < nt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < ntz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < wa, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < wd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < wt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < waz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < wdz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") < wtz, + + Interval("P1D") < ni, + Interval("P1D") < wi, + Interval64("P1D") < ni, + Interval64("P1D") < wi, +FROM Dates; + +SELECT + na < Date("2000-01-01"), + naz < Date("2000-01-01"), + nd < Date("2000-01-01"), + ndz < Date("2000-01-01"), + nt < Date("2000-01-01"), + ntz < Date("2000-01-01"), + wa < Date("2000-01-01"), + wd < Date("2000-01-01"), + wt < Date("2000-01-01"), + waz < Date("2000-01-01"), + wdz < Date("2000-01-01"), + wtz < Date("2000-01-01"), + + na < TzDate("2000-01-01,Europe/Moscow"), + naz < TzDate("2000-01-01,Europe/Moscow"), + nd < TzDate("2000-01-01,Europe/Moscow"), + ndz < TzDate("2000-01-01,Europe/Moscow"), + nt < TzDate("2000-01-01,Europe/Moscow"), + ntz < TzDate("2000-01-01,Europe/Moscow"), + wa < TzDate("2000-01-01,Europe/Moscow"), + wd < TzDate("2000-01-01,Europe/Moscow"), + wt < TzDate("2000-01-01,Europe/Moscow"), + waz < TzDate("2000-01-01,Europe/Moscow"), + wdz < TzDate("2000-01-01,Europe/Moscow"), + wtz < TzDate("2000-01-01,Europe/Moscow"), + + na < Datetime("2000-01-01T03:04:05Z"), + naz < Datetime("2000-01-01T03:04:05Z"), + nd < Datetime("2000-01-01T03:04:05Z"), + ndz < Datetime("2000-01-01T03:04:05Z"), + nt < Datetime("2000-01-01T03:04:05Z"), + ntz < Datetime("2000-01-01T03:04:05Z"), + wa < Datetime("2000-01-01T03:04:05Z"), + wd < Datetime("2000-01-01T03:04:05Z"), + wt < Datetime("2000-01-01T03:04:05Z"), + waz < Datetime("2000-01-01T03:04:05Z"), + wdz < Datetime("2000-01-01T03:04:05Z"), + wtz < Datetime("2000-01-01T03:04:05Z"), + + na < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + naz < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nd < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ndz < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nt < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ntz < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wa < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wd < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wt < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + waz < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wdz < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wtz < TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + + na < Timestamp("2000-01-01T03:04:05.678912Z"), + naz < Timestamp("2000-01-01T03:04:05.678912Z"), + nd < Timestamp("2000-01-01T03:04:05.678912Z"), + ndz < Timestamp("2000-01-01T03:04:05.678912Z"), + nt < Timestamp("2000-01-01T03:04:05.678912Z"), + ntz < Timestamp("2000-01-01T03:04:05.678912Z"), + wa < Timestamp("2000-01-01T03:04:05.678912Z"), + wd < Timestamp("2000-01-01T03:04:05.678912Z"), + wt < Timestamp("2000-01-01T03:04:05.678912Z"), + waz < Timestamp("2000-01-01T03:04:05.678912Z"), + wdz < Timestamp("2000-01-01T03:04:05.678912Z"), + wtz < Timestamp("2000-01-01T03:04:05.678912Z"), + + na < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + naz < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nd < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ndz < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nt < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ntz < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wa < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wd < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wt < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + waz < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wdz < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wtz < TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") +FROM Dates; + +SELECT + na < Date32("1900-01-01"), + naz < Date32("1900-01-01"), + nd < Date32("1900-01-01"), + ndz < Date32("1900-01-01"), + nt < Date32("1900-01-01"), + ntz < Date32("1900-01-01"), + wa < Date32("1900-01-01"), + wd < Date32("1900-01-01"), + wt < Date32("1900-01-01"), + waz < Date32("1900-01-01"), + wdz < Date32("1900-01-01"), + wtz < Date32("1900-01-01"), + + na < Datetime64("1900-01-01T03:04:05Z"), + naz < Datetime64("1900-01-01T03:04:05Z"), + nd < Datetime64("1900-01-01T03:04:05Z"), + ndz < Datetime64("1900-01-01T03:04:05Z"), + nt < Datetime64("1900-01-01T03:04:05Z"), + ntz < Datetime64("1900-01-01T03:04:05Z"), + wa < Datetime64("1900-01-01T03:04:05Z"), + wd < Datetime64("1900-01-01T03:04:05Z"), + wt < Datetime64("1900-01-01T03:04:05Z"), + waz < Datetime64("1900-01-01T03:04:05Z"), + wdz < Datetime64("1900-01-01T03:04:05Z"), + wtz < Datetime64("1900-01-01T03:04:05Z"), + + na < Timestamp64("1900-01-01T03:04:05.678912Z"), + naz < Timestamp64("1900-01-01T03:04:05.678912Z"), + nd < Timestamp64("1900-01-01T03:04:05.678912Z"), + ndz < Timestamp64("1900-01-01T03:04:05.678912Z"), + nt < Timestamp64("1900-01-01T03:04:05.678912Z"), + ntz < Timestamp64("1900-01-01T03:04:05.678912Z"), + wa < Timestamp64("1900-01-01T03:04:05.678912Z"), + wd < Timestamp64("1900-01-01T03:04:05.678912Z"), + wt < Timestamp64("1900-01-01T03:04:05.678912Z"), + waz < Timestamp64("1900-01-01T03:04:05.678912Z"), + wdz < Timestamp64("1900-01-01T03:04:05.678912Z"), + wtz < Timestamp64("1900-01-01T03:04:05.678912Z"), + + na < TzDate32("1900-01-01,Europe/Moscow"), + naz < TzDate32("1900-01-01,Europe/Moscow"), + nd < TzDate32("1900-01-01,Europe/Moscow"), + ndz < TzDate32("1900-01-01,Europe/Moscow"), + nt < TzDate32("1900-01-01,Europe/Moscow"), + ntz < TzDate32("1900-01-01,Europe/Moscow"), + wa < TzDate32("1900-01-01,Europe/Moscow"), + wd < TzDate32("1900-01-01,Europe/Moscow"), + wt < TzDate32("1900-01-01,Europe/Moscow"), + waz < TzDate32("1900-01-01,Europe/Moscow"), + wdz < TzDate32("1900-01-01,Europe/Moscow"), + wtz < TzDate32("1900-01-01,Europe/Moscow"), + + na < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + naz < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nd < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ndz < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nt < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ntz < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wa < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wd < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wt < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + waz < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wdz < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wtz < TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + + na < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + naz < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nd < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ndz < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nt < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ntz < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wa < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wd < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wt < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + waz < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wdz < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wtz < TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + + ni < Interval("P1D"), + wi < Interval("P1D"), + ni < Interval64("P1D"), + wi < Interval64("P1D"), +FROM Dates; diff --git a/yql/essentials/tests/sql/suites/blocks/date_not_equals.cfg b/yql/essentials/tests/sql/suites/blocks/date_not_equals.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_not_equals.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_not_equals.sql b/yql/essentials/tests/sql/suites/blocks/date_not_equals.sql new file mode 100644 index 0000000000..098dbd0d58 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_not_equals.sql @@ -0,0 +1,169 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + a.na != b.na, + a.na != b.naz, + a.na != b.nd, + a.na != b.ndz, + a.na != b.nt, + a.na != b.ntz, + a.na != b.wa, + a.na != b.wd, + a.na != b.wt, + a.na != b.waz, + a.na != b.wdz, + a.na != b.wtz, + + a.naz != b.na, + a.naz != b.naz, + a.naz != b.nd, + a.naz != b.ndz, + a.naz != b.nt, + a.naz != b.ntz, + a.naz != b.wa, + a.naz != b.wd, + a.naz != b.wt, + a.naz != b.waz, + a.naz != b.wdz, + a.naz != b.wtz, + + a.nd != b.na, + a.nd != b.naz, + a.nd != b.nd, + a.nd != b.ndz, + a.nd != b.nt, + a.nd != b.ntz, + a.nd != b.wa, + a.nd != b.wd, + a.nd != b.wt, + a.nd != b.waz, + a.nd != b.wdz, + a.nd != b.wtz, + + a.ndz != b.na, + a.ndz != b.naz, + a.ndz != b.nd, + a.ndz != b.ndz, + a.ndz != b.nt, + a.ndz != b.ntz, + a.ndz != b.wa, + a.ndz != b.wd, + a.ndz != b.wt, + a.ndz != b.waz, + a.ndz != b.wdz, + a.ndz != b.wtz, + + a.nt != b.na, + a.nt != b.naz, + a.nt != b.nd, + a.nt != b.ndz, + a.nt != b.nt, + a.nt != b.ntz, + a.nt != b.wa, + a.nt != b.wd, + a.nt != b.wt, + a.nt != b.waz, + a.nt != b.wdz, + a.nt != b.wtz, + + a.ntz != b.na, + a.ntz != b.naz, + a.ntz != b.nd, + a.ntz != b.ndz, + a.ntz != b.nt, + a.ntz != b.ntz, + a.ntz != b.wa, + a.ntz != b.wd, + a.ntz != b.wt, + a.ntz != b.waz, + a.ntz != b.wdz, + a.ntz != b.wtz, + + a.ni != b.ni, + a.ni != b.wi, + a.wi != b.ni, + a.wi != b.wi + +FROM Dates as a CROSS JOIN Dates as b; + +SELECT + a.wa != b.na, + a.wa != b.naz, + a.wa != b.nd, + a.wa != b.ndz, + a.wa != b.nt, + a.wa != b.ntz, + a.wa != b.wa, + a.wa != b.wd, + a.wa != b.wt, + a.wa != b.waz, + a.wa != b.wdz, + a.wa != b.wtz, + + a.wd != b.na, + a.wd != b.naz, + a.wd != b.nd, + a.wd != b.ndz, + a.wd != b.nt, + a.wd != b.ntz, + a.wd != b.wa, + a.wd != b.wd, + a.wd != b.wt, + a.wd != b.waz, + a.wd != b.wdz, + a.wd != b.wtz, + + a.wt != b.na, + a.wt != b.naz, + a.wt != b.nd, + a.wt != b.ndz, + a.wt != b.nt, + a.wt != b.ntz, + a.wt != b.wa, + a.wt != b.wd, + a.wt != b.wt, + a.wt != b.waz, + a.wt != b.wdz, + a.wt != b.wtz, + + a.waz != b.na, + a.waz != b.naz, + a.waz != b.nd, + a.waz != b.ndz, + a.waz != b.nt, + a.waz != b.ntz, + a.waz != b.wa, + a.waz != b.wd, + a.waz != b.wt, + a.waz != b.waz, + a.waz != b.wdz, + a.waz != b.wtz, + + a.wdz != b.na, + a.wdz != b.naz, + a.wdz != b.nd, + a.wdz != b.ndz, + a.wdz != b.nt, + a.wdz != b.ntz, + a.wdz != b.wa, + a.wdz != b.wd, + a.wdz != b.wt, + a.wdz != b.waz, + a.wdz != b.wdz, + a.wdz != b.wtz, + + a.wtz != b.na, + a.wtz != b.naz, + a.wtz != b.nd, + a.wtz != b.ndz, + a.wtz != b.nt, + a.wtz != b.ntz, + a.wtz != b.wa, + a.wtz != b.wd, + a.wtz != b.wt, + a.wtz != b.waz, + a.wtz != b.wdz, + a.wtz != b.wtz + +FROM Dates as a CROSS JOIN Dates as b; diff --git a/yql/essentials/tests/sql/suites/blocks/date_not_equals_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/date_not_equals_scalar.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_not_equals_scalar.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_not_equals_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_not_equals_scalar.sql new file mode 100644 index 0000000000..803fcc49ee --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_not_equals_scalar.sql @@ -0,0 +1,332 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + Date("2000-01-01") != na, + Date("2000-01-01") != naz, + Date("2000-01-01") != nd, + Date("2000-01-01") != ndz, + Date("2000-01-01") != nt, + Date("2000-01-01") != ntz, + Date("2000-01-01") != wa, + Date("2000-01-01") != wd, + Date("2000-01-01") != wt, + Date("2000-01-01") != waz, + Date("2000-01-01") != wdz, + Date("2000-01-01") != wtz, + + TzDate("2000-01-01,Europe/Moscow") != na, + TzDate("2000-01-01,Europe/Moscow") != naz, + TzDate("2000-01-01,Europe/Moscow") != nd, + TzDate("2000-01-01,Europe/Moscow") != ndz, + TzDate("2000-01-01,Europe/Moscow") != nt, + TzDate("2000-01-01,Europe/Moscow") != ntz, + TzDate("2000-01-01,Europe/Moscow") != wa, + TzDate("2000-01-01,Europe/Moscow") != wd, + TzDate("2000-01-01,Europe/Moscow") != wt, + TzDate("2000-01-01,Europe/Moscow") != waz, + TzDate("2000-01-01,Europe/Moscow") != wdz, + TzDate("2000-01-01,Europe/Moscow") != wtz, + + Datetime("2000-01-01T03:04:05Z") != na, + Datetime("2000-01-01T03:04:05Z") != naz, + Datetime("2000-01-01T03:04:05Z") != nd, + Datetime("2000-01-01T03:04:05Z") != ndz, + Datetime("2000-01-01T03:04:05Z") != nt, + Datetime("2000-01-01T03:04:05Z") != ntz, + Datetime("2000-01-01T03:04:05Z") != wa, + Datetime("2000-01-01T03:04:05Z") != wd, + Datetime("2000-01-01T03:04:05Z") != wt, + Datetime("2000-01-01T03:04:05Z") != waz, + Datetime("2000-01-01T03:04:05Z") != wdz, + Datetime("2000-01-01T03:04:05Z") != wtz, + + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != na, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != naz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != nd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != ndz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != nt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != ntz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != wa, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != wd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != wt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != waz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != wdz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") != wtz, + + Timestamp("2000-01-01T03:04:05.678912Z") != na, + Timestamp("2000-01-01T03:04:05.678912Z") != naz, + Timestamp("2000-01-01T03:04:05.678912Z") != nd, + Timestamp("2000-01-01T03:04:05.678912Z") != ndz, + Timestamp("2000-01-01T03:04:05.678912Z") != nt, + Timestamp("2000-01-01T03:04:05.678912Z") != ntz, + Timestamp("2000-01-01T03:04:05.678912Z") != wa, + Timestamp("2000-01-01T03:04:05.678912Z") != wd, + Timestamp("2000-01-01T03:04:05.678912Z") != wt, + Timestamp("2000-01-01T03:04:05.678912Z") != waz, + Timestamp("2000-01-01T03:04:05.678912Z") != wdz, + Timestamp("2000-01-01T03:04:05.678912Z") != wtz, + + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != na, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != naz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != nd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != ndz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != nt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != ntz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != wa, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != wd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != wt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != waz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != wdz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") != wtz +FROM Dates; + +SELECT + Date32("1900-01-01") != na, + Date32("1900-01-01") != naz, + Date32("1900-01-01") != nd, + Date32("1900-01-01") != ndz, + Date32("1900-01-01") != nt, + Date32("1900-01-01") != ntz, + Date32("1900-01-01") != wa, + Date32("1900-01-01") != wd, + Date32("1900-01-01") != wt, + Date32("1900-01-01") != waz, + Date32("1900-01-01") != wdz, + Date32("1900-01-01") != wtz, + + Datetime64("1900-01-01T03:04:05Z") != na, + Datetime64("1900-01-01T03:04:05Z") != naz, + Datetime64("1900-01-01T03:04:05Z") != nd, + Datetime64("1900-01-01T03:04:05Z") != ndz, + Datetime64("1900-01-01T03:04:05Z") != nt, + Datetime64("1900-01-01T03:04:05Z") != ntz, + Datetime64("1900-01-01T03:04:05Z") != wa, + Datetime64("1900-01-01T03:04:05Z") != wd, + Datetime64("1900-01-01T03:04:05Z") != wt, + Datetime64("1900-01-01T03:04:05Z") != waz, + Datetime64("1900-01-01T03:04:05Z") != wdz, + Datetime64("1900-01-01T03:04:05Z") != wtz, + + Timestamp64("1900-01-01T03:04:05.678912Z") != na, + Timestamp64("1900-01-01T03:04:05.678912Z") != naz, + Timestamp64("1900-01-01T03:04:05.678912Z") != nd, + Timestamp64("1900-01-01T03:04:05.678912Z") != ndz, + Timestamp64("1900-01-01T03:04:05.678912Z") != nt, + Timestamp64("1900-01-01T03:04:05.678912Z") != ntz, + Timestamp64("1900-01-01T03:04:05.678912Z") != wa, + Timestamp64("1900-01-01T03:04:05.678912Z") != wd, + Timestamp64("1900-01-01T03:04:05.678912Z") != wt, + Timestamp64("1900-01-01T03:04:05.678912Z") != waz, + Timestamp64("1900-01-01T03:04:05.678912Z") != wdz, + Timestamp64("1900-01-01T03:04:05.678912Z") != wtz, + + TzDate32("1900-01-01,Europe/Moscow") != na, + TzDate32("1900-01-01,Europe/Moscow") != naz, + TzDate32("1900-01-01,Europe/Moscow") != nd, + TzDate32("1900-01-01,Europe/Moscow") != ndz, + TzDate32("1900-01-01,Europe/Moscow") != nt, + TzDate32("1900-01-01,Europe/Moscow") != ntz, + TzDate32("1900-01-01,Europe/Moscow") != wa, + TzDate32("1900-01-01,Europe/Moscow") != wd, + TzDate32("1900-01-01,Europe/Moscow") != wt, + TzDate32("1900-01-01,Europe/Moscow") != waz, + TzDate32("1900-01-01,Europe/Moscow") != wdz, + TzDate32("1900-01-01,Europe/Moscow") != wtz, + + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != na, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != naz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != nd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != ndz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != nt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != ntz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != wa, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != wd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != wt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != waz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != wdz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") != wtz, + + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != na, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != naz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != nd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != ndz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != nt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != ntz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != wa, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != wd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != wt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != waz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != wdz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") != wtz, + + Interval("P1D") != ni, + Interval("P1D") != wi, + Interval64("P1D") != ni, + Interval64("P1D") != wi, +FROM Dates; + +SELECT + na != Date("2000-01-01"), + naz != Date("2000-01-01"), + nd != Date("2000-01-01"), + ndz != Date("2000-01-01"), + nt != Date("2000-01-01"), + ntz != Date("2000-01-01"), + wa != Date("2000-01-01"), + wd != Date("2000-01-01"), + wt != Date("2000-01-01"), + waz != Date("2000-01-01"), + wdz != Date("2000-01-01"), + wtz != Date("2000-01-01"), + + na != TzDate("2000-01-01,Europe/Moscow"), + naz != TzDate("2000-01-01,Europe/Moscow"), + nd != TzDate("2000-01-01,Europe/Moscow"), + ndz != TzDate("2000-01-01,Europe/Moscow"), + nt != TzDate("2000-01-01,Europe/Moscow"), + ntz != TzDate("2000-01-01,Europe/Moscow"), + wa != TzDate("2000-01-01,Europe/Moscow"), + wd != TzDate("2000-01-01,Europe/Moscow"), + wt != TzDate("2000-01-01,Europe/Moscow"), + waz != TzDate("2000-01-01,Europe/Moscow"), + wdz != TzDate("2000-01-01,Europe/Moscow"), + wtz != TzDate("2000-01-01,Europe/Moscow"), + + na != Datetime("2000-01-01T03:04:05Z"), + naz != Datetime("2000-01-01T03:04:05Z"), + nd != Datetime("2000-01-01T03:04:05Z"), + ndz != Datetime("2000-01-01T03:04:05Z"), + nt != Datetime("2000-01-01T03:04:05Z"), + ntz != Datetime("2000-01-01T03:04:05Z"), + wa != Datetime("2000-01-01T03:04:05Z"), + wd != Datetime("2000-01-01T03:04:05Z"), + wt != Datetime("2000-01-01T03:04:05Z"), + waz != Datetime("2000-01-01T03:04:05Z"), + wdz != Datetime("2000-01-01T03:04:05Z"), + wtz != Datetime("2000-01-01T03:04:05Z"), + + na != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + naz != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nd != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ndz != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nt != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ntz != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wa != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wd != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wt != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + waz != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wdz != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wtz != TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + + na != Timestamp("2000-01-01T03:04:05.678912Z"), + naz != Timestamp("2000-01-01T03:04:05.678912Z"), + nd != Timestamp("2000-01-01T03:04:05.678912Z"), + ndz != Timestamp("2000-01-01T03:04:05.678912Z"), + nt != Timestamp("2000-01-01T03:04:05.678912Z"), + ntz != Timestamp("2000-01-01T03:04:05.678912Z"), + wa != Timestamp("2000-01-01T03:04:05.678912Z"), + wd != Timestamp("2000-01-01T03:04:05.678912Z"), + wt != Timestamp("2000-01-01T03:04:05.678912Z"), + waz != Timestamp("2000-01-01T03:04:05.678912Z"), + wdz != Timestamp("2000-01-01T03:04:05.678912Z"), + wtz != Timestamp("2000-01-01T03:04:05.678912Z"), + + na != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + naz != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nd != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ndz != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nt != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ntz != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wa != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wd != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wt != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + waz != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wdz != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wtz != TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") +FROM Dates; + +SELECT + na != Date32("1900-01-01"), + naz != Date32("1900-01-01"), + nd != Date32("1900-01-01"), + ndz != Date32("1900-01-01"), + nt != Date32("1900-01-01"), + ntz != Date32("1900-01-01"), + wa != Date32("1900-01-01"), + wd != Date32("1900-01-01"), + wt != Date32("1900-01-01"), + waz != Date32("1900-01-01"), + wdz != Date32("1900-01-01"), + wtz != Date32("1900-01-01"), + + na != Datetime64("1900-01-01T03:04:05Z"), + naz != Datetime64("1900-01-01T03:04:05Z"), + nd != Datetime64("1900-01-01T03:04:05Z"), + ndz != Datetime64("1900-01-01T03:04:05Z"), + nt != Datetime64("1900-01-01T03:04:05Z"), + ntz != Datetime64("1900-01-01T03:04:05Z"), + wa != Datetime64("1900-01-01T03:04:05Z"), + wd != Datetime64("1900-01-01T03:04:05Z"), + wt != Datetime64("1900-01-01T03:04:05Z"), + waz != Datetime64("1900-01-01T03:04:05Z"), + wdz != Datetime64("1900-01-01T03:04:05Z"), + wtz != Datetime64("1900-01-01T03:04:05Z"), + + na != Timestamp64("1900-01-01T03:04:05.678912Z"), + naz != Timestamp64("1900-01-01T03:04:05.678912Z"), + nd != Timestamp64("1900-01-01T03:04:05.678912Z"), + ndz != Timestamp64("1900-01-01T03:04:05.678912Z"), + nt != Timestamp64("1900-01-01T03:04:05.678912Z"), + ntz != Timestamp64("1900-01-01T03:04:05.678912Z"), + wa != Timestamp64("1900-01-01T03:04:05.678912Z"), + wd != Timestamp64("1900-01-01T03:04:05.678912Z"), + wt != Timestamp64("1900-01-01T03:04:05.678912Z"), + waz != Timestamp64("1900-01-01T03:04:05.678912Z"), + wdz != Timestamp64("1900-01-01T03:04:05.678912Z"), + wtz != Timestamp64("1900-01-01T03:04:05.678912Z"), + + na != TzDate32("1900-01-01,Europe/Moscow"), + naz != TzDate32("1900-01-01,Europe/Moscow"), + nd != TzDate32("1900-01-01,Europe/Moscow"), + ndz != TzDate32("1900-01-01,Europe/Moscow"), + nt != TzDate32("1900-01-01,Europe/Moscow"), + ntz != TzDate32("1900-01-01,Europe/Moscow"), + wa != TzDate32("1900-01-01,Europe/Moscow"), + wd != TzDate32("1900-01-01,Europe/Moscow"), + wt != TzDate32("1900-01-01,Europe/Moscow"), + waz != TzDate32("1900-01-01,Europe/Moscow"), + wdz != TzDate32("1900-01-01,Europe/Moscow"), + wtz != TzDate32("1900-01-01,Europe/Moscow"), + + na != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + naz != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nd != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ndz != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nt != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ntz != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wa != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wd != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wt != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + waz != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wdz != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wtz != TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + + na != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + naz != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nd != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ndz != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nt != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ntz != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wa != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wd != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wt != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + waz != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wdz != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wtz != TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + + ni != Interval("P1D"), + wi != Interval("P1D"), + ni != Interval64("P1D"), + wi != Interval64("P1D"), +FROM Dates; diff --git a/yql/essentials/tests/sql/suites/blocks/date_sub.cfg b/yql/essentials/tests/sql/suites/blocks/date_sub.cfg new file mode 100644 index 0000000000..8d2d2a19fc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_sub.cfg @@ -0,0 +1 @@ +in Dates dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/date_sub.sql b/yql/essentials/tests/sql/suites/blocks/date_sub.sql new file mode 100644 index 0000000000..ec839a4199 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_sub.sql @@ -0,0 +1,165 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + a.na - b.na, + a.na - b.naz, + a.na - b.nd, + a.na - b.ndz, + a.na - b.nt, + a.na - b.ntz, + a.na - b.wa, + a.na - b.wd, + a.na - b.wt, + a.na - b.waz, + a.na - b.wdz, + a.na - b.wtz, + + a.naz - b.na, + a.naz - b.naz, + a.naz - b.nd, + a.naz - b.ndz, + a.naz - b.nt, + a.naz - b.ntz, + a.naz - b.wa, + a.naz - b.wd, + a.naz - b.wt, + a.naz - b.waz, + a.naz - b.wdz, + a.naz - b.wtz, + + a.nd - b.na, + a.nd - b.naz, + a.nd - b.nd, + a.nd - b.ndz, + a.nd - b.nt, + a.nd - b.ntz, + a.nd - b.wa, + a.nd - b.wd, + a.nd - b.wt, + a.nd - b.waz, + a.nd - b.wdz, + a.nd - b.wtz, + + a.ndz - b.na, + a.ndz - b.naz, + a.ndz - b.nd, + a.ndz - b.ndz, + a.ndz - b.nt, + a.ndz - b.ntz, + a.ndz - b.wa, + a.ndz - b.wd, + a.ndz - b.wt, + a.ndz - b.waz, + a.ndz - b.wdz, + a.ndz - b.wtz, + + a.nt - b.na, + a.nt - b.naz, + a.nt - b.nd, + a.nt - b.ndz, + a.nt - b.nt, + a.nt - b.ntz, + a.nt - b.wa, + a.nt - b.wd, + a.nt - b.wt, + a.nt - b.waz, + a.nt - b.wdz, + a.nt - b.wtz, + + a.ntz - b.na, + a.ntz - b.naz, + a.ntz - b.nd, + a.ntz - b.ndz, + a.ntz - b.nt, + a.ntz - b.ntz, + a.ntz - b.wa, + a.ntz - b.wd, + a.ntz - b.wt, + a.ntz - b.waz, + a.ntz - b.wdz, + a.ntz - b.wtz + +FROM Dates as a CROSS JOIN Dates as b; + +SELECT + a.wa - b.na, + a.wa - b.naz, + a.wa - b.nd, + a.wa - b.ndz, + a.wa - b.nt, + a.wa - b.ntz, + a.wa - b.wa, + a.wa - b.wd, + a.wa - b.wt, + a.wa - b.waz, + a.wa - b.wdz, + a.wa - b.wtz, + + a.wd - b.na, + a.wd - b.naz, + a.wd - b.nd, + a.wd - b.ndz, + a.wd - b.nt, + a.wd - b.ntz, + a.wd - b.wa, + a.wd - b.wd, + a.wd - b.wt, + a.wd - b.waz, + a.wd - b.wdz, + a.wd - b.wtz, + + a.wt - b.na, + a.wt - b.naz, + a.wt - b.nd, + a.wt - b.ndz, + a.wt - b.nt, + a.wt - b.ntz, + a.wt - b.wa, + a.wt - b.wd, + a.wt - b.wt, + a.wt - b.waz, + a.wt - b.wdz, + a.wt - b.wtz, + + a.waz - b.na, + a.waz - b.naz, + a.waz - b.nd, + a.waz - b.ndz, + a.waz - b.nt, + a.waz - b.ntz, + a.waz - b.wa, + a.waz - b.wd, + a.waz - b.wt, + a.waz - b.waz, + a.waz - b.wdz, + a.waz - b.wtz, + + a.wdz - b.na, + a.wdz - b.naz, + a.wdz - b.nd, + a.wdz - b.ndz, + a.wdz - b.nt, + a.wdz - b.ntz, + a.wdz - b.wa, + a.wdz - b.wd, + a.wdz - b.wt, + a.wdz - b.waz, + a.wdz - b.wdz, + a.wdz - b.wtz, + + a.wtz - b.na, + a.wtz - b.naz, + a.wtz - b.nd, + a.wtz - b.ndz, + a.wtz - b.nt, + a.wtz - b.ntz, + a.wtz - b.wa, + a.wtz - b.wd, + a.wtz - b.wt, + a.wtz - b.waz, + a.wtz - b.wdz, + a.wtz - b.wtz, + +FROM Dates as a CROSS JOIN Dates as b; + diff --git a/yql/essentials/tests/sql/suites/blocks/date_sub_interval.cfg b/yql/essentials/tests/sql/suites/blocks/date_sub_interval.cfg new file mode 100644 index 0000000000..8d2d2a19fc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_sub_interval.cfg @@ -0,0 +1 @@ +in Dates dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/date_sub_interval.sql b/yql/essentials/tests/sql/suites/blocks/date_sub_interval.sql new file mode 100644 index 0000000000..9e9c6ce95b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_sub_interval.sql @@ -0,0 +1,31 @@ +USE plato; + +SELECT + a.na - b.ni, + a.na - b.wi, + a.naz - b.ni, + a.naz - b.wi, + a.nd - b.ni, + a.nd - b.wi, + a.ndz - b.ni, + a.ndz - b.wi, + a.nt - b.ni, + a.nt - b.wi, + a.ntz - b.ni, + a.ntz - b.wi, + + a.wa - b.ni, + a.wa - b.wi, + a.waz - b.ni, + a.waz - b.wi, + a.wd - b.ni, + a.wd - b.wi, + a.wdz - b.ni, + a.wdz - b.wi, + a.wt - b.ni, + a.wt - b.wi, + a.wtz - b.ni, + a.wtz - b.wi + +FROM Dates as a CROSS JOIN Dates as b + diff --git a/yql/essentials/tests/sql/suites/blocks/date_sub_interval_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/date_sub_interval_scalar.cfg new file mode 100644 index 0000000000..8d2d2a19fc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_sub_interval_scalar.cfg @@ -0,0 +1 @@ +in Dates dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/date_sub_interval_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_sub_interval_scalar.sql new file mode 100644 index 0000000000..8b5aee81fa --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_sub_interval_scalar.sql @@ -0,0 +1,58 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + Date("2000-01-01") - ni, + Date("2000-01-01") - wi, + TzDate("2000-01-01,Europe/Moscow") - ni, + TzDate("2000-01-01,Europe/Moscow") - wi, + Datetime("2000-01-01T03:04:05Z") - ni, + Datetime("2000-01-01T03:04:05Z") - wi, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - ni, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - wi, + Timestamp("2000-01-01T03:04:05.678912Z") - ni, + Timestamp("2000-01-01T03:04:05.678912Z") - wi, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - ni, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - wi, + Date32("1900-01-01") - ni, + Date32("1900-01-01") - wi, + Datetime64("1900-01-01T03:04:05Z") - ni, + Datetime64("1900-01-01T03:04:05Z") - wi, + Timestamp64("1900-01-01T03:04:05.678912Z") - ni, + Timestamp64("1900-01-01T03:04:05.678912Z") - wi, + TzDate32("1900-01-01,Europe/Moscow") - ni, + TzDate32("1900-01-01,Europe/Moscow") - wi, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - ni, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - wi, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - ni, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - wi +FROM Dates; + +SELECT + na - Interval("P1D"), + na - Interval64("P1D"), + naz - Interval("P1D"), + naz - Interval64("P1D"), + nd - Interval("P1D"), + nd - Interval64("P1D"), + ndz - Interval("P1D"), + ndz - Interval64("P1D"), + nt - Interval("P1D"), + nt - Interval64("P1D"), + ntz - Interval("P1D"), + ntz - Interval64("P1D"), + wa - Interval("P1D"), + wa - Interval64("P1D"), + wd - Interval("P1D"), + wd - Interval64("P1D"), + wt - Interval("P1D"), + wt - Interval64("P1D"), + waz - Interval("P1D"), + waz - Interval64("P1D"), + wdz - Interval("P1D"), + wdz - Interval64("P1D"), + wtz - Interval("P1D"), + wtz - Interval64("P1D") +FROM Dates; + + diff --git a/yql/essentials/tests/sql/suites/blocks/date_sub_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/date_sub_scalar.cfg new file mode 100644 index 0000000000..8d2d2a19fc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_sub_scalar.cfg @@ -0,0 +1 @@ +in Dates dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/date_sub_scalar.sql b/yql/essentials/tests/sql/suites/blocks/date_sub_scalar.sql new file mode 100644 index 0000000000..efe5c86006 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_sub_scalar.sql @@ -0,0 +1,326 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + Date("2000-01-01") - na, + Date("2000-01-01") - naz, + Date("2000-01-01") - nd, + Date("2000-01-01") - ndz, + Date("2000-01-01") - nt, + Date("2000-01-01") - ntz, + Date("2000-01-01") - wa, + Date("2000-01-01") - wd, + Date("2000-01-01") - wt, + Date("2000-01-01") - waz, + Date("2000-01-01") - wdz, + Date("2000-01-01") - wtz, + + TzDate("2000-01-01,Europe/Moscow") - na, + TzDate("2000-01-01,Europe/Moscow") - naz, + TzDate("2000-01-01,Europe/Moscow") - nd, + TzDate("2000-01-01,Europe/Moscow") - ndz, + TzDate("2000-01-01,Europe/Moscow") - nt, + TzDate("2000-01-01,Europe/Moscow") - ntz, + TzDate("2000-01-01,Europe/Moscow") - wa, + TzDate("2000-01-01,Europe/Moscow") - wd, + TzDate("2000-01-01,Europe/Moscow") - wt, + TzDate("2000-01-01,Europe/Moscow") - waz, + TzDate("2000-01-01,Europe/Moscow") - wdz, + TzDate("2000-01-01,Europe/Moscow") - wtz, + + Datetime("2000-01-01T03:04:05Z") - na, + Datetime("2000-01-01T03:04:05Z") - naz, + Datetime("2000-01-01T03:04:05Z") - nd, + Datetime("2000-01-01T03:04:05Z") - ndz, + Datetime("2000-01-01T03:04:05Z") - nt, + Datetime("2000-01-01T03:04:05Z") - ntz, + Datetime("2000-01-01T03:04:05Z") - wa, + Datetime("2000-01-01T03:04:05Z") - wd, + Datetime("2000-01-01T03:04:05Z") - wt, + Datetime("2000-01-01T03:04:05Z") - waz, + Datetime("2000-01-01T03:04:05Z") - wdz, + Datetime("2000-01-01T03:04:05Z") - wtz, + + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - na, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - naz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - nd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - ndz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - nt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - ntz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - wa, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - wd, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - wt, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - waz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - wdz, + TzDatetime("2000-01-01T03:04:05,Europe/Moscow") - wtz, + + Timestamp("2000-01-01T03:04:05.678912Z") - na, + Timestamp("2000-01-01T03:04:05.678912Z") - naz, + Timestamp("2000-01-01T03:04:05.678912Z") - nd, + Timestamp("2000-01-01T03:04:05.678912Z") - ndz, + Timestamp("2000-01-01T03:04:05.678912Z") - nt, + Timestamp("2000-01-01T03:04:05.678912Z") - ntz, + Timestamp("2000-01-01T03:04:05.678912Z") - wa, + Timestamp("2000-01-01T03:04:05.678912Z") - wd, + Timestamp("2000-01-01T03:04:05.678912Z") - wt, + Timestamp("2000-01-01T03:04:05.678912Z") - waz, + Timestamp("2000-01-01T03:04:05.678912Z") - wdz, + Timestamp("2000-01-01T03:04:05.678912Z") - wtz, + + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - na, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - naz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - nd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - ndz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - nt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - ntz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - wa, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - wd, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - wt, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - waz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - wdz, + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow") - wtz, + +FROM Dates; + +SELECT + Date32("1900-01-01") - na, + Date32("1900-01-01") - naz, + Date32("1900-01-01") - nd, + Date32("1900-01-01") - ndz, + Date32("1900-01-01") - nt, + Date32("1900-01-01") - ntz, + Date32("1900-01-01") - wa, + Date32("1900-01-01") - wd, + Date32("1900-01-01") - wt, + Date32("1900-01-01") - waz, + Date32("1900-01-01") - wdz, + Date32("1900-01-01") - wtz, + + Datetime64("1900-01-01T03:04:05Z") - na, + Datetime64("1900-01-01T03:04:05Z") - naz, + Datetime64("1900-01-01T03:04:05Z") - nd, + Datetime64("1900-01-01T03:04:05Z") - ndz, + Datetime64("1900-01-01T03:04:05Z") - nt, + Datetime64("1900-01-01T03:04:05Z") - ntz, + Datetime64("1900-01-01T03:04:05Z") - wa, + Datetime64("1900-01-01T03:04:05Z") - wd, + Datetime64("1900-01-01T03:04:05Z") - wt, + Datetime64("1900-01-01T03:04:05Z") - waz, + Datetime64("1900-01-01T03:04:05Z") - wdz, + Datetime64("1900-01-01T03:04:05Z") - wtz, + + Timestamp64("1900-01-01T03:04:05.678912Z") - na, + Timestamp64("1900-01-01T03:04:05.678912Z") - naz, + Timestamp64("1900-01-01T03:04:05.678912Z") - nd, + Timestamp64("1900-01-01T03:04:05.678912Z") - ndz, + Timestamp64("1900-01-01T03:04:05.678912Z") - nt, + Timestamp64("1900-01-01T03:04:05.678912Z") - ntz, + Timestamp64("1900-01-01T03:04:05.678912Z") - wa, + Timestamp64("1900-01-01T03:04:05.678912Z") - wd, + Timestamp64("1900-01-01T03:04:05.678912Z") - wt, + Timestamp64("1900-01-01T03:04:05.678912Z") - waz, + Timestamp64("1900-01-01T03:04:05.678912Z") - wdz, + Timestamp64("1900-01-01T03:04:05.678912Z") - wtz, + + TzDate32("1900-01-01,Europe/Moscow") - na, + TzDate32("1900-01-01,Europe/Moscow") - naz, + TzDate32("1900-01-01,Europe/Moscow") - nd, + TzDate32("1900-01-01,Europe/Moscow") - ndz, + TzDate32("1900-01-01,Europe/Moscow") - nt, + TzDate32("1900-01-01,Europe/Moscow") - ntz, + TzDate32("1900-01-01,Europe/Moscow") - wa, + TzDate32("1900-01-01,Europe/Moscow") - wd, + TzDate32("1900-01-01,Europe/Moscow") - wt, + TzDate32("1900-01-01,Europe/Moscow") - waz, + TzDate32("1900-01-01,Europe/Moscow") - wdz, + TzDate32("1900-01-01,Europe/Moscow") - wtz, + + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - na, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - naz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - nd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - ndz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - nt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - ntz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - wa, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - wd, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - wt, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - waz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - wdz, + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow") - wtz, + + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - na, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - naz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - nd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - ndz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - nt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - ntz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - wa, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - wd, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - wt, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - waz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - wdz, + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") - wtz + +FROM Dates; + +SELECT + na - Date("2000-01-01"), + naz - Date("2000-01-01"), + nd - Date("2000-01-01"), + ndz - Date("2000-01-01"), + nt - Date("2000-01-01"), + ntz - Date("2000-01-01"), + wa - Date("2000-01-01"), + wd - Date("2000-01-01"), + wt - Date("2000-01-01"), + waz - Date("2000-01-01"), + wdz - Date("2000-01-01"), + wtz - Date("2000-01-01"), + + na - TzDate("2000-01-01,Europe/Moscow"), + naz - TzDate("2000-01-01,Europe/Moscow"), + nd - TzDate("2000-01-01,Europe/Moscow"), + ndz - TzDate("2000-01-01,Europe/Moscow"), + nt - TzDate("2000-01-01,Europe/Moscow"), + ntz - TzDate("2000-01-01,Europe/Moscow"), + wa - TzDate("2000-01-01,Europe/Moscow"), + wd - TzDate("2000-01-01,Europe/Moscow"), + wt - TzDate("2000-01-01,Europe/Moscow"), + waz - TzDate("2000-01-01,Europe/Moscow"), + wdz - TzDate("2000-01-01,Europe/Moscow"), + wtz - TzDate("2000-01-01,Europe/Moscow"), + + na - Datetime("2000-01-01T03:04:05Z"), + naz - Datetime("2000-01-01T03:04:05Z"), + nd - Datetime("2000-01-01T03:04:05Z"), + ndz - Datetime("2000-01-01T03:04:05Z"), + nt - Datetime("2000-01-01T03:04:05Z"), + ntz - Datetime("2000-01-01T03:04:05Z"), + wa - Datetime("2000-01-01T03:04:05Z"), + wd - Datetime("2000-01-01T03:04:05Z"), + wt - Datetime("2000-01-01T03:04:05Z"), + waz - Datetime("2000-01-01T03:04:05Z"), + wdz - Datetime("2000-01-01T03:04:05Z"), + wtz - Datetime("2000-01-01T03:04:05Z"), + + na - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + naz - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nd - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ndz - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + nt - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ntz - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wa - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wd - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wt - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + waz - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wdz - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wtz - TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + + na - Timestamp("2000-01-01T03:04:05.678912Z"), + naz - Timestamp("2000-01-01T03:04:05.678912Z"), + nd - Timestamp("2000-01-01T03:04:05.678912Z"), + ndz - Timestamp("2000-01-01T03:04:05.678912Z"), + nt - Timestamp("2000-01-01T03:04:05.678912Z"), + ntz - Timestamp("2000-01-01T03:04:05.678912Z"), + wa - Timestamp("2000-01-01T03:04:05.678912Z"), + wd - Timestamp("2000-01-01T03:04:05.678912Z"), + wt - Timestamp("2000-01-01T03:04:05.678912Z"), + waz - Timestamp("2000-01-01T03:04:05.678912Z"), + wdz - Timestamp("2000-01-01T03:04:05.678912Z"), + wtz - Timestamp("2000-01-01T03:04:05.678912Z"), + + na - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + naz - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nd - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ndz - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + nt - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ntz - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wa - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wd - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wt - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + waz - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wdz - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wtz - TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), +FROM Dates; + +SELECT + na - Date32("1900-01-01"), + naz - Date32("1900-01-01"), + nd - Date32("1900-01-01"), + ndz - Date32("1900-01-01"), + nt - Date32("1900-01-01"), + ntz - Date32("1900-01-01"), + wa - Date32("1900-01-01"), + wd - Date32("1900-01-01"), + wt - Date32("1900-01-01"), + waz - Date32("1900-01-01"), + wdz - Date32("1900-01-01"), + wtz - Date32("1900-01-01"), + + na - Datetime64("1900-01-01T03:04:05Z"), + naz - Datetime64("1900-01-01T03:04:05Z"), + nd - Datetime64("1900-01-01T03:04:05Z"), + ndz - Datetime64("1900-01-01T03:04:05Z"), + nt - Datetime64("1900-01-01T03:04:05Z"), + ntz - Datetime64("1900-01-01T03:04:05Z"), + wa - Datetime64("1900-01-01T03:04:05Z"), + wd - Datetime64("1900-01-01T03:04:05Z"), + wt - Datetime64("1900-01-01T03:04:05Z"), + waz - Datetime64("1900-01-01T03:04:05Z"), + wdz - Datetime64("1900-01-01T03:04:05Z"), + wtz - Datetime64("1900-01-01T03:04:05Z"), + + na - Timestamp64("1900-01-01T03:04:05.678912Z"), + naz - Timestamp64("1900-01-01T03:04:05.678912Z"), + nd - Timestamp64("1900-01-01T03:04:05.678912Z"), + ndz - Timestamp64("1900-01-01T03:04:05.678912Z"), + nt - Timestamp64("1900-01-01T03:04:05.678912Z"), + ntz - Timestamp64("1900-01-01T03:04:05.678912Z"), + wa - Timestamp64("1900-01-01T03:04:05.678912Z"), + wd - Timestamp64("1900-01-01T03:04:05.678912Z"), + wt - Timestamp64("1900-01-01T03:04:05.678912Z"), + waz - Timestamp64("1900-01-01T03:04:05.678912Z"), + wdz - Timestamp64("1900-01-01T03:04:05.678912Z"), + wtz - Timestamp64("1900-01-01T03:04:05.678912Z"), + + na - TzDate32("1900-01-01,Europe/Moscow"), + naz - TzDate32("1900-01-01,Europe/Moscow"), + nd - TzDate32("1900-01-01,Europe/Moscow"), + ndz - TzDate32("1900-01-01,Europe/Moscow"), + nt - TzDate32("1900-01-01,Europe/Moscow"), + ntz - TzDate32("1900-01-01,Europe/Moscow"), + wa - TzDate32("1900-01-01,Europe/Moscow"), + wd - TzDate32("1900-01-01,Europe/Moscow"), + wt - TzDate32("1900-01-01,Europe/Moscow"), + waz - TzDate32("1900-01-01,Europe/Moscow"), + wdz - TzDate32("1900-01-01,Europe/Moscow"), + wtz - TzDate32("1900-01-01,Europe/Moscow"), + + na - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + naz - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nd - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ndz - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + nt - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ntz - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wa - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wd - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wt - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + waz - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wdz - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wtz - TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + + na - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + naz - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nd - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ndz - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + nt - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + ntz - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wa - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wd - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wt - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + waz - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wdz - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wtz - TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow") + +FROM Dates; + diff --git a/yql/essentials/tests/sql/suites/blocks/date_top_sort.cfg b/yql/essentials/tests/sql/suites/blocks/date_top_sort.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_top_sort.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/date_top_sort.sql b/yql/essentials/tests/sql/suites/blocks/date_top_sort.sql new file mode 100644 index 0000000000..a2cc856c56 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/date_top_sort.sql @@ -0,0 +1,9 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + t.*, i8+1 +FROM (SELECT * FROM concat(Dates,Dates)) as t +ORDER BY na,wa,naz,waz,nd,ndz,wd,wdz,nt,ntz,wt,wtz,ni,wi +LIMIT 1; + diff --git a/yql/essentials/tests/sql/suites/blocks/dates.txt b/yql/essentials/tests/sql/suites/blocks/dates.txt new file mode 100644 index 0000000000..9137f4bac7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/dates.txt @@ -0,0 +1 @@ +{"na"=1u;"nd"=2u;"nt"=3u;"naz"="\x00\x04\x00\x01";"ndz"="\x00\x00\x00\x05\x00\x01";"ntz"="\x00\x00\x00\x00\x00\x00\x00\x06\x00\x01";"wa"=7;"wd"=8;"wt"=9;"ni"=10;"wi"=11;"i8"=12;"u8"=13u;"i16"=14;"u16"=15u;"i32"=16;"u32"=17u;"i64"=18;"u64"=19u;"waz"="\x80\x00\x00\x14\x00\x01";"wdz"="\x80\x00\x00\x00\x00\x00\x00\x15\x00\x01";"wtz"="\x80\x00\x00\x00\x00\x00\x00\x16\x00\x01";} diff --git a/yql/essentials/tests/sql/suites/blocks/dates.txt.attr b/yql/essentials/tests/sql/suites/blocks/dates.txt.attr new file mode 100644 index 0000000000..d2ce0ed49f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/dates.txt.attr @@ -0,0 +1,27 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["na";["DataType";"Date"]]; + ["nd";["DataType";"Datetime"]]; + ["nt";["DataType";"Timestamp"]]; + ["naz";["DataType";"TzDate"]]; + ["ndz";["DataType";"TzDatetime"]]; + ["ntz";["DataType";"TzTimestamp"]]; + ["wa";["DataType";"Date32"]]; + ["wd";["DataType";"Datetime64"]]; + ["wt";["DataType";"Timestamp64"]]; + ["ni";["DataType";"Interval"]]; + ["wi";["DataType";"Interval64"]]; + ["i8";["DataType";"Int8"]]; + ["u8";["DataType";"Uint8"]]; + ["i16";["DataType";"Int16"]]; + ["u16";["DataType";"Uint16"]]; + ["i32";["DataType";"Int32"]]; + ["u32";["DataType";"Uint32"]]; + ["i64";["DataType";"Int64"]]; + ["u64";["DataType";"Uint64"]]; + ["waz";["DataType";"TzDate32"]]; + ["wdz";["DataType";"TzDatetime64"]]; + ["wtz";["DataType";"TzTimestamp64"]]; + ]]; +}} + diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_avg.cfg b/yql/essentials/tests/sql/suites/blocks/decimal_avg.cfg new file mode 100644 index 0000000000..a21c6560ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_avg.cfg @@ -0,0 +1 @@ +in Input input_decimal.txt diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_avg.sql b/yql/essentials/tests/sql/suites/blocks/decimal_avg.sql new file mode 100644 index 0000000000..3e1dd49983 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_avg.sql @@ -0,0 +1,8 @@ +USE plato; + +SELECT + avg(cs_ext_list_price), avg(cs_ext_tax), + avg(cs_ext_list_price) * decimal("1.1", 7, 2), + decimal("1.1", 7, 2) * avg(cs_ext_tax), +FROM Input; + diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_comparison.cfg b/yql/essentials/tests/sql/suites/blocks/decimal_comparison.cfg new file mode 100644 index 0000000000..a21c6560ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_comparison.cfg @@ -0,0 +1 @@ +in Input input_decimal.txt diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_comparison.sql b/yql/essentials/tests/sql/suites/blocks/decimal_comparison.sql new file mode 100644 index 0000000000..c41cc5540e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_comparison.sql @@ -0,0 +1,25 @@ +USE plato; + +SELECT + cs_ext_list_price == cs_ext_tax, + cs_ext_list_price != cs_ext_tax, + cs_ext_list_price < cs_ext_tax, + cs_ext_list_price <= cs_ext_tax, + cs_ext_list_price > cs_ext_tax, + cs_ext_list_price >= cs_ext_tax, + + cs_ext_tax == decimal("26.91", 7, 2), + cs_ext_tax != decimal("26.91", 7, 2), + cs_ext_tax < decimal("26.91", 7, 2), + cs_ext_tax <= decimal("26.91", 7, 2), + cs_ext_tax > decimal("26.91", 7, 2), + cs_ext_tax >= decimal("26.91", 7, 2), + + decimal("26.91", 7, 2) == cs_ext_tax, + decimal("26.91", 7, 2) != cs_ext_tax, + decimal("26.91", 7, 2) < cs_ext_tax, + decimal("26.91", 7, 2) <= cs_ext_tax, + decimal("26.91", 7, 2) > cs_ext_tax, + decimal("26.91", 7, 2) >= cs_ext_tax, +FROM Input; + diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_multiplicative_ops.cfg b/yql/essentials/tests/sql/suites/blocks/decimal_multiplicative_ops.cfg new file mode 100644 index 0000000000..a21c6560ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_multiplicative_ops.cfg @@ -0,0 +1 @@ +in Input input_decimal.txt diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_multiplicative_ops.sql b/yql/essentials/tests/sql/suites/blocks/decimal_multiplicative_ops.sql new file mode 100644 index 0000000000..4d3166b6a5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_multiplicative_ops.sql @@ -0,0 +1,18 @@ +USE plato; + +SELECT + cs_ext_list_price, cs_ext_tax, + cs_ext_list_price * cs_ext_tax, cs_ext_list_price * Just(decimal("13.37", 7, 2)), Just(decimal("42.0", 7, 2)) * cs_ext_tax, + cs_ext_list_price * decimal("13.37", 7, 2), decimal("42.0", 7, 2) * cs_ext_tax, + + cs_ext_list_price / cs_ext_tax, cs_ext_list_price / Just(decimal("13.37", 7, 2)), Just(decimal("42.0", 7, 2)) / cs_ext_tax, + cs_ext_list_price / decimal("13.37", 7, 2), decimal("42.0", 7, 2) / cs_ext_tax, + + cs_ext_list_price % cs_ext_tax, cs_ext_list_price % Just(decimal("13.37", 7, 2)), Just(decimal("42.0", 7, 2)) % cs_ext_tax, + cs_ext_list_price % decimal("13.37", 7, 2), decimal("42.0", 7, 2) % cs_ext_tax, + + cs_ext_list_price * Just(13), cs_ext_list_price * 13, + cs_ext_list_price / Just(13), cs_ext_list_price / 13, + cs_ext_list_price % Just(13), cs_ext_list_price % 13, +FROM Input; + diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal.cfg b/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal.cfg new file mode 100644 index 0000000000..a21c6560ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal.cfg @@ -0,0 +1 @@ +in Input input_decimal.txt diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal.sql b/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal.sql new file mode 100644 index 0000000000..996ea73835 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal.sql @@ -0,0 +1,7 @@ +USE plato; + +SELECT + cs_ext_list_price + cs_ext_tax, + cs_ext_list_price - cs_ext_tax, +FROM Input; + diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal_scalar.cfg new file mode 100644 index 0000000000..a21c6560ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal_scalar.cfg @@ -0,0 +1 @@ +in Input input_decimal.txt diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal_scalar.sql b/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal_scalar.sql new file mode 100644 index 0000000000..81ce0f5dbf --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_op_decimal_scalar.sql @@ -0,0 +1,16 @@ +USE plato; + +SELECT + cs_ext_list_price + cast("10.2" as decimal(7,2)), + cs_ext_list_price + cast("99999.99" as decimal(7,2)), + cs_ext_list_price - cast("11.22" as decimal(7,2)), + cs_ext_list_price - cast("99999.99" as decimal(7,2)), +FROM Input; + +SELECT + cast("10.2" as decimal(7,2)) + cs_ext_list_price, + cast("99999.99" as decimal(7,2)) + cs_ext_list_price, + cast("11.22" as decimal(7,2)) - cs_ext_list_price, + cast("99999.99" as decimal(7,2)) - cs_ext_list_price, +FROM Input; + diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_unary.cfg b/yql/essentials/tests/sql/suites/blocks/decimal_unary.cfg new file mode 100644 index 0000000000..a21c6560ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_unary.cfg @@ -0,0 +1 @@ +in Input input_decimal.txt diff --git a/yql/essentials/tests/sql/suites/blocks/decimal_unary.sql b/yql/essentials/tests/sql/suites/blocks/decimal_unary.sql new file mode 100644 index 0000000000..77d1170ef6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/decimal_unary.sql @@ -0,0 +1,7 @@ +USE plato; + +SELECT + -cs_ext_list_price, + abs(cs_ext_tax), +FROM Input; + diff --git a/yql/essentials/tests/sql/suites/blocks/default.cfg b/yql/essentials/tests/sql/suites/blocks/default.cfg new file mode 100644 index 0000000000..41a0f8a733 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/default.cfg @@ -0,0 +1,4 @@ +canonize_peephole +peephole_use_blocks + + diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_mixed_all.cfg b/yql/essentials/tests/sql/suites/blocks/distinct_mixed_all.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_mixed_all.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_mixed_all.sql b/yql/essentials/tests/sql/suites/blocks/distinct_mixed_all.sql new file mode 100644 index 0000000000..dae808a395 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_mixed_all.sql @@ -0,0 +1,8 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +SELECT + count(*), + sum(distinct key),min(distinct key) +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_mixed_keys.cfg b/yql/essentials/tests/sql/suites/blocks/distinct_mixed_keys.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_mixed_keys.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_mixed_keys.sql b/yql/essentials/tests/sql/suites/blocks/distinct_mixed_keys.sql new file mode 100644 index 0000000000..8c3aac0c0b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_mixed_keys.sql @@ -0,0 +1,10 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +SELECT + key, count(*), count(distinct subkey), sum(distinct subkey), + count(distinct Unwrap(subkey/2u)), sum(distinct Unwrap(subkey/2u)) +FROM Input +GROUP BY key +ORDER BY key diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_all.cfg b/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_all.cfg new file mode 100644 index 0000000000..6ba971b075 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_all.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_all.sql b/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_all.sql new file mode 100644 index 0000000000..1f45427b87 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_all.sql @@ -0,0 +1,7 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +SELECT + count(*),max(subkey),sum(distinct subkey),avg(subkey),count(distinct subkey/2u),avg(distinct subkey/2u) +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_keys.cfg b/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_keys.cfg new file mode 100644 index 0000000000..6ba971b075 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_keys.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_keys.sql b/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_keys.sql new file mode 100644 index 0000000000..9b5d778b98 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_opt_state_keys.sql @@ -0,0 +1,10 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +SELECT + key,count(*),max(subkey),sum(distinct subkey),avg(subkey),count(distinct subkey/2u),avg(distinct subkey/2u) +FROM Input +GROUP BY key +ORDER BY key + diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_pure_all.cfg b/yql/essentials/tests/sql/suites/blocks/distinct_pure_all.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_pure_all.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_pure_all.sql b/yql/essentials/tests/sql/suites/blocks/distinct_pure_all.sql new file mode 100644 index 0000000000..aa2865f46d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_pure_all.sql @@ -0,0 +1,7 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +SELECT + sum(distinct key),min(distinct key) +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_pure_keys.cfg b/yql/essentials/tests/sql/suites/blocks/distinct_pure_keys.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_pure_keys.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/distinct_pure_keys.sql b/yql/essentials/tests/sql/suites/blocks/distinct_pure_keys.sql new file mode 100644 index 0000000000..2acc401488 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/distinct_pure_keys.sql @@ -0,0 +1,10 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +SELECT + key, count(distinct subkey), sum(distinct subkey), + count(distinct Unwrap(subkey/2u)), sum(distinct Unwrap(subkey/2u)) +FROM Input +GROUP BY key +ORDER BY key diff --git a/yql/essentials/tests/sql/suites/blocks/div_uint64.cfg b/yql/essentials/tests/sql/suites/blocks/div_uint64.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/div_uint64.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/div_uint64.sql b/yql/essentials/tests/sql/suites/blocks/div_uint64.sql new file mode 100644 index 0000000000..3eff1d864b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/div_uint64.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key/subkey,1000ul/key,subkey/0ul +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/div_uint64_opt2.cfg b/yql/essentials/tests/sql/suites/blocks/div_uint64_opt2.cfg new file mode 100644 index 0000000000..46fee85c7f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/div_uint64_opt2.cfg @@ -0,0 +1 @@ +in Input input_uint64_opt2.txt diff --git a/yql/essentials/tests/sql/suites/blocks/div_uint64_opt2.sql b/yql/essentials/tests/sql/suites/blocks/div_uint64_opt2.sql new file mode 100644 index 0000000000..3eff1d864b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/div_uint64_opt2.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key/subkey,1000ul/key,subkey/0ul +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/exists.cfg b/yql/essentials/tests/sql/suites/blocks/exists.cfg new file mode 100644 index 0000000000..87522c685e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/exists.cfg @@ -0,0 +1 @@ +in Input input_exists.txt diff --git a/yql/essentials/tests/sql/suites/blocks/exists.sql b/yql/essentials/tests/sql/suites/blocks/exists.sql new file mode 100644 index 0000000000..a4a0b91d5f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/exists.sql @@ -0,0 +1,9 @@ +USE plato; + +SELECT + key, + maybe_null is NULL as is_maybe_null, + always_null is NULL as is_always_null, + never_null is NULL as is_never_null, +FROM Input +ORDER BY key; diff --git a/yql/essentials/tests/sql/suites/blocks/filter_by_column_with_drop.cfg b/yql/essentials/tests/sql/suites/blocks/filter_by_column_with_drop.cfg new file mode 100644 index 0000000000..490bd1a7a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/filter_by_column_with_drop.cfg @@ -0,0 +1 @@ +in Input input_bools.txt diff --git a/yql/essentials/tests/sql/suites/blocks/filter_by_column_with_drop.sql b/yql/essentials/tests/sql/suites/blocks/filter_by_column_with_drop.sql new file mode 100644 index 0000000000..6fd08e1d67 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/filter_by_column_with_drop.sql @@ -0,0 +1,7 @@ +USE plato; + +select + key, +from Input +where b1 +order by key; diff --git a/yql/essentials/tests/sql/suites/blocks/filter_direct_col.cfg b/yql/essentials/tests/sql/suites/blocks/filter_direct_col.cfg new file mode 100644 index 0000000000..63c656a58f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/filter_direct_col.cfg @@ -0,0 +1 @@ +in Input input_uint32_optbool_bool.txt diff --git a/yql/essentials/tests/sql/suites/blocks/filter_direct_col.sql b/yql/essentials/tests/sql/suites/blocks/filter_direct_col.sql new file mode 100644 index 0000000000..363a005ca3 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/filter_direct_col.sql @@ -0,0 +1 @@ +select * from plato.Input where value order by key; diff --git a/yql/essentials/tests/sql/suites/blocks/filter_expr.cfg b/yql/essentials/tests/sql/suites/blocks/filter_expr.cfg new file mode 100644 index 0000000000..63c656a58f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/filter_expr.cfg @@ -0,0 +1 @@ +in Input input_uint32_optbool_bool.txt diff --git a/yql/essentials/tests/sql/suites/blocks/filter_expr.sql b/yql/essentials/tests/sql/suites/blocks/filter_expr.sql new file mode 100644 index 0000000000..07efda8677 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/filter_expr.sql @@ -0,0 +1 @@ +select key, subkey from plato.Input where not value order by key; diff --git a/yql/essentials/tests/sql/suites/blocks/filter_partial_expr.cfg b/yql/essentials/tests/sql/suites/blocks/filter_partial_expr.cfg new file mode 100644 index 0000000000..63c656a58f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/filter_partial_expr.cfg @@ -0,0 +1 @@ +in Input input_uint32_optbool_bool.txt diff --git a/yql/essentials/tests/sql/suites/blocks/filter_partial_expr.sql b/yql/essentials/tests/sql/suites/blocks/filter_partial_expr.sql new file mode 100644 index 0000000000..df187d75f2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/filter_partial_expr.sql @@ -0,0 +1 @@ +select key, subkey from plato.Input where not value or Random(key) >= 0.0 order by key; diff --git a/yql/essentials/tests/sql/suites/blocks/finalize_hashed_keys.cfg b/yql/essentials/tests/sql/suites/blocks/finalize_hashed_keys.cfg new file mode 100644 index 0000000000..57e52ccabb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/finalize_hashed_keys.cfg @@ -0,0 +1 @@ +in Input input_hashed_uint32.txt diff --git a/yql/essentials/tests/sql/suites/blocks/finalize_hashed_keys.sql b/yql/essentials/tests/sql/suites/blocks/finalize_hashed_keys.sql new file mode 100644 index 0000000000..1609c02088 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/finalize_hashed_keys.sql @@ -0,0 +1,9 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +SELECT + key, count(*), count(subkey), min(subkey), max(subkey), sum(subkey), avg(subkey) +FROM Input +GROUP by key +ORDER by key; diff --git a/yql/essentials/tests/sql/suites/blocks/group_by_complex_key.cfg b/yql/essentials/tests/sql/suites/blocks/group_by_complex_key.cfg new file mode 100644 index 0000000000..b65712414d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/group_by_complex_key.cfg @@ -0,0 +1 @@ +in Input input_strings.txt diff --git a/yql/essentials/tests/sql/suites/blocks/group_by_complex_key.sql b/yql/essentials/tests/sql/suites/blocks/group_by_complex_key.sql new file mode 100644 index 0000000000..59e121f52f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/group_by_complex_key.sql @@ -0,0 +1,16 @@ +USE plato; + +$src = +SELECT + if (key != '075', AsTuple(Just(Just(key)), 123)) as k, + subkey, + value +FROM Input; + +SELECT + k, + min(subkey) as min, + max(value) as max, +FROM $src +GROUP by k +ORDER by k diff --git a/yql/essentials/tests/sql/suites/blocks/if.cfg b/yql/essentials/tests/sql/suites/blocks/if.cfg new file mode 100644 index 0000000000..b65712414d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/if.cfg @@ -0,0 +1 @@ +in Input input_strings.txt diff --git a/yql/essentials/tests/sql/suites/blocks/if.sql b/yql/essentials/tests/sql/suites/blocks/if.sql new file mode 100644 index 0000000000..829699ce50 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/if.sql @@ -0,0 +1,16 @@ +select + key, + subkey, + if (1 > 0, key, subkey) as same_as_key, + if (0 > 100, key, subkey) as same_as_subkey, + if (10 > 0, 'scalar1 selected', key) as sc1, + if (0 > 11, subkey, 'scalar2 selected') as sc2, + + + if(key > subkey, key, subkey) as max_of_key_subkey, + if(key > subkey, key, 'subkey is greater') as sc3, + if(subkey >= key, 'subkey is greater or eq', key) as sc4, + if(subkey >= key, 'subkey is greater or eq', 'key is greater') as sc5, + +from plato.Input +order by key, subkey; diff --git a/yql/essentials/tests/sql/suites/blocks/input1.txt b/yql/essentials/tests/sql/suites/blocks/input1.txt new file mode 100644 index 0000000000..35c1a628a3 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input1.txt @@ -0,0 +1,5 @@ +{"key"="023";"subkey"="3";"value"="aaa"}; +{"key"="037";"subkey"="5";"value"="ddd"}; +{"key"="075";"subkey"="1";"value"="abc"}; +{"key"="150";"subkey"="1";"value"="aaa"}; +{"key"="150";"subkey"="3";"value"="iii"}; diff --git a/yql/essentials/tests/sql/suites/blocks/input1.txt.attr b/yql/essentials/tests/sql/suites/blocks/input1.txt.attr new file mode 100644 index 0000000000..157b4f5c1f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input1.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"String"]]; + ["subkey";["DataType";"String"]]; + ["value";["DataType";"String"]] + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input2.txt b/yql/essentials/tests/sql/suites/blocks/input2.txt new file mode 100644 index 0000000000..3d8c1dee24 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input2.txt @@ -0,0 +1,5 @@ +{"key"="150";"subkey"="8";"value"="zzz"}; +{"key"="200";"subkey"="7";"value"="qqq"}; +{"key"="527";"subkey"="4";"value"="bbb"}; +{"key"="761";"subkey"="6";"value"="ccc"}; +{"key"="911";"subkey"="2";"value"="kkk"}; diff --git a/yql/essentials/tests/sql/suites/blocks/input2.txt.attr b/yql/essentials/tests/sql/suites/blocks/input2.txt.attr new file mode 100644 index 0000000000..157b4f5c1f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input2.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"String"]]; + ["subkey";["DataType";"String"]]; + ["value";["DataType";"String"]] + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_allnums.txt b/yql/essentials/tests/sql/suites/blocks/input_allnums.txt new file mode 100644 index 0000000000..ab464de5cb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_allnums.txt @@ -0,0 +1,3 @@ +{ "i8"=1 ; "i16"=2; "i32"=3; "i64"=4; "i8opt"=5; "i16opt"=6; "i32opt"=7; "i64opt"=8; "ui8"=9u; "ui16"=10u; "ui32"=11u; "ui64"=12u; "ui8opt"=13u; "ui16opt"=14u; "ui32opt"=15u; "ui64opt"=16u; }; +{ "i8"=17; "i16"=18; "i32"=19; "i64"=20; "i8opt"=21; "i16opt"=#; "i32opt"=23; "i64opt"=#; "ui8"=25u; "ui16"=26u; "ui32"=27u; "ui64"=28u; "ui8opt"=#; "ui16opt"=30u; "ui32opt"=#; "ui64opt"=32u; }; +{ "i8"=33; "i16"=34; "i32"=35; "i64"=36; "i8opt"=37; "i16opt"=38; "i32opt"=#; "i64opt"=40; "ui8"=41u; "ui16"=42u; "ui32"=43u; "ui64"=44u; "ui8opt"=45u; "ui16opt"=#; "ui32opt"=47u; "ui64opt"=48u; }; diff --git a/yql/essentials/tests/sql/suites/blocks/input_allnums.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_allnums.txt.attr new file mode 100644 index 0000000000..aaf80d991f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_allnums.txt.attr @@ -0,0 +1,23 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["i8";["DataType";"Int8"]]; + ["i16";["DataType";"Int16"]]; + ["i32";["DataType";"Int32"]]; + ["i64";["DataType";"Int64"]]; + + ["i8opt";["OptionalType"; ["DataType";"Int8"]]]; + ["i16opt";["OptionalType"; ["DataType";"Int16"]]]; + ["i32opt";["OptionalType"; ["DataType";"Int32"]]]; + ["i64opt";["OptionalType"; ["DataType";"Int64"]]]; + + ["ui8";["DataType";"Uint8"]]; + ["ui16";["DataType";"Uint16"]]; + ["ui32";["DataType";"Uint32"]]; + ["ui64";["DataType";"Uint64"]]; + + ["ui8opt";["OptionalType"; ["DataType";"Uint8"]]]; + ["ui16opt";["OptionalType"; ["DataType";"Uint16"]]]; + ["ui32opt";["OptionalType"; ["DataType";"Uint32"]]]; + ["ui64opt";["OptionalType"; ["DataType";"Uint64"]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_bool.txt b/yql/essentials/tests/sql/suites/blocks/input_bool.txt new file mode 100644 index 0000000000..850bbde1ed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_bool.txt @@ -0,0 +1,4 @@ +{"key"=%false;"subkey"=%false;}; +{"key"=%false;"subkey"=%true;}; +{"key"=%true;"subkey"=%false;}; +{"key"=%true;"subkey"=%true;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_bool.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_bool.txt.attr new file mode 100644 index 0000000000..f59e3e2a04 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_bool.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Bool"]]; + ["subkey";["DataType";"Bool"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_bool_opt.txt b/yql/essentials/tests/sql/suites/blocks/input_bool_opt.txt new file mode 100644 index 0000000000..3526c15cc5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_bool_opt.txt @@ -0,0 +1,9 @@ +{"key"=%false;"subkey"=%false;}; +{"key"=%false;"subkey"=%true;}; +{"key"=%false;"subkey"=#;}; +{"key"=%true;"subkey"=%false;}; +{"key"=%true;"subkey"=%true;}; +{"key"=%true;"subkey"=#;}; +{"key"=#;"subkey"=%false;}; +{"key"=#;"subkey"=%true;}; +{"key"=#;"subkey"=#;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_bool_opt.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_bool_opt.txt.attr new file mode 100644 index 0000000000..c9690dfe89 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_bool_opt.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["OptionalType";["DataType";"Bool"]]]; + ["subkey";["OptionalType";["DataType";"Bool"]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_bools.txt b/yql/essentials/tests/sql/suites/blocks/input_bools.txt new file mode 100644 index 0000000000..4c3461304c --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_bools.txt @@ -0,0 +1,9 @@ +{"key"=1; "b1"=%false; "b2"=%false; "ob1"=%false;"ob2"=%false;}; +{"key"=2; "b1"=%false; "b2"=%true; "ob1"=%false;"ob2"=%true;}; +{"key"=3; "b1"=%true; "b2"=%false; "ob1"=%false;"ob2"=#;}; +{"key"=4; "b1"=%true; "b2"=%true; "ob1"=%true; "ob2"=%false;}; +{"key"=5; "b1"=%false; "b2"=%false; "ob1"=%true; "ob2"=%true;}; +{"key"=6; "b1"=%false; "b2"=%true; "ob1"=%true; "ob2"=#;}; +{"key"=7; "b1"=%true; "b2"=%false; "ob1"=#; "ob2"=%false;}; +{"key"=8; "b1"=%true; "b2"=%true; "ob1"=#; "ob2"=%true;}; +{"key"=9; "b1"=%false; "b2"=%false; "ob1"=#; "ob2"=#;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_bools.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_bools.txt.attr new file mode 100644 index 0000000000..22b4be69d8 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_bools.txt.attr @@ -0,0 +1,9 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int32"]]; + ["b1";["DataType";"Bool"]]; + ["b2";["DataType";"Bool"]]; + ["ob1";["OptionalType";["DataType";"Bool"]]]; + ["ob2";["OptionalType";["DataType";"Bool"]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_decimal.txt b/yql/essentials/tests/sql/suites/blocks/input_decimal.txt new file mode 100644 index 0000000000..7be0d5ef5f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_decimal.txt @@ -0,0 +1,10 @@ +{"cs_ext_list_price"="\x83\7\xE1\xFC";"cs_ext_tax"="\x82\4p";"cs_sales_price"="\x82\7\x86";}; +{"cs_ext_list_price"="\x83\3\x11P";"cs_ext_tax"="\x82\x1BS";"cs_sales_price"="\x82\0143";}; +{"cs_ext_list_price"="\x83\x0B{\x94";"cs_ext_tax"="\x82\0229";"cs_sales_price"="\x82\x1B\x9D";}; +{"cs_ext_list_price"="\x83\x10\x98i";"cs_ext_tax"="\x82Q\x91";"cs_sales_price"="\x82\x0C\xE8";}; +{"cs_ext_list_price"="\x83\x15\x1B\xE8";"cs_ext_tax"="\x82\xA2\x1C";"cs_sales_price"="\x82@\xD8";}; +{"cs_ext_list_price"="\x83\x08\xF3Z";"cs_ext_tax"="\x82pD";"cs_sales_price"="\x82\x1D)";}; +{"cs_ext_list_price"="\x83\6\xF6\xB0";"cs_ext_tax"="\x82\x08\xBC";"cs_sales_price"="\x82\t\xED";}; +{"cs_ext_list_price"="\x83\x08\xBC\xD4";"cs_ext_tax"="\x82\n\xAD";"cs_sales_price"="\x82\x19T";}; +{"cs_ext_list_price"="\x82\x14r";"cs_ext_tax"="\x82\0011";"cs_sales_price"="\x82\7v";}; +{"cs_ext_list_price"="\x83\2\xC6\xB8";"cs_ext_tax"="\x82\n\x83";"cs_sales_price"="\x82\n\xF4";}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_decimal.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_decimal.txt.attr new file mode 100644 index 0000000000..ebddf8b641 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_decimal.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["cs_ext_list_price";["OptionalType";["DataType";"Decimal";"7";"2"]]]; + ["cs_ext_tax";["OptionalType";["DataType";"Decimal";"7";"2"]]]; + ["cs_sales_price";["OptionalType";["DataType";"Decimal";"7";"2"]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_double.txt b/yql/essentials/tests/sql/suites/blocks/input_double.txt new file mode 100644 index 0000000000..591700bec4 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_double.txt @@ -0,0 +1,9 @@ +{"key"=10u;"subkey"=1.0}; +{"key"=20u;"subkey"=-2.0}; +{"key"=20u;"subkey"=2.0}; +{"key"=10u;"subkey"=%-inf}; +{"key"=10u;"subkey"=%nan}; +{"key"=10u;"subkey"=%inf}; +{"key"=20u;"subkey"=3.0}; +{"key"=20u;"subkey"=-10.0}; +{"key"=20u;"subkey"=55.5}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_double.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_double.txt.attr new file mode 100644 index 0000000000..da7771ff13 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_double.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint32"]]; + ["subkey";["DataType";"Double"]]; + ]; + ]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_exists.txt b/yql/essentials/tests/sql/suites/blocks/input_exists.txt new file mode 100644 index 0000000000..aa9f87e25e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_exists.txt @@ -0,0 +1,9 @@ +{"key"=1;"always_null"=#;"never_null"=11;"maybe_null"=11;}; +{"key"=2;"always_null"=#;"never_null"=22;"maybe_null"=22;}; +{"key"=3;"always_null"=#;"never_null"=33;"maybe_null"=33;}; +{"key"=4;"always_null"=#;"never_null"=44;"maybe_null"=#; }; +{"key"=5;"always_null"=#;"never_null"=55;"maybe_null"=55;}; +{"key"=6;"always_null"=#;"never_null"=66;"maybe_null"=#; }; +{"key"=7;"always_null"=#;"never_null"=77;"maybe_null"=#; }; +{"key"=8;"always_null"=#;"never_null"=88;"maybe_null"=88;}; +{"key"=9;"always_null"=#;"never_null"=99;"maybe_null"=#; }; diff --git a/yql/essentials/tests/sql/suites/blocks/input_exists.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_exists.txt.attr new file mode 100644 index 0000000000..16f4c78734 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_exists.txt.attr @@ -0,0 +1,8 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int32"]]; + ["always_null";["OptionalType";["DataType";"Int32"]]]; + ["never_null";["OptionalType";["DataType";"Int32"]]]; + ["maybe_null";["OptionalType";["DataType";"Int32"]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_from_pg_dates.txt b/yql/essentials/tests/sql/suites/blocks/input_from_pg_dates.txt new file mode 100644 index 0000000000..3daf47309f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_from_pg_dates.txt @@ -0,0 +1,3 @@ +{"a"="\3.Hr";"b"="?\xFC\x94-\xFA\3218\xC0"}; +{"a"="\xFF\xDA\x97\xA7";"b"="\xFD\x0F|\xC2\x1F\x08\x18\xC0"}; +{"a"="\x7F\xDA\x97\x0C";"b"="\x7F\xFF\xFFHs\xC3\xB8\xC0"}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_from_pg_dates.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_from_pg_dates.txt.attr new file mode 100644 index 0000000000..c7b3104a66 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_from_pg_dates.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["a";["PgType";"date"]]; + ["b";["PgType";"timestamp"]]; + ]]; +}} + diff --git a/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32.txt b/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32.txt new file mode 100644 index 0000000000..6fdbd4f405 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32.txt @@ -0,0 +1,3 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=20u;"subkey"=4u;}; +{"key"=20u;"subkey"=5u;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32.txt.attr new file mode 100644 index 0000000000..3a10c2a1ea --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint32"]]; + ["subkey";["DataType";"Uint32"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32_opt.txt b/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32_opt.txt new file mode 100644 index 0000000000..048b654dc7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32_opt.txt @@ -0,0 +1,5 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=10u;"subkey"=#;}; +{"key"=20u;"subkey"=4u;}; +{"key"=20u;"subkey"=5u;}; +{"key"=20u;"subkey"=#;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32_opt.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32_opt.txt.attr new file mode 100644 index 0000000000..1c249a645e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_hashed_uint32_opt.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint32"]]; + ["subkey";["OptionalType";["DataType";"Uint32"]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_int16.txt b/yql/essentials/tests/sql/suites/blocks/input_int16.txt new file mode 100644 index 0000000000..cdb5f49f97 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int16.txt @@ -0,0 +1,2 @@ +{"key"=10;"subkey"=3;}; +{"key"=20;"subkey"=4;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_int16.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_int16.txt.attr new file mode 100644 index 0000000000..083adc01e3 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int16.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int16"]]; + ["subkey";["DataType";"Int16"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_int32.txt b/yql/essentials/tests/sql/suites/blocks/input_int32.txt new file mode 100644 index 0000000000..cdb5f49f97 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int32.txt @@ -0,0 +1,2 @@ +{"key"=10;"subkey"=3;}; +{"key"=20;"subkey"=4;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_int32.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_int32.txt.attr new file mode 100644 index 0000000000..4776c0c3e1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int32.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int32"]]; + ["subkey";["DataType";"Int32"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_int32_opt.txt b/yql/essentials/tests/sql/suites/blocks/input_int32_opt.txt new file mode 100644 index 0000000000..661b3fc1a9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int32_opt.txt @@ -0,0 +1,5 @@ +{"k1"=1; "k2"=10;}; +{"k1"=2; "k2"=#;}; +{"k1"=3; "k2"=30;}; +{"k1"=4; "k2"=40;}; +{"k1"=5; "k2"=#;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_int32_opt.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_int32_opt.txt.attr new file mode 100644 index 0000000000..3b099f504e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int32_opt.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["k1";["DataType";"Int32"]]; + ["k2";["OptionalType";["DataType";"Int32"]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_int32_string.txt b/yql/essentials/tests/sql/suites/blocks/input_int32_string.txt new file mode 100644 index 0000000000..6af3e964b7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int32_string.txt @@ -0,0 +1,3 @@ +{"key"=10;"subkey"=3;"value"="foo";"value_utf"="тест"}; +{"key"=20;"subkey"=4;"value"="bar";"value_utf"="проверка"}; +{"key"=30;"subkey"=5;"value"="";"value_utf"=""}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_int32_string.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_int32_string.txt.attr new file mode 100644 index 0000000000..52153089c5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int32_string.txt.attr @@ -0,0 +1,8 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int32"]]; + ["subkey";["DataType";"Int32"]]; + ["value";["DataType";"String"]]; + ["value_utf";["DataType";"Utf8"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_int64.txt b/yql/essentials/tests/sql/suites/blocks/input_int64.txt new file mode 100644 index 0000000000..cdb5f49f97 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int64.txt @@ -0,0 +1,2 @@ +{"key"=10;"subkey"=3;}; +{"key"=20;"subkey"=4;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_int64.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_int64.txt.attr new file mode 100644 index 0000000000..763e1cad96 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int64.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int64"]]; + ["subkey";["DataType";"Int64"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_int8.txt b/yql/essentials/tests/sql/suites/blocks/input_int8.txt new file mode 100644 index 0000000000..cdb5f49f97 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int8.txt @@ -0,0 +1,2 @@ +{"key"=10;"subkey"=3;}; +{"key"=20;"subkey"=4;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_int8.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_int8.txt.attr new file mode 100644 index 0000000000..c25d3bbf54 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_int8.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int8"]]; + ["subkey";["DataType";"Int8"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_json_document.txt b/yql/essentials/tests/sql/suites/blocks/input_json_document.txt new file mode 100644 index 0000000000..6d9491ffcf --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_json_document.txt @@ -0,0 +1,9 @@ +{"key"=1;"val"="{\"a\":11,\"b\":1111}";}; +{"key"=2;"val"="{\"a\":22,\"b\":2222}";}; +{"key"=3;"val"="{\"a\":33,\"b\":3333}";}; +{"key"=4;"val"="{\"a\":44,\"b\":4444}";}; +{"key"=5;"val"="{\"a\":55,\"b\":5555}";}; +{"key"=6;"val"="{\"a\":66,\"b\":6666}";}; +{"key"=7;"val"="{\"a\":77,\"b\":7777}";}; +{"key"=8;"val"="{\"a\":88,\"b\":8888}";}; +{"key"=9;"val"="{\"a\":99,\"b\":9999}";}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_json_document.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_json_document.txt.attr new file mode 100644 index 0000000000..d8a67034ac --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_json_document.txt.attr @@ -0,0 +1,9 @@ +{"_yql_row_spec" = { + "Type" = [ + "StructType"; + [ + ["key";["DataType";"Int32"]]; + ["val";["DataType";"JsonDocument"]] + ] + ] +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_nested.txt b/yql/essentials/tests/sql/suites/blocks/input_nested.txt new file mode 100644 index 0000000000..c18db18a76 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_nested.txt @@ -0,0 +1,14 @@ +{"key"=10u;"subkey"=1u;"value"=[1;[1.0]]}; +{"key"=20u;"subkey"=2u;"value"=#}; +{"key"=20u;"subkey"=2u;"value"=[2;[#]]}; +{"key"=20u;"subkey"=2u;"value"=[2;[%nan]]}; +{"key"=20u;"subkey"=2u;"value"=[2;[%inf]]}; +{"key"=10u;"subkey"=1u;"value"=[1;[%-inf]]}; +{"key"=10u;"subkey"=1u;"value"=[1;[%nan]]}; +{"key"=10u;"subkey"=1u;"value"=[1;[%inf]]}; +{"key"=10u;"subkey"=1u;"value"=#}; +{"key"=10u;"subkey"=1u;"value"=[1;[#]]}; +{"key"=10u;"subkey"=1u;"value"=[1;#]}; +{"key"=20u;"subkey"=2u;"value"=[2;[1.0]]}; +{"key"=20u;"subkey"=2u;"value"=[2;#]}; +{"key"=20u;"subkey"=2u;"value"=[2;[%-inf]]}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_nested.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_nested.txt.attr new file mode 100644 index 0000000000..da87d9df75 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_nested.txt.attr @@ -0,0 +1,8 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint32"]]; + ["subkey";["DataType";"Uint32"]]; + ["value";["OptionalType";["TupleType";[["DataType";"Int32"];["OptionalType"; ["OptionalType";["DataType";"Double"]]]]]] + ]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_pg.txt b/yql/essentials/tests/sql/suites/blocks/input_pg.txt new file mode 100644 index 0000000000..7c2a036981 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_pg.txt @@ -0,0 +1,3 @@ +{"a"="023";"b"="bbb";"c"=3;"d"="aaa"}; +{"a"="037";"b"="ddd";"c"=5;"d"="eee"}; + diff --git a/yql/essentials/tests/sql/suites/blocks/input_pg.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_pg.txt.attr new file mode 100644 index 0000000000..2e13cdd656 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_pg.txt.attr @@ -0,0 +1,8 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["a";["PgType";"text"]]; + ["b";["PgType";"cstring"]]; + ["c";["PgType";"int2"]]; + ["d";["DataType";"String"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_pg_arr.txt b/yql/essentials/tests/sql/suites/blocks/input_pg_arr.txt new file mode 100644 index 0000000000..25433188f6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_pg_arr.txt @@ -0,0 +1,4 @@ +{"a"=1;"b"="aaa";"c"="\0\0\0\1\0\0\0\0\0\0\0\x15\0\0\0\2\0\0\0\1\0\0\0\2\0\1\0\0\0\2\0\2"}; +{"a"=1;"b"="ddd";"c"="\0\0\0\1\0\0\0\0\0\0\0\x15\0\0\0\2\0\0\0\1\0\0\0\2\0\1\0\0\0\2\0\3"}; +{"a"=2;"b"="bbb";"c"="\0\0\0\1\0\0\0\0\0\0\0\x15\0\0\0\2\0\0\0\1\0\0\0\2\0\1\0\0\0\2\0\2"}; +{"a"=2;"b"="ccc";"c"="\0\0\0\1\0\0\0\0\0\0\0\x15\0\0\0\2\0\0\0\1\0\0\0\2\0\1\0\0\0\2\0\3"}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_pg_arr.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_pg_arr.txt.attr new file mode 100644 index 0000000000..f3588e8e3c --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_pg_arr.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["a";["PgType";"int2"]]; + ["b";["PgType";"text"]]; + ["c";["PgType";"_int2"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_strings.txt b/yql/essentials/tests/sql/suites/blocks/input_strings.txt new file mode 100644 index 0000000000..b214aab0d9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_strings.txt @@ -0,0 +1,10 @@ +{"key"="023";"subkey"="3";"value"="aaa"}; +{"key"="037";"subkey"="5";"value"="ddd"}; +{"key"="075";"subkey"="1";"value"="abc"}; +{"key"="150";"subkey"="1";"value"="aaa"}; +{"key"="150";"subkey"="3";"value"="iii"}; +{"key"="150";"subkey"="8";"value"="zzz"}; +{"key"="200";"subkey"="7";"value"="qqq"}; +{"key"="527";"subkey"="4";"value"="bbb"}; +{"key"="761";"subkey"="6";"value"="ccc"}; +{"key"="911";"subkey"="2";"value"="kkk"}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_strings.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_strings.txt.attr new file mode 100644 index 0000000000..157b4f5c1f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_strings.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"String"]]; + ["subkey";["DataType";"String"]]; + ["value";["DataType";"String"]] + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_strings_opt.txt b/yql/essentials/tests/sql/suites/blocks/input_strings_opt.txt new file mode 100644 index 0000000000..a8d18ef289 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_strings_opt.txt @@ -0,0 +1,12 @@ +{"key"=#; "s"="4";"s_opt"="e";"utf"="б"}; +{"key"="3";"s"="2";"s_opt"="k";"utf"="й"}; +{"key"=#; "s"="7";"s_opt"="f";"utf"="в"}; +{"key"="1";"s"="5";"s_opt"=#; "utf"="д"}; +{"key"=#; "s"="1";"s_opt"=#; "utf"="а"}; +{"key"="2";"s"="3";"s_opt"="i";"utf"="ё"}; +{"key"="1";"s"="3";"s_opt"="q";"utf"="г"}; +{"key"="2";"s"="7";"s_opt"=#; "utf"="з"}; +{"key"="1";"s"="aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa1";"s_opt"="c";"utf"="е"}; +{"key"="3";"s"="6";"s_opt"="c";"utf"="и"}; +{"key"="2";"s"="8";"s_opt"="z";"utf"="ж"}; +{"key"="3";"s"="2";"s_opt"="k";"utf"="к"}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_strings_opt.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_strings_opt.txt.attr new file mode 100644 index 0000000000..563f941406 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_strings_opt.txt.attr @@ -0,0 +1,8 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["OptionalType"; ["DataType";"String"]]]; + ["s";["DataType";"String"]]; + ["s_opt";["OptionalType"; ["DataType";"String"]]]; + ["utf";["DataType";"Utf8"]] + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_struct.txt b/yql/essentials/tests/sql/suites/blocks/input_struct.txt new file mode 100644 index 0000000000..1c42304946 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_struct.txt @@ -0,0 +1,9 @@ +{"key"=1;"val"={"a"=11;"x"=1111;"o"=111;};}; +{"key"=2;"val"={"a"=22;"x"=2222;"o"=222;};}; +{"key"=3;"val"={"a"=33;"x"=3333;"o"=333;};}; +{"key"=4;"val"={"a"=44;"x"=4444;"o"=#;};}; +{"key"=5;"val"={"a"=55;"x"=5555;"o"=555;};}; +{"key"=6;"val"={"a"=66;"x"=6666;"o"=#;};}; +{"key"=7;"val"={"a"=77;"x"=7777;"o"=#;};}; +{"key"=8;"val"={"a"=88;"x"=8888;"o"=888;};}; +{"key"=9;"val"={"a"=99;"x"=9999;"o"=#;};}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_struct.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_struct.txt.attr new file mode 100644 index 0000000000..a28cc27044 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_struct.txt.attr @@ -0,0 +1,10 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int32"]]; + ["val";["StructType";[ + ["a";["DataType";"Int32"]]; + ["x";["DataType";"Int32"]]; + ["o";["OptionalType";["DataType";"Int32"]]]; + ]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_to_pg_dates.txt b/yql/essentials/tests/sql/suites/blocks/input_to_pg_dates.txt new file mode 100644 index 0000000000..26719a34a6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_to_pg_dates.txt @@ -0,0 +1,2 @@ +{"a"=0u;"b"=0u;"c"=0u;"d"=-2440588;"e"=-210866799477;"f"=-210866799476543211}; +{"a"=49672u;"b"=4291747199u;"c"=4291747199999999u;"d"=53375807;"e"=4611669728523;"f"=4611669728523456789}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_to_pg_dates.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_to_pg_dates.txt.attr new file mode 100644 index 0000000000..28015822b6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_to_pg_dates.txt.attr @@ -0,0 +1,10 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["a";["DataType";"Date"]]; + ["b";["DataType";"Datetime"]]; + ["c";["DataType";"Timestamp"]]; + ["d";["DataType";"Date32"]]; + ["e";["DataType";"Datetime64"]]; + ["f";["DataType";"Timestamp64"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_to_pg_interval.txt b/yql/essentials/tests/sql/suites/blocks/input_to_pg_interval.txt new file mode 100644 index 0000000000..b97e513d27 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_to_pg_interval.txt @@ -0,0 +1,4 @@ +{"a"=0;"b"=0}; +{"a"=4291747199999999;"b"=9223339708799999999}; +{"a"=-4291747199999999;"b"=-9223339708799999999}; + diff --git a/yql/essentials/tests/sql/suites/blocks/input_to_pg_interval.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_to_pg_interval.txt.attr new file mode 100644 index 0000000000..5a665b0202 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_to_pg_interval.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["a";["DataType";"Interval"]]; + ["b";["DataType";"Interval64"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_to_pg_numbers.txt b/yql/essentials/tests/sql/suites/blocks/input_to_pg_numbers.txt new file mode 100644 index 0000000000..9f9c299eed --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_to_pg_numbers.txt @@ -0,0 +1,4 @@ +{"i8"=0;"ui8"=0u;"i16"=0;"ui16"=0u;"i32"=0;"ui32"=0u;"i64"=0;"ui64"=0u;"f4"=0.0;"f8"=0.0}; +{"i8"=-128;"ui8"=0u;"i16"=-32768;"ui16"=0u;"i32"=-2147483648;"ui32"=0u;"i64"=-9223372036854775808;"ui64"=0u;"f4"=%-inf;"f8"=%-inf}; +{"i8"=127;"ui8"=255u;"i16"=32767;"ui16"=65535u;"i32"=2147483647;"ui32"=4294967295u;"i64"=9223372036854775807;"ui64"=18446744073709551615u;"f4"=%inf;"f8"=%inf}; +{"i8"=0;"ui8"=0u;"i16"=0;"ui16"=0u;"i32"=0;"ui32"=0u;"i64"=0;"ui64"=0u;"f4"=%nan;"f8"=%nan};
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/input_to_pg_numbers.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_to_pg_numbers.txt.attr new file mode 100644 index 0000000000..fea8a89ee2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_to_pg_numbers.txt.attr @@ -0,0 +1,15 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["i8";["DataType";"Int8"]]; + ["ui8";["DataType";"Uint8"]]; + ["i16";["DataType";"Int16"]]; + ["ui16";["DataType";"Uint16"]]; + ["i32";["DataType";"Int32"]]; + ["ui32";["DataType";"Uint32"]]; + ["i64";["DataType";"Int64"]]; + ["ui64";["DataType";"Uint64"]]; + ["f4";["DataType";"Float"]]; + ["f8";["DataType";"Double"]]; + ]]; +}} + diff --git a/yql/essentials/tests/sql/suites/blocks/input_to_pg_strings.txt b/yql/essentials/tests/sql/suites/blocks/input_to_pg_strings.txt new file mode 100644 index 0000000000..efaefa3be3 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_to_pg_strings.txt @@ -0,0 +1 @@ +{"s"="foo";"u"="bar";"y"={a=1};"j"="[1,2,3]";"jd"="[4,5,6]";"tzd"=",[\0\1";"tzdt"=":{YB\0\1";tzts="\0\3|\\\xA6\xC3^\x94\0\1";"ud"="xV4\x12\xBC\x9A\xF0\xDE\0224Vx\x90\0224V"};
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/input_to_pg_strings.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_to_pg_strings.txt.attr new file mode 100644 index 0000000000..8c64c6f3cc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_to_pg_strings.txt.attr @@ -0,0 +1,14 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["s";["DataType";"String"]]; + ["u";["DataType";"Utf8"]]; + ["y";["DataType";"Yson"]]; + ["j";["DataType";"Json"]]; + ["jd";["DataType";"JsonDocument"]]; + ["ud";["DataType";"Uuid"]]; + ["tzd";["DataType";"TzDate"]]; + ["tzdt";["DataType";"TzDatetime"]]; + ["tzts";["DataType";"TzTimestamp"]]; + ]]; +}} + diff --git a/yql/essentials/tests/sql/suites/blocks/input_tofrom_pg.txt b/yql/essentials/tests/sql/suites/blocks/input_tofrom_pg.txt new file mode 100644 index 0000000000..e898f381ae --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_tofrom_pg.txt @@ -0,0 +1,2 @@ +{"a"="023";"b"="aaa";"c"="foo";"d"=#;"e"=1;"f"=2;"g"=#}; +{"a"="037";"b"="ddd";"c"="bar";"d"=#;"e"=3;"f"=4;"g"=#};
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/input_tofrom_pg.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_tofrom_pg.txt.attr new file mode 100644 index 0000000000..507d3a002b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_tofrom_pg.txt.attr @@ -0,0 +1,11 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["a";["DataType";"Utf8"]]; + ["b";["PgType";"text"]]; + ["c";["PgType";"cstring"]]; + ["d";["OptionalType";["DataType";"Utf8"]]]; + ["e";["DataType";"Int64"]]; + ["f";["PgType";"int8"]]; + ["g";["OptionalType";["DataType";"Int64"]]]; + ]]; +}}
\ No newline at end of file diff --git a/yql/essentials/tests/sql/suites/blocks/input_top.txt b/yql/essentials/tests/sql/suites/blocks/input_top.txt new file mode 100644 index 0000000000..a9a00994e5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_top.txt @@ -0,0 +1,11 @@ +{"key"=1;"subkey"=4;"value"="a"}; +{"key"=2;"subkey"=5;"value"="b"}; +{"key"=1;"subkey"=3;"value"="c"}; +{"key"=2;"subkey"=2;"value"="d"}; +{"key"=1;"subkey"=3;"value"="e"}; +{"key"=2;"subkey"=4;"value"="f"}; +{"key"=1;"subkey"=5;"value"="g"}; +{"key"=2;"subkey"=6;"value"="h"}; +{"key"=1;"subkey"=1;"value"="i"}; +{"key"=2;"subkey"=5;"value"="j"}; +{"key"=1;"subkey"=3;"value"="k"}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_top.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_top.txt.attr new file mode 100644 index 0000000000..3ddddb86b8 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_top.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Int32"]]; + ["subkey";["DataType";"Int32"]]; + ["value";["DataType";"String"]] + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_tuple.txt b/yql/essentials/tests/sql/suites/blocks/input_tuple.txt new file mode 100644 index 0000000000..f5bd074fd6 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_tuple.txt @@ -0,0 +1,3 @@ +{"key"=10u;"subkey"=3u;"value"=[1;2.3]}; +{"key"=20u;"subkey"=4u;"value"=[3;4.2]}; +{"key"=20u;"subkey"=5u;"value"=[5;6.1]}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_tuple.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_tuple.txt.attr new file mode 100644 index 0000000000..bad356fdd4 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_tuple.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint32"]]; + ["subkey";["DataType";"Uint32"]]; + ["value";["TupleType";[["DataType";"Int32"];["DataType";"Double"]]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint16.txt b/yql/essentials/tests/sql/suites/blocks/input_uint16.txt new file mode 100644 index 0000000000..8d8e86ff3b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint16.txt @@ -0,0 +1,2 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=20u;"subkey"=4u;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint16.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint16.txt.attr new file mode 100644 index 0000000000..99a1ee195f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint16.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint16"]]; + ["subkey";["DataType";"Uint16"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint32.txt b/yql/essentials/tests/sql/suites/blocks/input_uint32.txt new file mode 100644 index 0000000000..8d8e86ff3b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint32.txt @@ -0,0 +1,2 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=20u;"subkey"=4u;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint32.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint32.txt.attr new file mode 100644 index 0000000000..3a10c2a1ea --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint32.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint32"]]; + ["subkey";["DataType";"Uint32"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint32_optbool_bool.txt b/yql/essentials/tests/sql/suites/blocks/input_uint32_optbool_bool.txt new file mode 100644 index 0000000000..0f01d78b2d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint32_optbool_bool.txt @@ -0,0 +1,10 @@ +{"key"=10u;"subkey"=%true;"value"=%false;}; +{"key"=20u;"subkey"=%false;"value"=%true;}; +{"key"=30u;"subkey"=%false;"value"=%false;}; +{"key"=40u;"subkey"=#;"value"=%false;}; +{"key"=50u;"subkey"=%false;"value"=%true;}; +{"key"=60u;"subkey"=#;"value"=%true;}; +{"key"=70u;"subkey"=%true;"value"=%false;}; +{"key"=80u;"subkey"=%false;"value"=%true;}; +{"key"=90u;"subkey"=%false;"value"=%false;}; +{"key"=99u;"subkey"=%true;"value"=%true;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint32_optbool_bool.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint32_optbool_bool.txt.attr new file mode 100644 index 0000000000..f0670909b7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint32_optbool_bool.txt.attr @@ -0,0 +1,7 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint32"]]; + ["subkey";["OptionalType"; ["DataType";"Bool"]]]; + ["value";["DataType";"Bool"]] + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64.txt b/yql/essentials/tests/sql/suites/blocks/input_uint64.txt new file mode 100644 index 0000000000..8d8e86ff3b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64.txt @@ -0,0 +1,2 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=20u;"subkey"=4u;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint64.txt.attr new file mode 100644 index 0000000000..7240806897 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint64"]]; + ["subkey";["DataType";"Uint64"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_filter.txt b/yql/essentials/tests/sql/suites/blocks/input_uint64_filter.txt new file mode 100644 index 0000000000..4fb87dfa6c --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_filter.txt @@ -0,0 +1,3 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=20u;"subkey"=4u;}; +{"key"=30u;"subkey"=5u;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_filter.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint64_filter.txt.attr new file mode 100644 index 0000000000..7240806897 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_filter.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint64"]]; + ["subkey";["DataType";"Uint64"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_filter_opt.txt b/yql/essentials/tests/sql/suites/blocks/input_uint64_filter_opt.txt new file mode 100644 index 0000000000..67e9ac3f66 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_filter_opt.txt @@ -0,0 +1,5 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=20u;"subkey"=4u;}; +{"key"=30u;"subkey"=5u;}; +{"key"=#;"subkey"=6u;}; +{"key"=#;"subkey"=5u;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_filter_opt.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint64_filter_opt.txt.attr new file mode 100644 index 0000000000..6107e21eaa --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_filter_opt.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["OptionalType";["DataType";"Uint64"]]]; + ["subkey";["DataType";"Uint64"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_nested_opt.txt b/yql/essentials/tests/sql/suites/blocks/input_uint64_nested_opt.txt new file mode 100644 index 0000000000..86ae4ac337 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_nested_opt.txt @@ -0,0 +1,3 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=20u;"subkey"=#;}; +{"key"=30u;"subkey"=[];}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_nested_opt.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint64_nested_opt.txt.attr new file mode 100644 index 0000000000..3633a48f45 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_nested_opt.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint64"]]; + ["subkey";["OptionalType";["OptionalType";["DataType";"Uint64"]]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_opt.txt b/yql/essentials/tests/sql/suites/blocks/input_uint64_opt.txt new file mode 100644 index 0000000000..5301366c85 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_opt.txt @@ -0,0 +1,3 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=20u;"subkey"=4u;}; +{"key"=#;"subkey"=5u;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_opt.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint64_opt.txt.attr new file mode 100644 index 0000000000..6107e21eaa --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_opt.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["OptionalType";["DataType";"Uint64"]]]; + ["subkey";["DataType";"Uint64"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_opt2.txt b/yql/essentials/tests/sql/suites/blocks/input_uint64_opt2.txt new file mode 100644 index 0000000000..007ce6345f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_opt2.txt @@ -0,0 +1,5 @@ +{"key"=10u;"subkey"=1u;}; +{"key"=20u;"subkey"=2u;}; +{"key"=#;"subkey"=3u;}; +{"key"=40u;"subkey"=#;}; +{"key"=#;"subkey"=#;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint64_opt2.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint64_opt2.txt.attr new file mode 100644 index 0000000000..738708acf1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint64_opt2.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["OptionalType";["DataType";"Uint64"]]]; + ["subkey";["OptionalType";["DataType";"Uint64"]]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint8.txt b/yql/essentials/tests/sql/suites/blocks/input_uint8.txt new file mode 100644 index 0000000000..8d8e86ff3b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint8.txt @@ -0,0 +1,2 @@ +{"key"=10u;"subkey"=3u;}; +{"key"=20u;"subkey"=4u;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint8.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint8.txt.attr new file mode 100644 index 0000000000..619dbdd1bf --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint8.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint8"]]; + ["subkey";["DataType";"Uint8"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint8_big.txt b/yql/essentials/tests/sql/suites/blocks/input_uint8_big.txt new file mode 100644 index 0000000000..9a504890eb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint8_big.txt @@ -0,0 +1,2 @@ +{"key"=100u;"subkey"=3u;}; +{"key"=200u;"subkey"=4u;}; diff --git a/yql/essentials/tests/sql/suites/blocks/input_uint8_big.txt.attr b/yql/essentials/tests/sql/suites/blocks/input_uint8_big.txt.attr new file mode 100644 index 0000000000..619dbdd1bf --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/input_uint8_big.txt.attr @@ -0,0 +1,6 @@ +{"_yql_row_spec"={ + "Type"=["StructType";[ + ["key";["DataType";"Uint8"]]; + ["subkey";["DataType";"Uint8"]]; + ]]; +}} diff --git a/yql/essentials/tests/sql/suites/blocks/interval_add_date.cfg b/yql/essentials/tests/sql/suites/blocks/interval_add_date.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_add_date.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_add_date.sql b/yql/essentials/tests/sql/suites/blocks/interval_add_date.sql new file mode 100644 index 0000000000..bb395b7f75 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_add_date.sql @@ -0,0 +1,31 @@ +USE plato; + +SELECT + b.ni + a.na, + b.wi + a.na, + b.ni + a.naz, + b.wi + a.naz, + b.ni + a.nd, + b.wi + a.nd, + b.ni + a.ndz, + b.wi + a.ndz, + b.ni + a.nt, + b.wi + a.nt, + b.ni + a.ntz, + b.wi + a.ntz, + + b.ni + a.wa, + b.wi + a.wa, + b.ni + a.waz, + b.wi + a.waz, + b.ni + a.wd, + b.wi + a.wd, + b.ni + a.wdz, + b.wi + a.wdz, + b.ni + a.wt, + b.wi + a.wt, + b.ni + a.wtz, + b.wi + a.wtz +FROM Dates as a CROSS JOIN Dates as b + + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_add_date_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/interval_add_date_scalar.cfg new file mode 100644 index 0000000000..8d2d2a19fc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_add_date_scalar.cfg @@ -0,0 +1 @@ +in Dates dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/interval_add_date_scalar.sql b/yql/essentials/tests/sql/suites/blocks/interval_add_date_scalar.sql new file mode 100644 index 0000000000..1cc7f48940 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_add_date_scalar.sql @@ -0,0 +1,57 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin,FuseMultiOutsWithOuterMaps"; + +SELECT + ni + Date("2000-01-01") , + wi + Date("2000-01-01"), + ni + TzDate("2000-01-01,Europe/Moscow"), + wi + TzDate("2000-01-01,Europe/Moscow"), + ni + Datetime("2000-01-01T03:04:05Z"), + wi + Datetime("2000-01-01T03:04:05Z"), + ni + TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + wi + TzDatetime("2000-01-01T03:04:05,Europe/Moscow"), + ni + Timestamp("2000-01-01T03:04:05.678912Z"), + wi + Timestamp("2000-01-01T03:04:05.678912Z"), + ni + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + wi + TzTimestamp("2000-01-01T03:04:05.678912,Europe/Moscow"), + ni + Date32("1900-01-01"), + wi + Date32("1900-01-01"), + ni + Datetime64("1900-01-01T03:04:05Z"), + wi + Datetime64("1900-01-01T03:04:05Z"), + ni + Timestamp64("1900-01-01T03:04:05.678912Z"), + wi + Timestamp64("1900-01-01T03:04:05.678912Z"), + ni + TzDate32("1900-01-01,Europe/Moscow"), + wi + TzDate32("1900-01-01,Europe/Moscow"), + ni + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + wi + TzDatetime64("1900-01-01T03:04:05,Europe/Moscow"), + ni + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), + wi + TzTimestamp64("1900-01-01T03:04:05.678912,Europe/Moscow"), +FROM Dates; + +SELECT + Interval("P1D") + na, + Interval64("P1D") + na, + Interval("P1D") + naz, + Interval64("P1D") + naz, + Interval("P1D") + nd, + Interval64("P1D") + nd, + Interval("P1D") + ndz, + Interval64("P1D") + ndz, + Interval("P1D") + nt, + Interval64("P1D") + nt, + Interval("P1D") + ntz, + Interval64("P1D") + ntz, + Interval("P1D") + wa, + Interval64("P1D") + wa, + Interval("P1D") + wd, + Interval64("P1D") + wd, + Interval("P1D") + wt, + Interval64("P1D") + wt, + Interval("P1D") + waz, + Interval64("P1D") + waz, + Interval("P1D") + wdz, + Interval64("P1D") + wdz, + Interval("P1D") + wtz, + Interval64("P1D") + wtz +FROM Dates; + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_add_interval.cfg b/yql/essentials/tests/sql/suites/blocks/interval_add_interval.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_add_interval.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_add_interval.sql b/yql/essentials/tests/sql/suites/blocks/interval_add_interval.sql new file mode 100644 index 0000000000..e1e84d209a --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_add_interval.sql @@ -0,0 +1,10 @@ +USE plato; + +SELECT + a.ni + b.ni, + a.ni + b.wi, + a.wi + b.ni, + a.wi + b.wi +FROM Dates AS a CROSS JOIN Dates as b + + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_add_interval_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/interval_add_interval_scalar.cfg new file mode 100644 index 0000000000..8d2d2a19fc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_add_interval_scalar.cfg @@ -0,0 +1 @@ +in Dates dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/interval_add_interval_scalar.sql b/yql/essentials/tests/sql/suites/blocks/interval_add_interval_scalar.sql new file mode 100644 index 0000000000..df0d35160c --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_add_interval_scalar.sql @@ -0,0 +1,16 @@ +USE plato; + +SELECT + ni + Interval("P1D"), + wi + Interval("P1D"), + ni + Interval64("P1D"), + wi + Interval64("P1D") +FROM Dates; + +SELECT + Interval("P1D") + ni, + Interval("P1D") + wi, + Interval64("P1D") + ni, + Interval64("P1D") + wi +FROM Dates; + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_div.cfg b/yql/essentials/tests/sql/suites/blocks/interval_div.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_div.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_div.sql b/yql/essentials/tests/sql/suites/blocks/interval_div.sql new file mode 100644 index 0000000000..acbb470663 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_div.sql @@ -0,0 +1,22 @@ +USE plato; + +SELECT + a.ni / b.i8, + a.wi / b.i8, + a.ni / b.u8, + a.wi / b.u8, + a.ni / b.i16, + a.wi / b.i16, + a.ni / b.u16, + a.wi / b.u16, + a.ni / b.i32, + a.wi / b.i32, + a.ni / b.u32, + a.wi / b.u32, + a.ni / b.i64, + a.wi / b.i64, + a.ni / b.u64, + a.wi / b.u64, +FROM Dates as a CROSS JOIN Dates as b; + + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_div_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/interval_div_scalar.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_div_scalar.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_div_scalar.sql b/yql/essentials/tests/sql/suites/blocks/interval_div_scalar.sql new file mode 100644 index 0000000000..2c9dbb8cb9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_div_scalar.sql @@ -0,0 +1,41 @@ +USE plato; + +SELECT + ni / Int8("10"), + wi / Int8("10"), + ni / Uint8("11"), + wi / Uint8("11"), + ni / Int16("12"), + wi / Int16("12"), + ni / Uint16("13"), + wi / Uint16("13"), + ni / Int32("14"), + wi / Int32("14"), + ni / Uint32("15"), + wi / Uint32("15"), + ni / Int64("16"), + wi / Int64("16"), + ni / Uint64("17"), + wi / Uint64("17"), +FROM Dates; + +SELECT + Interval("P1D") / i8, + Interval64("P1D") / i8, + Interval("P1D") / u8, + Interval64("P1D") / u8, + Interval("P1D") / i16, + Interval64("P1D") / i16, + Interval("P1D") / u16, + Interval64("P1D") / u16, + Interval("P1D") / i32, + Interval64("P1D") / i32, + Interval("P1D") / u32, + Interval64("P1D") / u32, + Interval("P1D") / i64, + Interval64("P1D") / i64, + Interval("P1D") / u64, + Interval64("P1D") / u64 +FROM Dates; + + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_mul.cfg b/yql/essentials/tests/sql/suites/blocks/interval_mul.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_mul.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_mul.sql b/yql/essentials/tests/sql/suites/blocks/interval_mul.sql new file mode 100644 index 0000000000..bd5727a48e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_mul.sql @@ -0,0 +1,40 @@ +USE plato; + +SELECT + a.ni * b.i8, + a.wi * b.i8, + a.ni * b.u8, + a.wi * b.u8, + a.ni * b.i16, + a.wi * b.i16, + a.ni * b.u16, + a.wi * b.u16, + a.ni * b.i32, + a.wi * b.i32, + a.ni * b.u32, + a.wi * b.u32, + a.ni * b.i64, + a.wi * b.i64, + a.ni * b.u64, + a.wi * b.u64, +FROM Dates as a CROSS JOIN Dates as b; + +SELECT + b.i8 * a.ni, + b.i8 * a.wi, + b.u8 * a.ni, + b.u8 * a.wi, + b.i16 * a.ni, + b.i16 * a.wi, + b.u16 * a.ni, + b.u16 * a.wi, + b.i32 * a.ni, + b.i32 * a.wi, + b.u32 * a.ni, + b.u32 * a.wi, + b.i64 * a.ni, + b.i64 * a.wi, + b.u64 * a.ni, + b.u64 * a.wi, +FROM Dates as a CROSS JOIN Dates as b; + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_mul_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/interval_mul_scalar.cfg new file mode 100644 index 0000000000..d0a66cb111 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_mul_scalar.cfg @@ -0,0 +1,2 @@ +in Dates dates.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_mul_scalar.sql b/yql/essentials/tests/sql/suites/blocks/interval_mul_scalar.sql new file mode 100644 index 0000000000..6fc2e88ad3 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_mul_scalar.sql @@ -0,0 +1,79 @@ +USE plato; + +SELECT + ni * Int8("10"), + wi * Int8("10"), + ni * Uint8("11"), + wi * Uint8("11"), + ni * Int16("12"), + wi * Int16("12"), + ni * Uint16("13"), + wi * Uint16("13"), + ni * Int32("14"), + wi * Int32("14"), + ni * Uint32("15"), + wi * Uint32("15"), + ni * Int64("16"), + wi * Int64("16"), + ni * Uint64("17"), + wi * Uint64("17"), +FROM Dates; + +SELECT + Int8("10") * ni, + Int8("10") * wi, + Uint8("11") * ni, + Uint8("11") * wi, + Int16("12") * ni, + Int16("12") * wi, + Uint16("13") * ni, + Uint16("13") * wi, + Int32("14") * ni, + Int32("14") * wi, + Uint32("15") * ni, + Uint32("15") * wi, + Int64("16") * ni, + Int64("16") * wi, + Uint64("17") * ni, + Uint64("17") * wi +FROM Dates; + +SELECT + Interval("P1D") * i8, + Interval64("P1D") * i8, + Interval("P1D") * u8, + Interval64("P1D") * u8, + Interval("P1D") * i16, + Interval64("P1D") * i16, + Interval("P1D") * u16, + Interval64("P1D") * u16, + Interval("P1D") * i32, + Interval64("P1D") * i32, + Interval("P1D") * u32, + Interval64("P1D") * u32, + Interval("P1D") * i64, + Interval64("P1D") * i64, + Interval("P1D") * u64, + Interval64("P1D") * u64 +FROM Dates; + +SELECT + i8 * Interval("P1D"), + i8 * Interval64("P1D"), + u8 * Interval("P1D"), + u8 * Interval64("P1D"), + i16 * Interval("P1D"), + i16 * Interval64("P1D"), + u16 * Interval("P1D"), + u16 * Interval64("P1D"), + i32 * Interval("P1D"), + i32 * Interval64("P1D"), + u32 * Interval("P1D"), + u32 * Interval64("P1D"), + i64 * Interval("P1D"), + i64 * Interval64("P1D"), + u64 * Interval("P1D"), + u64 * Interval64("P1D") +FROM Dates; + + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_sub_interval.cfg b/yql/essentials/tests/sql/suites/blocks/interval_sub_interval.cfg new file mode 100644 index 0000000000..8d2d2a19fc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_sub_interval.cfg @@ -0,0 +1 @@ +in Dates dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/interval_sub_interval.sql b/yql/essentials/tests/sql/suites/blocks/interval_sub_interval.sql new file mode 100644 index 0000000000..eaf0809d0b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_sub_interval.sql @@ -0,0 +1,9 @@ +USE plato; + +SELECT + a.ni - b.ni, + a.ni - b.wi, + a.wi - b.ni, + a.wi - b.wi +FROM Dates as a CROSS JOIN Dates as b + diff --git a/yql/essentials/tests/sql/suites/blocks/interval_sub_interval_scalar.cfg b/yql/essentials/tests/sql/suites/blocks/interval_sub_interval_scalar.cfg new file mode 100644 index 0000000000..8d2d2a19fc --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_sub_interval_scalar.cfg @@ -0,0 +1 @@ +in Dates dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/interval_sub_interval_scalar.sql b/yql/essentials/tests/sql/suites/blocks/interval_sub_interval_scalar.sql new file mode 100644 index 0000000000..4339da03f9 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/interval_sub_interval_scalar.sql @@ -0,0 +1,16 @@ +USE plato; + +SELECT + ni - Interval("P1D"), + wi - Interval("P1D"), + ni - Interval64("P1D"), + wi - Interval64("P1D") +FROM Dates; + +SELECT + Interval("P1D") - ni, + Interval("P1D") - wi, + Interval64("P1D") - ni, + Interval64("P1D") - wi +FROM Dates; + diff --git a/yql/essentials/tests/sql/suites/blocks/json_document_type.cfg b/yql/essentials/tests/sql/suites/blocks/json_document_type.cfg new file mode 100644 index 0000000000..8e18b34b94 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/json_document_type.cfg @@ -0,0 +1 @@ +in Input input_json_document.txt diff --git a/yql/essentials/tests/sql/suites/blocks/json_document_type.sql b/yql/essentials/tests/sql/suites/blocks/json_document_type.sql new file mode 100644 index 0000000000..942f54bf80 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/json_document_type.sql @@ -0,0 +1,8 @@ +USE plato; + +SELECT + key, + SOME(val) as someVal, +FROM Input +GROUP BY key +ORDER BY key diff --git a/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_basic.cfg b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_basic.cfg new file mode 100644 index 0000000000..34475912cb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_basic.cfg @@ -0,0 +1,2 @@ +in Input input_strings.txt +udf string_udf diff --git a/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_basic.sql b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_basic.sql new file mode 100644 index 0000000000..81a521ab93 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_basic.sql @@ -0,0 +1,17 @@ +USE plato; + +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin"; + + +$ns_tolower = ($x) -> (AssumeNonStrict(String::AsciiToLower($x))); +$ns_toupper = ($x) -> (AssumeNonStrict(String::AsciiToUpper($x))); + +-- full block +select * from Input where $ns_tolower(value) > "aaa" and subkey == "1"; + +-- partial block due to lazy non-strict node +select * from Input where subkey == "2" and $ns_toupper(value) <= "ZZZ"; + +-- full block - same non strict is used in first arg of AND +select * from Input where $ns_toupper(value) >= "AAA" and $ns_toupper(value) <= "ZZZ" and subkey == "3"; + diff --git a/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_nested.cfg b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_nested.cfg new file mode 100644 index 0000000000..34475912cb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_nested.cfg @@ -0,0 +1,2 @@ +in Input input_strings.txt +udf string_udf diff --git a/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_nested.sql b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_nested.sql new file mode 100644 index 0000000000..2ae846ae4c --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_nested.sql @@ -0,0 +1,4 @@ +USE plato; + +-- partial blocks due to non strict in second arg of AND +select if(value > "aaa" and String::AsciiToLower(AssumeNonStrict(subkey)) > "3", "foo", "bar"), value, subkey from Input; diff --git a/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_with_scalar_ctx.cfg b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_with_scalar_ctx.cfg new file mode 100644 index 0000000000..b65712414d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_with_scalar_ctx.cfg @@ -0,0 +1 @@ +in Input input_strings.txt diff --git a/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_with_scalar_ctx.sql b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_with_scalar_ctx.sql new file mode 100644 index 0000000000..647de993e7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/lazy_nonstrict_with_scalar_ctx.sql @@ -0,0 +1,10 @@ +USE plato; + +$one = select min(AssumeNonStrict(value)) from Input; +$two = select AssumeNonStrict(min(value)) from Input; + +-- fully converted to blocks - scalar context is assumed strict +select * from Input where subkey != "1" and value > $one; + +-- partially converted to blocks - AssumeStrict is calculated outside of scalar context +select * from Input where subkey != "2" and value > $two; diff --git a/yql/essentials/tests/sql/suites/blocks/member.cfg b/yql/essentials/tests/sql/suites/blocks/member.cfg new file mode 100644 index 0000000000..ed506aaf28 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/member.cfg @@ -0,0 +1 @@ +in Input input_struct.txt diff --git a/yql/essentials/tests/sql/suites/blocks/member.sql b/yql/essentials/tests/sql/suites/blocks/member.sql new file mode 100644 index 0000000000..199d5c17bd --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/member.sql @@ -0,0 +1,10 @@ +USE plato; + +SELECT + val.a as a, + <|qq:key,qkrq:"QKRQ"|> as q, + /* XXX: <AddMember> callable always expands to <AsStruct>. */ + AddMember(val, "k", key) as wik, + /* XXX: <RemoveMember> callable always expands to <AsStruct>. */ + RemoveMember(val, "x") as wox, +FROM Input; diff --git a/yql/essentials/tests/sql/suites/blocks/minmax_strings.cfg b/yql/essentials/tests/sql/suites/blocks/minmax_strings.cfg new file mode 100644 index 0000000000..476f4bfed1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/minmax_strings.cfg @@ -0,0 +1 @@ +in Input input_strings_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/minmax_strings.sql b/yql/essentials/tests/sql/suites/blocks/minmax_strings.sql new file mode 100644 index 0000000000..776834e93a --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/minmax_strings.sql @@ -0,0 +1,21 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +select + key, + + max(s) as maxs, + min(s) as mins, + min(s_opt) as mins_opt, + max(s_opt) as maxs_opt, + + max(distinct utf) as dmaxs, + min(distinct utf) as dmins, + min(distinct s_opt) as dmins_opt, + max(distinct s_opt) as dmaxs_opt, + +from Input +group by key +order by key; + diff --git a/yql/essentials/tests/sql/suites/blocks/minmax_strings_filter.cfg b/yql/essentials/tests/sql/suites/blocks/minmax_strings_filter.cfg new file mode 100644 index 0000000000..476f4bfed1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/minmax_strings_filter.cfg @@ -0,0 +1 @@ +in Input input_strings_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/minmax_strings_filter.sql b/yql/essentials/tests/sql/suites/blocks/minmax_strings_filter.sql new file mode 100644 index 0000000000..3fe3c7b524 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/minmax_strings_filter.sql @@ -0,0 +1,17 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +select + key, + + max(s) as maxs, + min(s) as mins, + min(s_opt) as mins_opt, + max(s_opt) as maxs_opt, + +from Input +where key != "1" and s not in ("7", "8") +group by key +order by key; + diff --git a/yql/essentials/tests/sql/suites/blocks/minmax_tuple.cfg b/yql/essentials/tests/sql/suites/blocks/minmax_tuple.cfg new file mode 100644 index 0000000000..b65712414d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/minmax_tuple.cfg @@ -0,0 +1 @@ +in Input input_strings.txt diff --git a/yql/essentials/tests/sql/suites/blocks/minmax_tuple.sql b/yql/essentials/tests/sql/suites/blocks/minmax_tuple.sql new file mode 100644 index 0000000000..a785e7c958 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/minmax_tuple.sql @@ -0,0 +1,16 @@ +pragma yt.UsePartitionsByKeysForFinalAgg="false"; + +USE plato; + +select + key, + min(AsTuple(subkey, value)) as min, + max(AsTuple(subkey, value)) as max, +from Input +group by key +order by key; + +select + min(AsTuple(subkey, value)) as min, + max(AsTuple(subkey, value)) as max, +from Input; diff --git a/yql/essentials/tests/sql/suites/blocks/mod_uint64.cfg b/yql/essentials/tests/sql/suites/blocks/mod_uint64.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/mod_uint64.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/mod_uint64.sql b/yql/essentials/tests/sql/suites/blocks/mod_uint64.sql new file mode 100644 index 0000000000..9de44e5756 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/mod_uint64.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key%subkey,999ul%key,subkey%0ul +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/mod_uint64_opt2.cfg b/yql/essentials/tests/sql/suites/blocks/mod_uint64_opt2.cfg new file mode 100644 index 0000000000..46fee85c7f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/mod_uint64_opt2.cfg @@ -0,0 +1 @@ +in Input input_uint64_opt2.txt diff --git a/yql/essentials/tests/sql/suites/blocks/mod_uint64_opt2.sql b/yql/essentials/tests/sql/suites/blocks/mod_uint64_opt2.sql new file mode 100644 index 0000000000..9de44e5756 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/mod_uint64_opt2.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key%subkey,999ul%key,subkey%0ul +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/mul_uint64_opt2.cfg b/yql/essentials/tests/sql/suites/blocks/mul_uint64_opt2.cfg new file mode 100644 index 0000000000..46fee85c7f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/mul_uint64_opt2.cfg @@ -0,0 +1 @@ +in Input input_uint64_opt2.txt diff --git a/yql/essentials/tests/sql/suites/blocks/mul_uint64_opt2.sql b/yql/essentials/tests/sql/suites/blocks/mul_uint64_opt2.sql new file mode 100644 index 0000000000..52cda1db0d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/mul_uint64_opt2.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key*subkey,1000ul*key,subkey*1ul +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/nested_optionals.cfg b/yql/essentials/tests/sql/suites/blocks/nested_optionals.cfg new file mode 100644 index 0000000000..c0f7c37ee1 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/nested_optionals.cfg @@ -0,0 +1 @@ +in Input input_uint64_nested_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/nested_optionals.sql b/yql/essentials/tests/sql/suites/blocks/nested_optionals.sql new file mode 100644 index 0000000000..f14105be2e --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/nested_optionals.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+1u,subkey +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/not.cfg b/yql/essentials/tests/sql/suites/blocks/not.cfg new file mode 100644 index 0000000000..e4a99991a0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/not.cfg @@ -0,0 +1 @@ +in Input input_bool.txt diff --git a/yql/essentials/tests/sql/suites/blocks/not.sql b/yql/essentials/tests/sql/suites/blocks/not.sql new file mode 100644 index 0000000000..6b7883d03d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/not.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key,subkey,not key +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/not_opt.cfg b/yql/essentials/tests/sql/suites/blocks/not_opt.cfg new file mode 100644 index 0000000000..a159493a2b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/not_opt.cfg @@ -0,0 +1 @@ +in Input input_bool_opt.txt diff --git a/yql/essentials/tests/sql/suites/blocks/not_opt.sql b/yql/essentials/tests/sql/suites/blocks/not_opt.sql new file mode 100644 index 0000000000..6b7883d03d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/not_opt.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key,subkey,not key +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/partial_blocks1.cfg b/yql/essentials/tests/sql/suites/blocks/partial_blocks1.cfg new file mode 100644 index 0000000000..5ee9471fc0 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/partial_blocks1.cfg @@ -0,0 +1 @@ +in Input input_uint64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/partial_blocks1.sql b/yql/essentials/tests/sql/suites/blocks/partial_blocks1.sql new file mode 100644 index 0000000000..98b1bbd00d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/partial_blocks1.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + 2*(key+subkey),1ul+key+key+key,subkey+2ul,key +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/pg.cfg b/yql/essentials/tests/sql/suites/blocks/pg.cfg new file mode 100644 index 0000000000..72b51dc777 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg.cfg @@ -0,0 +1 @@ +in Input input_pg.txt diff --git a/yql/essentials/tests/sql/suites/blocks/pg.sql b/yql/essentials/tests/sql/suites/blocks/pg.sql new file mode 100644 index 0000000000..050d81b633 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg.sql @@ -0,0 +1,9 @@ +USE plato; + +SELECT + a, + b, + c, + d, + len(d) +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/pg_call.cfg b/yql/essentials/tests/sql/suites/blocks/pg_call.cfg new file mode 100644 index 0000000000..72b51dc777 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_call.cfg @@ -0,0 +1 @@ +in Input input_pg.txt diff --git a/yql/essentials/tests/sql/suites/blocks/pg_call.sql b/yql/essentials/tests/sql/suites/blocks/pg_call.sql new file mode 100644 index 0000000000..cb5def9f51 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_call.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + a || a, a || 'x'p, c + c, c * 10p, Pg::upper(a), Pg::concat(a,99) +FROM Input + diff --git a/yql/essentials/tests/sql/suites/blocks/pg_from_dates.cfg b/yql/essentials/tests/sql/suites/blocks/pg_from_dates.cfg new file mode 100644 index 0000000000..76186af27f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_from_dates.cfg @@ -0,0 +1 @@ +in Input input_from_pg_dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/pg_from_dates.sql b/yql/essentials/tests/sql/suites/blocks/pg_from_dates.sql new file mode 100644 index 0000000000..d8fe47bd32 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_from_dates.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + FromPg(a), FromPg(b) +FROM Input + diff --git a/yql/essentials/tests/sql/suites/blocks/pg_sort.cfg b/yql/essentials/tests/sql/suites/blocks/pg_sort.cfg new file mode 100644 index 0000000000..5356944180 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_sort.cfg @@ -0,0 +1 @@ +in Input input_pg_arr.txt diff --git a/yql/essentials/tests/sql/suites/blocks/pg_sort.sql b/yql/essentials/tests/sql/suites/blocks/pg_sort.sql new file mode 100644 index 0000000000..8d5fcffce2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_sort.sql @@ -0,0 +1,5 @@ +USE plato; +SELECT + * +FROM Input +ORDER BY a,b desc,c desc diff --git a/yql/essentials/tests/sql/suites/blocks/pg_to_dates.cfg b/yql/essentials/tests/sql/suites/blocks/pg_to_dates.cfg new file mode 100644 index 0000000000..e0f8a9c251 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_to_dates.cfg @@ -0,0 +1 @@ +in Input input_to_pg_dates.txt diff --git a/yql/essentials/tests/sql/suites/blocks/pg_to_dates.sql b/yql/essentials/tests/sql/suites/blocks/pg_to_dates.sql new file mode 100644 index 0000000000..95dcb9db02 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_to_dates.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + ToPg(a), ToPg(b), ToPg(c), ToPg(d), ToPg(e), ToPg(f) +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/pg_to_interval.cfg b/yql/essentials/tests/sql/suites/blocks/pg_to_interval.cfg new file mode 100644 index 0000000000..9280de6a86 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_to_interval.cfg @@ -0,0 +1 @@ +in Input input_to_pg_interval.txt diff --git a/yql/essentials/tests/sql/suites/blocks/pg_to_interval.sql b/yql/essentials/tests/sql/suites/blocks/pg_to_interval.sql new file mode 100644 index 0000000000..094f64ae04 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_to_interval.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + ToPg(a), ToPg(b) +FROM Input + diff --git a/yql/essentials/tests/sql/suites/blocks/pg_to_numbers.cfg b/yql/essentials/tests/sql/suites/blocks/pg_to_numbers.cfg new file mode 100644 index 0000000000..5d629ee015 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_to_numbers.cfg @@ -0,0 +1,2 @@ +in Input input_to_pg_numbers.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/pg_to_numbers.sql b/yql/essentials/tests/sql/suites/blocks/pg_to_numbers.sql new file mode 100644 index 0000000000..b220cc3050 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_to_numbers.sql @@ -0,0 +1,10 @@ +USE plato; + +SELECT + ToPg(i8), ToPg(ui8), + ToPg(i16), ToPg(ui16), + ToPg(i32), ToPg(ui32), + ToPg(i64), ToPg(ui64), + ToPg(f4), ToPg(f8) +FROM Input + diff --git a/yql/essentials/tests/sql/suites/blocks/pg_to_strings.cfg b/yql/essentials/tests/sql/suites/blocks/pg_to_strings.cfg new file mode 100644 index 0000000000..1b143d34c4 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_to_strings.cfg @@ -0,0 +1,2 @@ +in Input input_to_pg_strings.txt + diff --git a/yql/essentials/tests/sql/suites/blocks/pg_to_strings.sql b/yql/essentials/tests/sql/suites/blocks/pg_to_strings.sql new file mode 100644 index 0000000000..e1c3ad8b3d --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_to_strings.sql @@ -0,0 +1,15 @@ +USE plato; +pragma yt.DisableOptimizers="OutHorizontalJoin,HorizontalJoin,MultiHorizontalJoin"; + +SELECT + ToPg(s), ToPg(u), + ToPg(y), ToPg(j), + ToPg(jd) +FROM Input; + + +SELECT + ToPg(tzd), + ToPg(tzdt), ToPg(tzts), + ToPg(ud) +FROM Input; diff --git a/yql/essentials/tests/sql/suites/blocks/pg_tofrom.cfg b/yql/essentials/tests/sql/suites/blocks/pg_tofrom.cfg new file mode 100644 index 0000000000..eebfc3c8df --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_tofrom.cfg @@ -0,0 +1 @@ +in Input input_tofrom_pg.txt diff --git a/yql/essentials/tests/sql/suites/blocks/pg_tofrom.sql b/yql/essentials/tests/sql/suites/blocks/pg_tofrom.sql new file mode 100644 index 0000000000..0b6724ffa7 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_tofrom.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + ToPg(a), FromPg(b), FromPg(c), ToPg(d), ToPg(e), FromPg(f), ToPg(g) +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/pg_top_sort.cfg b/yql/essentials/tests/sql/suites/blocks/pg_top_sort.cfg new file mode 100644 index 0000000000..5356944180 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_top_sort.cfg @@ -0,0 +1 @@ +in Input input_pg_arr.txt diff --git a/yql/essentials/tests/sql/suites/blocks/pg_top_sort.sql b/yql/essentials/tests/sql/suites/blocks/pg_top_sort.sql new file mode 100644 index 0000000000..0eabce49df --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/pg_top_sort.sql @@ -0,0 +1,5 @@ +USE plato; +SELECT + * +FROM Input +ORDER BY a,b desc,c desc LIMIT 3 diff --git a/yql/essentials/tests/sql/suites/blocks/sort_one_asc.cfg b/yql/essentials/tests/sql/suites/blocks/sort_one_asc.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_one_asc.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/sort_one_asc.sql b/yql/essentials/tests/sql/suites/blocks/sort_one_asc.sql new file mode 100644 index 0000000000..311e4b871b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_one_asc.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + subkey+0 as subkey1, value +FROM Input +ORDER BY subkey1, value; diff --git a/yql/essentials/tests/sql/suites/blocks/sort_one_desc.cfg b/yql/essentials/tests/sql/suites/blocks/sort_one_desc.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_one_desc.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/sort_one_desc.sql b/yql/essentials/tests/sql/suites/blocks/sort_one_desc.sql new file mode 100644 index 0000000000..154842bc63 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_one_desc.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + subkey+0 as subkey1, value +FROM Input +ORDER BY subkey1, value desc; diff --git a/yql/essentials/tests/sql/suites/blocks/sort_two_asc.cfg b/yql/essentials/tests/sql/suites/blocks/sort_two_asc.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_two_asc.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/sort_two_asc.sql b/yql/essentials/tests/sql/suites/blocks/sort_two_asc.sql new file mode 100644 index 0000000000..a379cc27bf --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_two_asc.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + key, subkey+0 as subkey1, value +FROM Input +ORDER BY key, subkey1, value; diff --git a/yql/essentials/tests/sql/suites/blocks/sort_two_desc.cfg b/yql/essentials/tests/sql/suites/blocks/sort_two_desc.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_two_desc.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/sort_two_desc.sql b/yql/essentials/tests/sql/suites/blocks/sort_two_desc.sql new file mode 100644 index 0000000000..bbb338cf3b --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_two_desc.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + key, subkey+0 as subkey1, value +FROM Input +ORDER BY key desc, subkey1 desc, value; diff --git a/yql/essentials/tests/sql/suites/blocks/sort_two_mix.cfg b/yql/essentials/tests/sql/suites/blocks/sort_two_mix.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_two_mix.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/sort_two_mix.sql b/yql/essentials/tests/sql/suites/blocks/sort_two_mix.sql new file mode 100644 index 0000000000..9d7e8fd637 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sort_two_mix.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + key, subkey+0 as subkey1, value +FROM Input +ORDER BY key asc, subkey1 desc, value; diff --git a/yql/essentials/tests/sql/suites/blocks/string_as_agg_key.cfg b/yql/essentials/tests/sql/suites/blocks/string_as_agg_key.cfg new file mode 100644 index 0000000000..84150a8314 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_as_agg_key.cfg @@ -0,0 +1 @@ +in Input input_int32_string.txt diff --git a/yql/essentials/tests/sql/suites/blocks/string_as_agg_key.sql b/yql/essentials/tests/sql/suites/blocks/string_as_agg_key.sql new file mode 100644 index 0000000000..25ead30441 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_as_agg_key.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT DISTINCT value, value_utf FROM Input ORDER BY value; +SELECT DISTINCT value, FROM Input ORDER BY value; + diff --git a/yql/essentials/tests/sql/suites/blocks/string_filter.cfg b/yql/essentials/tests/sql/suites/blocks/string_filter.cfg new file mode 100644 index 0000000000..84150a8314 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_filter.cfg @@ -0,0 +1 @@ +in Input input_int32_string.txt diff --git a/yql/essentials/tests/sql/suites/blocks/string_filter.sql b/yql/essentials/tests/sql/suites/blocks/string_filter.sql new file mode 100644 index 0000000000..2cb1054487 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_filter.sql @@ -0,0 +1,7 @@ +USE plato; + +SELECT + key, key + subkey, value, value_utf +FROM Input +WHERE subkey != 4 +ORDER BY key diff --git a/yql/essentials/tests/sql/suites/blocks/string_len_and_cmp.cfg b/yql/essentials/tests/sql/suites/blocks/string_len_and_cmp.cfg new file mode 100644 index 0000000000..84150a8314 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_len_and_cmp.cfg @@ -0,0 +1 @@ +in Input input_int32_string.txt diff --git a/yql/essentials/tests/sql/suites/blocks/string_len_and_cmp.sql b/yql/essentials/tests/sql/suites/blocks/string_len_and_cmp.sql new file mode 100644 index 0000000000..6450080bd5 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_len_and_cmp.sql @@ -0,0 +1,42 @@ +USE plato; + +SELECT + key, + + value == value_utf, + value_utf != value, + value < value_utf, + value_utf <= value_utf, + value > value_utf, + value_utf >= value_utf, + + value == 'foo', + 'foo' != value, + value < 'foo', + 'тест' <= value_utf, + value > 'foo', + 'проверка'u >= value_utf, + + '' == value_utf, + '' != value, + '' < value_utf, + '' <= value_utf, + '' > value_utf, + '' >= value_utf, + + value == ''u, + value_utf != ''u, + value < ''u, + value_utf <= ''u, + value > ''u, + value_utf >= ''u, + + len(value), + len(value_utf), + len(''), + len(''u), + len('проверка'), + len('тест'u), + +FROM Input +ORDER BY key diff --git a/yql/essentials/tests/sql/suites/blocks/string_pass.cfg b/yql/essentials/tests/sql/suites/blocks/string_pass.cfg new file mode 100644 index 0000000000..84150a8314 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_pass.cfg @@ -0,0 +1 @@ +in Input input_int32_string.txt diff --git a/yql/essentials/tests/sql/suites/blocks/string_pass.sql b/yql/essentials/tests/sql/suites/blocks/string_pass.sql new file mode 100644 index 0000000000..e58e6abd97 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_pass.sql @@ -0,0 +1,6 @@ +USE plato; + +SELECT + key, key + subkey, value, value_utf +FROM Input +ORDER BY key diff --git a/yql/essentials/tests/sql/suites/blocks/string_with.cfg b/yql/essentials/tests/sql/suites/blocks/string_with.cfg new file mode 100644 index 0000000000..84150a8314 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_with.cfg @@ -0,0 +1 @@ +in Input input_int32_string.txt diff --git a/yql/essentials/tests/sql/suites/blocks/string_with.sql b/yql/essentials/tests/sql/suites/blocks/string_with.sql new file mode 100644 index 0000000000..dc677c8c28 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/string_with.sql @@ -0,0 +1,22 @@ +pragma AnsiLike; +pragma warning("disable", "4510"); + +USE plato; + +SELECT + key, + + YQL::StringContains(value, value_utf), + YQL::StringContains(value, 'o'), + value like 'o', + YQL::StringContains('foobar'u, value), + + StartsWith(value, value_utf), + EndsWith(value, 'ar'u), + StartsWith('тестпроверка'u, value_utf), + EndsWith('тестпроверка'u, value_utf), + + value like 'ba%ar', + value_utf like 'про%ерка', +FROM Input +ORDER BY key diff --git a/yql/essentials/tests/sql/suites/blocks/struct_type.cfg b/yql/essentials/tests/sql/suites/blocks/struct_type.cfg new file mode 100644 index 0000000000..ed506aaf28 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/struct_type.cfg @@ -0,0 +1 @@ +in Input input_struct.txt diff --git a/yql/essentials/tests/sql/suites/blocks/struct_type.sql b/yql/essentials/tests/sql/suites/blocks/struct_type.sql new file mode 100644 index 0000000000..942f54bf80 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/struct_type.sql @@ -0,0 +1,8 @@ +USE plato; + +SELECT + key, + SOME(val) as someVal, +FROM Input +GROUP BY key +ORDER BY key diff --git a/yql/essentials/tests/sql/suites/blocks/sub_uint64_opt2.cfg b/yql/essentials/tests/sql/suites/blocks/sub_uint64_opt2.cfg new file mode 100644 index 0000000000..46fee85c7f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sub_uint64_opt2.cfg @@ -0,0 +1 @@ +in Input input_uint64_opt2.txt diff --git a/yql/essentials/tests/sql/suites/blocks/sub_uint64_opt2.sql b/yql/essentials/tests/sql/suites/blocks/sub_uint64_opt2.sql new file mode 100644 index 0000000000..28a74bab35 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/sub_uint64_opt2.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key-subkey,1000ul-key,subkey-1ul +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_one_asc.cfg b/yql/essentials/tests/sql/suites/blocks/top_sort_one_asc.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_one_asc.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_one_asc.sql b/yql/essentials/tests/sql/suites/blocks/top_sort_one_asc.sql new file mode 100644 index 0000000000..6db7f8ea15 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_one_asc.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + subkey+0 as subkey1, value +FROM Input +ORDER BY subkey1, value limit 2; diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_one_desc.cfg b/yql/essentials/tests/sql/suites/blocks/top_sort_one_desc.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_one_desc.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_one_desc.sql b/yql/essentials/tests/sql/suites/blocks/top_sort_one_desc.sql new file mode 100644 index 0000000000..d0f391964f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_one_desc.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + subkey+0 as subkey1, value +FROM Input +ORDER BY subkey1 desc, value limit 2; diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_two_asc.cfg b/yql/essentials/tests/sql/suites/blocks/top_sort_two_asc.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_two_asc.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_two_asc.sql b/yql/essentials/tests/sql/suites/blocks/top_sort_two_asc.sql new file mode 100644 index 0000000000..3e056b21be --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_two_asc.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + key, subkey+0 as subkey1, value +FROM Input +ORDER BY key, subkey1, value limit 2; diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_two_desc.cfg b/yql/essentials/tests/sql/suites/blocks/top_sort_two_desc.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_two_desc.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_two_desc.sql b/yql/essentials/tests/sql/suites/blocks/top_sort_two_desc.sql new file mode 100644 index 0000000000..d8b6927e0a --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_two_desc.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + key, subkey+0 as subkey1, value +FROM Input +ORDER BY key desc, subkey1 desc, value limit 2; diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_two_mix.cfg b/yql/essentials/tests/sql/suites/blocks/top_sort_two_mix.cfg new file mode 100644 index 0000000000..346b6ff2a2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_two_mix.cfg @@ -0,0 +1 @@ +in Input input_top.txt diff --git a/yql/essentials/tests/sql/suites/blocks/top_sort_two_mix.sql b/yql/essentials/tests/sql/suites/blocks/top_sort_two_mix.sql new file mode 100644 index 0000000000..067e45fde2 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/top_sort_two_mix.sql @@ -0,0 +1,7 @@ +USE plato; +pragma yt.UseNativeDescSort; + +SELECT + key, subkey+0 as subkey1, value +FROM Input +ORDER BY key asc, subkey1 desc, value limit 2; diff --git a/yql/essentials/tests/sql/suites/blocks/tuple_nth.cfg b/yql/essentials/tests/sql/suites/blocks/tuple_nth.cfg new file mode 100644 index 0000000000..d2b033ce45 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/tuple_nth.cfg @@ -0,0 +1 @@ +in Input input_int64.txt diff --git a/yql/essentials/tests/sql/suites/blocks/tuple_nth.sql b/yql/essentials/tests/sql/suites/blocks/tuple_nth.sql new file mode 100644 index 0000000000..74b1c9d800 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/tuple_nth.sql @@ -0,0 +1,16 @@ +USE plato; + +insert into @tmp +SELECT + key, + (subkey,key) as a, + (1,key) as b, + Just((subkey,key)) as c, + Just((Just(subkey),key)) as d, + Nothing(Tuple<Int32,Int32>?) as e, + Nothing(Tuple<Int32?,Int32>?) as f, +FROM Input; + +commit; + +select a.0,a.1,b.0,b.1,c.0,c.1,d.0,d.1,e.0,e.1,f.0,f.1 from @tmp; diff --git a/yql/essentials/tests/sql/suites/blocks/tuple_type.cfg b/yql/essentials/tests/sql/suites/blocks/tuple_type.cfg new file mode 100644 index 0000000000..2c1468d47f --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/tuple_type.cfg @@ -0,0 +1 @@ +in Input input_tuple.txt diff --git a/yql/essentials/tests/sql/suites/blocks/tuple_type.sql b/yql/essentials/tests/sql/suites/blocks/tuple_type.sql new file mode 100644 index 0000000000..e1f04fe2de --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/tuple_type.sql @@ -0,0 +1,5 @@ +USE plato; + +SELECT + key+1u, (3, 4.0), value +FROM Input diff --git a/yql/essentials/tests/sql/suites/blocks/type_and_callable_stats.cfg b/yql/essentials/tests/sql/suites/blocks/type_and_callable_stats.cfg new file mode 100644 index 0000000000..6a38002573 --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/type_and_callable_stats.cfg @@ -0,0 +1,4 @@ +with_final_result_issues +in Input input_strings.txt +udf string_udf +udf re2_udf diff --git a/yql/essentials/tests/sql/suites/blocks/type_and_callable_stats.sql b/yql/essentials/tests/sql/suites/blocks/type_and_callable_stats.sql new file mode 100644 index 0000000000..5357170adb --- /dev/null +++ b/yql/essentials/tests/sql/suites/blocks/type_and_callable_stats.sql @@ -0,0 +1,16 @@ +pragma BlockEngine='force'; + +USE plato; +$match = Re2::Match(@@\d+@@); +$grep = Re2::Grep('911'); + +SELECT + key, + String::EscapeC(value) as ok1, + $match(key) as no_block_udf1, + $grep(key) as no_block_udf2, + AsList(key) as no_block_list, + AsSet(key) as no_block_set_and_void, + cast(key as Double) as no_block_cast, + AsTuple(key, DyNumber("123")) as no_block_dynumber, +FROM Input; |