diff --git a/dbms/tests/queries/0_stateless/00490_with_select.reference b/dbms/tests/queries/0_stateless/00490_with_select.reference new file mode 100644 index 00000000000..889d98612c0 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00490_with_select.reference @@ -0,0 +1,6 @@ +16 2 4 +16 4 +16 2 4 +16 4 +string_abc +string_abc diff --git a/dbms/tests/queries/0_stateless/00490_with_select.sql b/dbms/tests/queries/0_stateless/00490_with_select.sql new file mode 100644 index 00000000000..c2190187f61 --- /dev/null +++ b/dbms/tests/queries/0_stateless/00490_with_select.sql @@ -0,0 +1,8 @@ +with pow(2,2) as four select pow(four, 2), 2 as two, pow(two, 2); +select `pow(four, 2)`, `pow(2, 2)` from (with pow(2,2) as four select pow(four, 2), 2 as two, pow(two, 2)); +with (select pow(2,2)) as four select pow(four, 2), 2 as two, pow(two, 2); +select `pow(four, 2)`, `pow(2, 2)` from (with (select pow(2,2)) as four select pow(four, 2), 2 as two, pow(two, 2)); +with 'string' as str select str || '_abc'; +select `concat(str, \'_abc\')` from (with 'string' as str select str || '_abc'); + +