Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion ydb/core/kqp/host/kqp_gateway_proxy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1368,7 +1368,8 @@ class TKqpGatewayProxy : public IKikimrGateway {
op.SetPrefix(settings.Prefix);

if (settings.Settings.IncrementalBackupEnabled) {
op.MutableIncrementalBackupConfig();
auto* config = op.MutableIncrementalBackupConfig();
config->SetOmitIndexes(settings.Settings.OmitIndexes);
}

auto errOpt = std::visit(
Expand Down
7 changes: 7 additions & 0 deletions ydb/core/kqp/provider/yql_kikimr_exec.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,13 @@ namespace {
"INCREMENTAL_BACKUP_ENABLED must be true or false"));
return false;
}
} else if (name == "omit_indexes") {
auto value = ToString(setting.Value().Cast<TCoDataCtor>().Literal().Cast<TCoAtom>().Value());
if (!TryFromString(value, dstSettings.OmitIndexes)) {
ctx.AddError(TIssue(ctx.GetPosition(pos),
"OMIT_INDEXES must be true or false"));
return false;
}
} else if (name == "storage") {
auto value = ToString(setting.Value().Cast<TCoDataCtor>().Literal().Cast<TCoAtom>().Value());
if (to_lower(value) != "cluster") {
Expand Down
3 changes: 2 additions & 1 deletion ydb/core/kqp/provider/yql_kikimr_gateway.h
Original file line number Diff line number Diff line change
Expand Up @@ -1052,7 +1052,8 @@ struct TAnalyzeSettings {
};

struct TBackupCollectionSettings {
bool IncrementalBackupEnabled;
bool IncrementalBackupEnabled = false;
bool OmitIndexes = false;
};

struct TCreateBackupCollectionSettings {
Expand Down
1 change: 1 addition & 0 deletions ydb/core/kqp/provider/yql_kikimr_type_ann.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2448,6 +2448,7 @@ virtual TStatus HandleCreateTable(TKiCreateTable create, TExprContext& ctx) over
const THashSet<TString> supportedSettings = {
"incremental_backup_enabled",
"storage",
"omit_indexes",
};

if (!CheckBackupCollectionSettings(node.BackupCollectionSettings(), supportedSettings, ctx)) {
Expand Down
2 changes: 1 addition & 1 deletion ydb/core/protos/flat_scheme_op.proto
Original file line number Diff line number Diff line change
Expand Up @@ -2312,7 +2312,7 @@ message TBackupCollectionDescription {
}

message TIncrementalBackupConfig {

optional bool OmitIndexes = 1 [default = false];
}

oneof Entries {
Expand Down
Loading