diff options
author | Bulat Gayazov <[email protected]> | 2023-08-03 17:18:07 +0000 |
---|---|---|
committer | brgayazov <[email protected]> | 2023-08-03 20:18:07 +0300 |
commit | 8f87c3af48e9bb2599b32339d26776bf931161e1 (patch) | |
tree | ac9c0537c34caa926c4c8c6fbf0e469f13e165ea | |
parent | 5cc18010911fd094c55a3572b17c0efefcc5ce21 (diff) |
Fixed bug in ydb import file json with bad move
Fixed bug in ydb import file json with bad move
Pull Request resolved: #316
-rw-r--r-- | ydb/public/lib/ydb_cli/import/import.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/ydb/public/lib/ydb_cli/import/import.cpp b/ydb/public/lib/ydb_cli/import/import.cpp index 5ff02b052da..601fc6670ea 100644 --- a/ydb/public/lib/ydb_cli/import/import.cpp +++ b/ydb/public/lib/ydb_cli/import/import.cpp @@ -577,7 +577,8 @@ inline TAsyncStatus TImportFileClient::UpsertJsonBuffer(const TString& dbPath, TValueBuilder& builder) { auto upsert = [this, dbPath, rows = builder.Build()] (NYdb::NTable::TTableClient& tableClient) mutable -> TAsyncStatus { - return tableClient.BulkUpsert(dbPath, std::move(rows), UpsertSettings) + NYdb::TValue rowsCopy(rows.GetType(), rows.GetProto()); + return tableClient.BulkUpsert(dbPath, std::move(rowsCopy), UpsertSettings) .Apply([](const NYdb::NTable::TAsyncBulkUpsertResult& bulkUpsertResult) { NYdb::TStatus status = bulkUpsertResult.GetValueSync(); return NThreading::MakeFuture(status); |