-
Notifications
You must be signed in to change notification settings - Fork 695
Add Arena option to BulkUpsert, add hidden --send-format option #20005
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🟢 |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
@@ -28,6 +28,7 @@ class TType { | |||
|
|||
const Ydb::Type& GetProto() const; | |||
Ydb::Type& GetProto(); | |||
Ydb::Type&& ExtractProto() &&; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А зачем отдельный метод ExtractProto, если можно сделать std::move(GetProto())?
@@ -1162,6 +1162,8 @@ struct TBulkUpsertSettings : public TOperationRequestSettings<TBulkUpsertSetting | |||
// Format setting proto serialized into string. If not set format defaults are used. | |||
// I.e. it's Ydb.Table.CsvSettings for CSV. | |||
FLUENT_SETTING_DEFAULT(std::string, FormatSettings, ""); | |||
google::protobuf::Arena* Arena_ = nullptr; | |||
TBulkUpsertSettings& Arena(google::protobuf::Arena* arena) { Arena_ = arena; return *this; } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Чем FLUENT_SETTING_DEFAULT не подошел?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Он там const ссылку принимает, а тут нужен указатель
}; | ||
|
||
template<> | ||
NYdb::NConsoleClient::ESendFormat FromStringImpl<NYdb::NConsoleClient::ESendFormat, char>(const char* s, size_t len) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
А зачем самому писать? Можно же сделать GENERATE_ENUM_SERIALIZATION?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
О. Я обыскался, как это в форматах было сделано. Спасибо, заменю
@@ -925,6 +937,99 @@ TAsyncStatus TImportFileClient::TImpl::UpsertTValueBuffer(const TString& dbPath, | |||
}); | |||
} | |||
|
|||
inline TAsyncStatus TImportFileClient::TImpl::UpsertTValueBufferParquet( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
У этих методов очень много кода дублируется, в будущем мб стоит порефакторить
@@ -606,6 +528,249 @@ class TGRpcConnectionsImpl | |||
const TLog& GetLog() const override; | |||
|
|||
private: | |||
template<bool RequestOnArena, typename TService, typename TRequest, typename TResponse> | |||
void RunImpl( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Какой-то перебор на мой взгляд. Так перелопачивать кишки SDK ради RequestOnArena. Тут можно проще, сделать класс обертку (TRequest), который хранит протоспеку или указатель на нее (в std::variant например). И метод DoRequest можно вынести тогда в сам TRequest
⚪ Test history | Ya make output | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat
⚪ Test history | Ya make output | Test bloat | Test bloat | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
⚪ Test history | Ya make output | Test bloat
🟢
*please be aware that the difference is based on comparing your commit and the last completed build from the post-commit, check comparation |
Changelog entry
Changelog category
Description for reviewers