From 6ea73443a6a81d2477f8eab80dcf1a9206a44d5e Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Tue, 23 Jul 2024 13:12:26 +0200 Subject: Adding upstream version 25.6.1. Signed-off-by: Daniel Baumann --- tests/dialects/test_databricks.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'tests/dialects/test_databricks.py') diff --git a/tests/dialects/test_databricks.py b/tests/dialects/test_databricks.py index 471830f..86612cc 100644 --- a/tests/dialects/test_databricks.py +++ b/tests/dialects/test_databricks.py @@ -98,6 +98,22 @@ class TestDatabricks(Validator): read="databricks", ) + self.validate_all( + "CREATE OR REPLACE FUNCTION func(a BIGINT, b BIGINT) RETURNS TABLE (a INT) RETURN SELECT a", + write={ + "databricks": "CREATE OR REPLACE FUNCTION func(a BIGINT, b BIGINT) RETURNS TABLE (a INT) RETURN SELECT a", + "duckdb": "CREATE OR REPLACE FUNCTION func(a, b) AS TABLE SELECT a", + }, + ) + + self.validate_all( + "CREATE OR REPLACE FUNCTION func(a BIGINT, b BIGINT) RETURNS BIGINT RETURN a", + write={ + "databricks": "CREATE OR REPLACE FUNCTION func(a BIGINT, b BIGINT) RETURNS BIGINT RETURN a", + "duckdb": "CREATE OR REPLACE FUNCTION func(a, b) AS a", + }, + ) + # https://docs.databricks.com/sql/language-manual/functions/colonsign.html def test_json(self): self.validate_identity("SELECT c1:price, c1:price.foo, c1:price.bar[1]") -- cgit v1.2.3