abonander commented on code in PR #2886:
URL: https://github.com/apache/iggy/pull/2886#discussion_r2898050705


##########
core/connectors/sinks/clickhouse_sink/src/binary.rs:
##########
@@ -0,0 +1,1095 @@
+/* Licensed to the Apache Software Foundation (ASF) under one
+ * or more contributor license agreements.  See the NOTICE file
+ * distributed with this work for additional information
+ * regarding copyright ownership.  The ASF licenses this file
+ * to you under the Apache License, Version 2.0 (the
+ * "License"); you may not use this file except in compliance
+ * with the License.  You may obtain a copy of the License at
+ *
+ *   http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing,
+ * software distributed under the License is distributed on an
+ * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+ * KIND, either express or implied.  See the License for the
+ * specific language governing permissions and limitations
+ * under the License.
+ */
+
+//! RowBinary / RowBinaryWithDefaults byte serialization.
+//!
+//! Follows the ClickHouse binary format specification:
+//! <https://clickhouse.com/docs/en/interfaces/formats#rowbinary>
+//!
+//! Key layout rules:
+//! - All integers are **little-endian**.
+//! - Strings are prefixed with an **unsigned LEB128 varint** length.
+//! - `Nullable(T)`: 1-byte null marker (`0x01` = null, `0x00` = not null)
+//!   followed by T bytes when not null.
+//! - `RowBinaryWithDefaults`: each top-level column is preceded by a 1-byte
+//!   flag (`0x01` = use server DEFAULT, `0x00` = value follows).

Review Comment:
   Would you mind explaining the reasoning to choose a bespoke implementation 
here over using the [official Rust 
client](https://crates.io/crates/clickhouse)? It uses HTTP and `RowBinary` 
serialization by default, so it's not clear what's being gained here.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to