// Copyright 2023 CeresDB Project Authors. Licensed under Apache-2.0. syntax = "proto3"; package schema; // Table Schema message TableSchema { // Schema of each column repeated ColumnSchema columns = 1; // Version of the schema uint32 version = 2; // Id of timestamp key column uint32 timestamp_id = 3; // Ids of primary keys repeated uint32 primary_key_ids = 4; } // Column schema message ColumnSchema { // Column name string name = 1; // Column type DataType data_type = 2; // Is the column nullable bool is_nullable = 3; // Id of the column uint32 id = 4; // Is the column used as tag bool is_tag = 5; // Comment of the column string comment = 6; // Default value expr of the column oneof default_value { bytes serde_json = 7; } // Whether the column uses dictionary encoding bool is_dictionary = 8; } // Data type of column enum DataType { NULL = 0; TIMESTAMP = 1; DOUBLE = 2; VARBINARY = 3; STRING = 4; UINT64 = 5; FLOAT = 6; INT64 = 7; INT32 = 8; INT16 = 9; INT8 = 10; UINT32 = 11; UINT16 = 12; UINT8 = 13; BOOL = 14; DATE = 15; TIME = 16; } // Projected Schema message ProjectedSchema { TableSchema table_schema = 1; Projection projection = 2; } message Projection { repeated uint64 idx = 1; }