@@ -662,6 +662,23 @@ Y_UNIT_TEST_SUITE(KqpQueryService) {
662662 }
663663 };
664664
665+ auto checkRename = [&](bool expectSuccess, int nameSuffix, int nameSuffixTo) {
666+ const TString sql = fmt::format (R"sql(
667+ ALTER TABLE TestDdl_{name_suffix} RENAME TO TestDdl_{name_suffix_to}
668+ )sql" ,
669+ " name_suffix" _a = nameSuffix,
670+ " name_suffix_to" _a = nameSuffixTo
671+ );
672+
673+ auto result = db.ExecuteQuery (sql, TTxControl::NoTx ()).ExtractValueSync ();
674+ if (expectSuccess) {
675+ UNIT_ASSERT_VALUES_EQUAL_C (result.GetStatus (), EStatus::SUCCESS, result.GetIssues ().ToString ());
676+ } else {
677+ UNIT_ASSERT_VALUES_UNEQUAL_C (result.GetStatus (), EStatus::SUCCESS, result.GetIssues ().ToString ());
678+ }
679+ UNIT_ASSERT (result.GetResultSets ().empty ());
680+ };
681+
665682 // usual create
666683 checkCreate (true , EEx::Empty, 0 );
667684 checkUpsert (0 );
@@ -694,6 +711,16 @@ Y_UNIT_TEST_SUITE(KqpQueryService) {
694711 checkDrop (true , EEx::IfExists, 1 ); // real drop
695712 checkExists (false , 1 );
696713 checkDrop (true , EEx::IfExists, 1 );
714+
715+ // rename
716+ Y_UNUSED (checkRename);
717+ /*
718+ checkCreate(true, EEx::Empty, 2);
719+ checkRename(true, 2, 3);
720+ checkRename(false, 2, 3); // already renamed, no such table
721+ checkDrop(false, EEx::Empty, 2); // no such table
722+ checkDrop(true, EEx::Empty, 3);
723+ */
697724 }
698725
699726 Y_UNIT_TEST (DdlColumnTable) {
0 commit comments