ClickHouse/tests/queries/0_stateless/01856_create_function.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

15 lines
848 B
MySQL
Raw Normal View History

2021-09-12 12:35:27 +00:00
-- Tags: no-parallel
2021-08-23 14:31:58 +00:00
CREATE FUNCTION 01856_test_function_0 AS (a, b, c) -> a * b * c;
SELECT 01856_test_function_0(2, 3, 4);
SELECT isConstant(01856_test_function_0(1, 2, 3));
DROP FUNCTION 01856_test_function_0;
CREATE FUNCTION 01856_test_function_1 AS (a, b) -> 01856_test_function_1(a, b) + 01856_test_function_1(a, b); --{serverError CANNOT_CREATE_RECURSIVE_FUNCTION}
CREATE FUNCTION cast AS a -> a + 1; --{serverError FUNCTION_ALREADY_EXISTS}
CREATE FUNCTION sum AS (a, b) -> a + b; --{serverError FUNCTION_ALREADY_EXISTS}
2021-08-23 14:31:58 +00:00
CREATE FUNCTION 01856_test_function_2 AS (a, b) -> a + b;
CREATE FUNCTION 01856_test_function_2 AS (a) -> a || '!!!'; --{serverError FUNCTION_ALREADY_EXISTS}
2021-08-23 14:31:58 +00:00
DROP FUNCTION 01856_test_function_2;
DROP FUNCTION unknown_function; -- {serverError UNKNOWN_FUNCTION}
DROP FUNCTION CAST; -- {serverError CANNOT_DROP_FUNCTION}