Skip to content

Commit b13bd4a

Browse files
authored
Improve csv import, step 3 (#11864)
1 parent a18f18d commit b13bd4a

File tree

4 files changed

+367
-178
lines changed

4 files changed

+367
-178
lines changed

ydb/public/lib/ydb_cli/commands/ydb_service_import.cpp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -311,8 +311,8 @@ int TCommandImportFromCsv::Run(TConfig& config) {
311311
settings.Delimiter(Delimiter);
312312
}
313313

314-
TImportFileClient client(CreateDriver(config), config);
315-
ThrowOnError(client.Import(FilePaths, Path, settings));
314+
TImportFileClient client(CreateDriver(config), config, settings);
315+
ThrowOnError(client.Import(FilePaths, Path));
316316

317317
return EXIT_SUCCESS;
318318
}
@@ -341,8 +341,8 @@ int TCommandImportFromJson::Run(TConfig& config) {
341341
settings.BytesPerRequest(NYdb::SizeFromString(BytesPerRequest));
342342
settings.Threads(Threads);
343343

344-
TImportFileClient client(CreateDriver(config), config);
345-
ThrowOnError(client.Import(FilePaths, Path, settings));
344+
TImportFileClient client(CreateDriver(config), config, settings);
345+
ThrowOnError(client.Import(FilePaths, Path));
346346

347347
return EXIT_SUCCESS;
348348
}
@@ -360,8 +360,8 @@ int TCommandImportFromParquet::Run(TConfig& config) {
360360
settings.BytesPerRequest(NYdb::SizeFromString(BytesPerRequest));
361361
settings.Threads(Threads);
362362

363-
TImportFileClient client(CreateDriver(config), config);
364-
ThrowOnError(client.Import(FilePaths, Path, settings));
363+
TImportFileClient client(CreateDriver(config), config, settings);
364+
ThrowOnError(client.Import(FilePaths, Path));
365365

366366
return EXIT_SUCCESS;
367367
}

ydb/public/lib/ydb_cli/common/csv_parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -483,8 +483,8 @@ void TCsvParser::BuildLineType() {
483483
auto findIt = DestinationTypes->find(colName);
484484
if (findIt != DestinationTypes->end()) {
485485
builder.AddMember(colName, findIt->second);
486-
ResultLineTypesSorted.emplace_back(&findIt->second);
487-
ResultLineNamesSorted.emplace_back(&colName);
486+
ResultLineTypesSorted.push_back(&findIt->second);
487+
ResultLineNamesSorted.push_back(&colName);
488488
SkipBitMap.push_back(false);
489489
++ResultColumnCount;
490490
} else {

0 commit comments

Comments
 (0)