Skip to content
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

Use bytes instead of strings in the GRPC protocol. #27431

Merged

Conversation

vitlibar
Copy link
Member

@vitlibar vitlibar commented Aug 8, 2021

I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en

Changelog category:

  • Improvement

Changelog entry:
Use bytes instead of strings for binary data in the GRPC protocol.

@robot-clickhouse robot-clickhouse added the pr-improvement Pull request with some product improvements label Aug 8, 2021
@@ -32,7 +32,7 @@ message ExternalTable {
// Data to insert to the external table.
// If a method with streaming input (i.e. ExecuteQueryWithStreamInput() or ExecuteQueryWithStreamIO()) is used,
// then data for insertion to the same external table can be split between multiple QueryInfos.
string data = 3;
bytes data = 3;
Copy link
Member Author

@vitlibar vitlibar Aug 8, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The types bytes and string are translated by protobuf compiler to the same C++ type std::string, however they're translated to different types in some other languages (Java, Go, Python). The type bytes here is more appropriate because data contains a sequence of bytes, not characters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr-improvement Pull request with some product improvements
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants