aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorilnaz <ilnaz@ydb.tech>2023-05-23 23:24:50 +0300
committerilnaz <ilnaz@ydb.tech>2023-05-23 23:24:50 +0300
commitf226b4c70c88ac967c94d4e55ed92a117764ff6e (patch)
treec8328248b88c4a28d8dea02a0b37fbf84d661042
parent08a9bc0a0d46b2e5db57695ee0e67dae3213e894 (diff)
downloadydb-f226b4c70c88ac967c94d4e55ed92a117764ff6e.tar.gz
Get rid of redundant code
-rw-r--r--ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp32
1 files changed, 1 insertions, 31 deletions
diff --git a/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp b/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
index e26ec97adf..e77c37d6f5 100644
--- a/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
+++ b/ydb/core/kqp/ut/scheme/kqp_scheme_ut.cpp
@@ -2634,36 +2634,6 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
return pqConfig;
}
- static const char* ModeToString(EChangefeedMode mode) {
- switch (mode) {
- case EChangefeedMode::KeysOnly:
- return "KEYS_ONLY";
- case EChangefeedMode::Updates:
- return "UPDATES";
- case EChangefeedMode::NewImage:
- return "NEW_IMAGE";
- case EChangefeedMode::OldImage:
- return "OLD_IMAGE";
- case EChangefeedMode::NewAndOldImages:
- return "NEW_AND_OLD_IMAGES";
- case EChangefeedMode::Unknown:
- UNIT_ASSERT(false);
- return "";
- }
- }
-
- static const char* FormatToString(EChangefeedFormat format) {
- switch (format) {
- case EChangefeedFormat::Json:
- return "JSON";
- case EChangefeedFormat::DynamoDBStreamsJson:
- return "DYNAMODB_STREAMS_JSON";
- case EChangefeedFormat::Unknown:
- UNIT_ASSERT(false);
- return "";
- }
- }
-
void AddChangefeed(EChangefeedMode mode, EChangefeedFormat format) {
TKikimrRunner kikimr(TKikimrSettings().SetPQConfig(DefaultPQConfig()));
auto db = kikimr.GetTableClient();
@@ -2694,7 +2664,7 @@ Y_UNIT_TEST_SUITE(KqpScheme) {
ALTER TABLE `/Root/table` ADD CHANGEFEED `feed` WITH (
MODE = '%s', FORMAT = '%s'
);
- )", ModeToString(mode), FormatToString(format));
+ )", ToString(mode).c_str(), ToString(format).c_str());
const auto result = session.ExecuteSchemeQuery(query, execOpts).GetValueSync();
UNIT_ASSERT_VALUES_EQUAL_C(result.GetStatus(), EStatus::SUCCESS, result.GetIssues().ToString());