Skip to content
Merged
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
16 changes: 15 additions & 1 deletion clickhouse/client.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@
#define DBMS_MIN_REVISION_WITH_SERVER_DISPLAY_NAME 54372
#define DBMS_MIN_REVISION_WITH_VERSION_PATCH 54401
#define DBMS_MIN_REVISION_WITH_LOW_CARDINALITY_TYPE 54405
#define DBMS_MIN_REVISION_WITH_COLUMN_DEFAULTS_METADATA 54410

#define REVISION DBMS_MIN_REVISION_WITH_LOW_CARDINALITY_TYPE
#define REVISION DBMS_MIN_REVISION_WITH_COLUMN_DEFAULTS_METADATA

namespace clickhouse {

Expand Down Expand Up @@ -430,6 +431,19 @@ bool Client::Impl::ReceivePacket(uint64_t* server_packet) {
return false;
}

case ServerCodes::TableColumns: {
// external table name
if (!WireFormat::SkipString(*input_)) {
return false;
}

// columns metadata
if (!WireFormat::SkipString(*input_)) {
return false;
}
return true;
}

default:
throw UnimplementedError("unimplemented " + std::to_string((int)packet_type));
break;
Expand Down
5 changes: 3 additions & 2 deletions clickhouse/protocol.h
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,15 @@ namespace clickhouse {
Extremes = 8, /// Block of mins and maxs, may be compressed.
TablesStatusResponse = 9, /// Response to TableStatus.
Log = 10, /// Query execution log.
TableColumns = 11, /// Columns' description for default values calculation
};
}

/// Types of packets sent by client.
namespace ClientCodes {
enum {
Hello = 0, /// Name, version, default database name.
Query = 1, /** Query id, query settings, query processing stage,
Query = 1, /** Query id, query settings, query processing stage,
* compression status, and query text (no INSERT data).
*/
Data = 2, /// Data `Block` (e.g. INSERT data), may be compressed.
Expand All @@ -32,7 +33,7 @@ namespace clickhouse {
};
}

/// Should we compress `Block`s of data
/// Should we compress `Block`s of data
namespace CompressionState {
enum {
Disable = 0,
Expand Down