Skip to content

Commit 9e93926

Browse files
committed
refactor: simplify validation for batch_encoding format
1 parent e7b89c0 commit 9e93926

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

src/sinks/clickhouse/config.rs

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -283,14 +283,8 @@ impl ClickhouseConfig {
283283
// Validate that batch_encoding is only compatible with ArrowStream format
284284
if self.format != Format::ArrowStream {
285285
return Err(format!(
286-
"'batch_encoding' is only compatible with 'format: arrow_stream'. \
287-
Found 'format: {}'.",
288-
match self.format {
289-
Format::JsonEachRow => "json_each_row",
290-
Format::JsonAsObject => "json_as_object",
291-
Format::JsonAsString => "json_as_string",
292-
Format::ArrowStream => "arrow_stream",
293-
}
286+
"'batch_encoding' is only compatible with 'format: arrow_stream'. Found 'format: {}'.",
287+
self.format
294288
)
295289
.into());
296290
}

0 commit comments

Comments
 (0)