Compare commits

..

3 Commits

Author SHA1 Message Date
Yarik Briukhovetskyi
e8036e132c
Update 03274_aliases_in_udf.reference 2024-11-21 13:08:42 +01:00
Yarik Briukhovetskyi
b0b78cd453
Update 03274_aliases_in_udf.sql 2024-11-21 12:59:46 +01:00
Yarik Briukhovetskyi
05b0ae9faa
Update 03274_aliases_in_udf.sql 2024-11-21 12:37:07 +01:00
2 changed files with 11 additions and 11 deletions

View File

@ -1,5 +1,5 @@
FIX ISSUE #69143 FIX ISSUE #69143
a a
b b
EXPAIN SYNTAX OF UDF EXPLAIN SYNTAX OF UDF
SELECT ((4 + 2) + 1, ((4 + 2) + 1) + 2) SELECT ((4 + 2) + 1, ((4 + 2) + 1) + 2)

View File

@ -1,10 +1,10 @@
-- Tags: no-parallel
SELECT 'FIX ISSUE #69143'; SELECT 'FIX ISSUE #69143';
DROP FUNCTION IF EXISTS test_function;
DROP FUNCTION IF EXISTS test_03274;
DROP TABLE IF EXISTS test_table; DROP TABLE IF EXISTS test_table;
CREATE OR REPLACE FUNCTION test_function AS ( input_column_name ) -> (( CREATE FUNCTION IF NOT EXISTS 03274_test_function AS ( input_column_name ) -> ((
'1' AS a, '1' AS a,
input_column_name AS input_column_name input_column_name AS input_column_name
).2); ).2);
@ -18,10 +18,10 @@ ENGINE = MergeTree()
ORDER BY tuple(); ORDER BY tuple();
ALTER TABLE test_table ADD COLUMN mat_a String MATERIALIZED test_function(metadata_a); ALTER TABLE test_table ADD COLUMN mat_a String MATERIALIZED 03274_test_function(metadata_a);
ALTER TABLE test_table MATERIALIZE COLUMN `mat_a`; ALTER TABLE test_table MATERIALIZE COLUMN `mat_a`;
ALTER TABLE test_table ADD COLUMN mat_b String MATERIALIZED test_function(metadata_b); ALTER TABLE test_table ADD COLUMN mat_b String MATERIALIZED 03274_test_function(metadata_b);
ALTER TABLE test_table MATERIALIZE COLUMN `mat_b`; ALTER TABLE test_table MATERIALIZE COLUMN `mat_b`;
INSERT INTO test_table SELECT 'a', 'b'; INSERT INTO test_table SELECT 'a', 'b';
@ -29,12 +29,12 @@ INSERT INTO test_table SELECT 'a', 'b';
SELECT mat_a FROM test_table; SELECT mat_a FROM test_table;
SELECT mat_b FROM test_table; SELECT mat_b FROM test_table;
SELECT 'EXPAIN SYNTAX OF UDF'; SELECT 'EXPLAIN SYNTAX OF UDF';
CREATE OR REPLACE FUNCTION test_03274 AS ( x ) -> ((x + 1 as y, y + 2)); CREATE FUNCTION IF NOT EXISTS test_03274 AS ( x ) -> ((x + 1 as y, y + 2));
EXPAIN SYNTAX SELECT test_03274(4 + 2); EXPLAIN SYNTAX SELECT test_03274(4 + 2);
DROP FUNCTION IF EXISTS test_function; DROP FUNCTION 03274_test_function;
DROP FUNCTION IF EXISTS test_03274; DROP FUNCTION test_03274;
DROP TABLE IF EXISTS test_table; DROP TABLE IF EXISTS test_table;