@@ -274,8 +274,8 @@ TRestoreResult TRestoreClient::Restore(const TString& fsPath, const TString& dbP
274
274
LOG_D (" Resolved db base path: " << dbBasePath.GetPath ().Quote ());
275
275
276
276
auto oldDirectoryList = RecursiveList (SchemeClient, dbBasePath);
277
- if (! oldDirectoryList.Status .IsSuccess ()) {
278
- LOG_E (" Error listing db base path: " << dbBasePath.GetPath ().Quote () << " : " << oldDirectoryList. Status .GetIssues ().ToOneLineString ());
277
+ if (const auto & status = oldDirectoryList.Status ; !status .IsSuccess ()) {
278
+ LOG_E (" Error listing db base path: " << dbBasePath.GetPath ().Quote () << " : " << status .GetIssues ().ToOneLineString ());
279
279
return Result<TRestoreResult>(EStatus::SCHEME_ERROR, " Can not list existing directory" );
280
280
}
281
281
@@ -489,9 +489,8 @@ TRestoreResult TRestoreClient::RestoreView(
489
489
TString query = TFileInput (createViewFile).ReadAll ();
490
490
491
491
NYql::TIssues issues;
492
- if (!RewriteCreateViewQuery (query, dbRestoreRoot, IsDatabase (SchemeClient, dbRestoreRoot), dbPath,
493
- createViewFile.GetPath ().Quote (), issues
494
- )) {
492
+ const bool isDb = IsDatabase (SchemeClient, dbRestoreRoot);
493
+ if (!RewriteCreateViewQuery (query, dbRestoreRoot, isDb, dbPath, createViewFile.GetPath ().Quote (), issues)) {
495
494
return Result<TRestoreResult>(dbPath, EStatus::BAD_REQUEST, issues.ToString ());
496
495
}
497
496
@@ -565,7 +564,7 @@ TRestoreResult TRestoreClient::RestoreCoordinationNode(
565
564
LOG_I (" Restore coordination node " << fsPath.GetPath ().Quote () << " to " << dbPath.Quote ());
566
565
567
566
if (settings.DryRun_ ) {
568
- return CheckExistenceAndType (SchemeClient, dbPath, NScheme:: ESchemeEntryType::CoordinationNode);
567
+ return CheckExistenceAndType (SchemeClient, dbPath, ESchemeEntryType::CoordinationNode);
569
568
}
570
569
571
570
const auto creationRequest = ReadCoordinationNodeCreationRequest (fsPath, Log.get ());
@@ -727,7 +726,7 @@ TRestoreResult TRestoreClient::CreateDataAccumulators(
727
726
TVector<THolder<NPrivate::IDataAccumulator>>& outAccumulators,
728
727
const TString& dbPath,
729
728
const TRestoreSettings& settings,
730
- const NTable:: TTableDescription& desc,
729
+ const TTableDescription& desc,
731
730
ui32 dataFilesCount)
732
731
{
733
732
const ui32 accumulatorsCount = std::min (settings.InFly_ , dataFilesCount);
0 commit comments