Skip to content
Opensource internals
  • Posts

CLI

How Ctrl-C Reaches a Running Query: The Client's Cancel Packet

Oct 24, 2026 15 min read Jay Hubbert

Ctrl-C only flips an atomic counter in the client; the receive loop notices, writes a Cancel packet, and keeps draining packets so the connection stays in sync.

ClickhouseNetworkingProtocolInternalsCLI

Read more →

How the ClickHouse Client Splits a Script into Queries

Oct 24, 2026 17 min read Jay Hubbert

The client parses a script statement by statement, ends inline INSERT data at a blank line, and pulls the trailing comment (and its test hint) into the statement it belongs to.

ClickhouseCLIInternalsParsing

Read more →

© 2026 Jay Hubbert · Built with Hugo 0.168.0

RSS ·