mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-21 23:21:59 +00:00
Update 03274_aliases_in_udf.sql
This commit is contained in:
parent
7dcaacab9d
commit
05b0ae9faa
@ -1,10 +1,10 @@
|
||||
-- Tags: no-parallel
|
||||
|
||||
SELECT 'FIX ISSUE #69143';
|
||||
|
||||
DROP FUNCTION IF EXISTS test_function;
|
||||
DROP FUNCTION IF EXISTS test_03274;
|
||||
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,
|
||||
input_column_name AS input_column_name
|
||||
).2);
|
||||
@ -18,10 +18,10 @@ ENGINE = MergeTree()
|
||||
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 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`;
|
||||
|
||||
INSERT INTO test_table SELECT 'a', 'b';
|
||||
@ -31,10 +31,10 @@ SELECT mat_b FROM test_table;
|
||||
|
||||
SELECT 'EXPAIN 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);
|
||||
|
||||
DROP FUNCTION IF EXISTS test_function;
|
||||
DROP FUNCTION IF EXISTS test_03274;
|
||||
DROP FUNCTION 03274_test_function;
|
||||
DROP FUNCTION test_03274;
|
||||
DROP TABLE IF EXISTS test_table;
|
||||
|
Loading…
Reference in New Issue
Block a user