Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .server-changes/clickhouse-binary-type-complexity.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
area: webapp
type: fix
---

Fix runs with deeply nested output or error payloads disappearing from the runs list by raising the ClickHouse binary type complexity limit
4 changes: 4 additions & 0 deletions internal-packages/clickhouse/src/client/client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,10 @@ export class ClickhouseClient implements ClickhouseReader, ClickhouseWriter {
output_format_json_quote_64bit_integers: 0,
output_format_json_quote_64bit_floats: 0,
cancel_http_readonly_queries_on_client_close: 1,
// Deeply nested JSON-typed columns (e.g. run output/error) can exceed
// the default binary type complexity of 1000 when read back, which
// fails the whole query. Raise the ceiling so those rows stay readable.
input_format_binary_max_type_complexity: 100000,
Comment on lines +75 to +78

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🚩 Setting name may not apply when queries use JSON format

The new setting input_format_binary_max_type_complexity at internal-packages/clickhouse/src/client/client.ts:78 relates to binary format parsing. However, all query methods in this client use JSONEachRow or JSONCompactEachRow format (e.g. internal-packages/clickhouse/src/client/client.ts:168, internal-packages/clickhouse/src/client/client.ts:450). It's possible the @clickhouse/client Node.js library uses binary format internally for metadata or type description exchange even when the query format is JSON-based — if so, this setting would correctly prevent failures. But if the setting only applies to queries explicitly using RowBinary/Native formats, it may have no effect. The PR author likely tested this in production against the actual failure, so it probably does help, but confirming with ClickHouse docs or the client library internals would be worthwhile.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

},
log: {
level: convertLogLevelToClickhouseLogLevel(config.logLevel),
Expand Down