diff options
author | tesseract <[email protected]> | 2025-01-21 12:50:29 +0300 |
---|---|---|
committer | tesseract <[email protected]> | 2025-01-21 14:32:19 +0300 |
commit | e677409ecb6106695a976307290b2f6bad3d72c0 (patch) | |
tree | 7c4fe8c7334a8f814506c857a08322ea800a8b79 /yql/essentials/sql/v1/format/sql_format_ut.h | |
parent | e2324a4c7934ecbc80eb47f70d2586c4995499b5 (diff) |
YQL for create, alter and drop transfer from topic to table
commit_hash:09502f46a7ee665609d2c4ba8d9e0aa421720cdb
Diffstat (limited to 'yql/essentials/sql/v1/format/sql_format_ut.h')
-rw-r--r-- | yql/essentials/sql/v1/format/sql_format_ut.h | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/yql/essentials/sql/v1/format/sql_format_ut.h b/yql/essentials/sql/v1/format/sql_format_ut.h index bd62ddf3687..a8fd6b7b3ff 100644 --- a/yql/essentials/sql/v1/format/sql_format_ut.h +++ b/yql/essentials/sql/v1/format/sql_format_ut.h @@ -383,6 +383,26 @@ Y_UNIT_TEST(AsyncReplication) { setup.Run(cases); } +Y_UNIT_TEST(Transfer) { + TCases cases = { + {"create transfer user from topic1 to table1 with (user='foo')", + "CREATE TRANSFER user FROM topic1 TO table1 WITH (user = 'foo');\n"}, + {"alter transfer user set (user='foo')", + "ALTER TRANSFER user SET (user = 'foo');\n"}, + {"drop transfer user", + "DROP TRANSFER user;\n"}, + {"drop transfer user cascade", + "DROP TRANSFER user CASCADE;\n"}, + {"create transfer user from topic1 to table1 using ($x) -> { $y = cast($x as String); return $y ; } with (user='foo')", + "CREATE TRANSFER user FROM topic1 TO table1 USING ($x) -> {\n $y = CAST($x AS String);\n RETURN $y;\n} WITH (user = 'foo');\n"}, + {"create transfer user from topic1 to table1 using $xxx with (user='foo')", + "CREATE TRANSFER user FROM topic1 TO table1 USING $xxx WITH (user = 'foo');\n"}, + }; + + TSetup setup; + setup.Run(cases); +} + Y_UNIT_TEST(ExternalTableOperations) { TCases cases = { {"creAte exTernAl TabLe usEr (a int) With (a = \"b\")", |