Skip to main content
Edit this page

サーバーパケット

名前説明
0Helloサーバーのハンドシェイク応答
1Dataクライアントデータ と同様
2Exceptionクエリ処理の例外
3Progressクエリの進捗
4Pongピン応答
5EndOfStreamすべてのパケットが転送された
6ProfileInfoプロファイリングデータ
7Totals合計値
8Extremes極値 (最小, 最大)
9TablesStatusResponseTableStatus リクエストへの応答
10Logクエリシステムログ
11TableColumnsカラムの詳細
12UUIDs一意なパーツIDのリスト
13ReadTaskRequest次に必要なタスクを記述するためのリクエストを説明する文字列(UUID)
14ProfileEventsサーバーからのプロファイルイベントを含むパケット

DataTotals、および Extremes は圧縮可能です。

Hello

クライアントの hello に対する応答。

フィールドタイプ説明
nameStringClickhouseサーバー名
version_majorUVarInt21サーバーメジャーバージョン
version_minorUVarInt12サーバーマイナーバージョン
revisionUVarInt54452サーバーリビジョン
tzStringEurope/Moscowサーバータイムゾーン
display_nameStringClickhouseUI用サーバー名
version_patchUVarInt3サーバーパッチバージョン

Exception

クエリ処理中のサーバー例外。

フィールドタイプ説明
codeInt3260ErrorCodes.cpp を参照してください。
nameStringDB::Exceptionサーバーメジャーバージョン
messageStringDB::Exception: Table X doesn't existサーバーマイナーバージョン
stack_traceString~C++ スタックトレース
nestedBooltrue追加のエラー

nestedfalse になるまで、例外の連続リストになることがあります。

Progress

サーバーが定期的に報告するクエリ実行の進捗。

Tip

デルタで報告されます。合計はクライアント側で蓄積してください。

フィールドタイプ説明
rowsUVarInt65535行数
bytesUVarInt871799バイト数
total_rowsUVarInt0合計行数
wrote_rowsUVarInt0クライアントからの行数
wrote_bytesUVarInt0クライアントからのバイト数

Pong

クライアントの ping に対する応答、パケットボディなし。

End of stream

Data パケットはもう送信されなくなり、クエリ結果が完全にサーバーからクライアントへストリームされました。

パケットボディなし。

Profile info

フィールドタイプ
rowsUVarInt
blocksUVarInt
bytesUVarInt
applied_limitBool
rows_before_limitUVarInt
calculated_rows_before_limitBool

Log

サーバーログを含む Data block

Tip

カラムの data block としてエンコードされますが、圧縮されません。

カラムタイプ
timeDateTime
time_microUInt32
host_nameString
query_idString
thread_idUInt64
priorityInt8
sourceString
textString

Profile events

プロファイルイベントを含む Data block

Tip

カラムの data block としてエンコードされますが、圧縮されません。

value のタイプはサーバーリビジョンによって UInt64 または Int64 です。

カラムタイプ
host_nameString
current_timeDateTime
thread_idUInt64
typeInt8
nameString
valueUInt64 または Int64