Repository navigation
Conversation
| std::cerr << "schema_path: " << schema_path << std::endl; | ||
| std::cerr << "root obj: " << root_obj << std::endl; | ||
|
|
||
| int fd = open(schema_path.c_str(), O_RDONLY); |
There was a problem hiding this comment.
It is better to use high-level interface.
If an exception is thrown below, the open file will remain.
|
It is 5% done, at most. This PR has no future. |
|
I know this is a closed PR but I tested anyway. The biggest problem is it can't handle multiple PB messages. The Kafka storage polls Kafka, then the messages consumed are batched up and copied into a buffer. The delimiter option in Kafka storage won't work because PB is not a delimiter safe format unfortunately. One idea is to frame the each message with a run length prefix that is a little endian uint32 before copying into the buffer. Can we introduce such option to Kafka storage? Or kafka_format=Protobuf can imply the run length prefix since it's just an internal contract between Kafka storage and ProtobufRowInputStream. |
|
We have started another task as a replacement for this PR. |
|
If your messages in Kafka will be prefixed by size in appropriate format (varint), the Kafka storage will be able to read them from Protobuf format. |
|
Thanks for the description (I've read it using Google Translator). It seems Protobuf v3.3.0 added the delimited message utilities for C++ (Protobuf for Java supports delimiter for a long time). I did a bit of experiment. Unfortunately By the way I've written "jq for Protobuf" using libjq and libjv. It can query nested Protobuf messages just like jq for JSON. You mentioned in the document that arrays, nested messages and other complex types won't be supported. The jq can flatten the complex structure. I'm integrating it to ClickHouse as a proof of concept. |
Related: Altinity#2440 Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01V8mZSGiD8iJumpJMiQnrmC
…ifest id From the audit comment on PR ClickHouse#2440. The path predates the PR (Parts layer, 9d08bc0); priority Low until the read-your-writes question is answered. Related: Altinity#2440 (comment) Co-Authored-By: Claude Fable 5.1 <[email protected]> Claude-Session: https://claude.ai/code/session_01V8mZSGiD8iJumpJMiQnrmC Signed-off-by: Mikhail Filimonov <[email protected]>
I hereby agree to the terms of the CLA available at: https://yandex.ru/legal/cla/?lang=en