ikv.tikv-client.2.4.4-scala_2.11-RC1.source-code.select.proto Maven / Gradle / Ivy
syntax = "proto2";
package tipb;
option java_multiple_files = true;
option java_package = "com.pingcap.tidb.tipb";
import "executor.proto";
import "gogoproto/gogo.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.sizer_all) = true;
option (gogoproto.unmarshaler_all) = true;
// values are all in text format.
message Row {
optional bytes handle = 1;
optional bytes data = 2;
}
message Error {
optional int32 code = 1 [(gogoproto.nullable) = false];
optional string msg = 2 [(gogoproto.nullable) = false];
}
// Response for SelectRequest.
message SelectResponse {
optional Error error = 1;
// Result rows.
repeated Row rows = 2;
// Use multiple chunks to reduce memory allocation and
// avoid allocating large contiguous memory.
repeated Chunk chunks = 3 [(gogoproto.nullable) = false];
repeated Error warnings = 4;
repeated int64 output_counts = 5;
optional int64 warning_count = 6;
// Not used any more
// optional bytes row_batch_data = 7 [(gogoproto.customtype) = "github.com/pingcap/tipb/sharedbytes.SharedBytes", (gogoproto.nullable) = false];
// The execution summary of each executor, in the order in request.
repeated ExecutorExecutionSummary execution_summaries = 8;
// It indicates the encode type of response.
optional EncodeType encode_type = 9 [(gogoproto.nullable) = false];
}
// Chunk contains multiple rows data and rows meta.
message Chunk {
// Data for all rows in the chunk.
optional bytes rows_data = 3 [(gogoproto.customtype) = "github.com/pingcap/tipb/sharedbytes.SharedBytes", (gogoproto.nullable) = false];
// Meta data for every row.
repeated RowMeta rows_meta = 4 [(gogoproto.nullable) = false];
}
// RowMeta contains row handle and length of a row.
message RowMeta {
optional int64 handle = 1 [(gogoproto.nullable) = false];
optional int64 length = 2 [(gogoproto.nullable) = false];
}
// DAGRequest represents the request that will be handled with DAG mode.
message DAGRequest {
// Transaction start timestamp.
// Deprecated. Start Ts has been moved to coprocessor.Request.
optional uint64 start_ts_fallback = 1;
// It represents push down Executors.
repeated Executor executors = 2;
// time zone offset in seconds
optional int64 time_zone_offset = 3 [(gogoproto.nullable) = false];
// flags are used to store flags that change the execution mode, it contains:
// ignore_truncate = 1
// truncate error should be ignore if set.
// truncate_as_warning = 1 << 1
// when ignored_truncate is not set, return warning instead of error if this flag is set.
// ...
// add more when needed.
optional uint64 flags = 4 [(gogoproto.nullable) = false];
// It represents which columns we should output.
repeated uint32 output_offsets = 5;
// It represents whether we collect the detailed scan counts in each range.
optional bool collect_range_counts = 6;
// It indicates the maximum number of warning,
// which is the number of messages that SHOW WARNINGS displays.
optional uint64 max_warning_count = 7;
// It indicates the encode type of response.
optional EncodeType encode_type = 8 [(gogoproto.nullable) = false];
// It indicates the sql_mode.
optional uint64 sql_mode = 9;
// It indicates whether the sql mode is strict.
// Deprecated. Don't use.
// optional bool is_strict_sql_mode = 10;
// supply offset is not enough since we have daylight saving time present in some regions
optional string time_zone_name = 11 [(gogoproto.nullable) = false];
// It represents whether or not TiKV should collect execution summaries.
// Execution summaries will be collected into `execution_summaries` field
// in the response.
optional bool collect_execution_summaries = 12;
// Represents the maximum size of one packet, any generated string, or any parameter sent as long data.
optional uint64 max_allowed_packet = 13;
// Represents the chunk memory layout.
optional ChunkMemoryLayout chunk_memory_layout = 14;
// Represents whether the expression use RPN form.
optional bool is_rpn_expr = 15;
// UserIdentity uses to do privilege check. It is only used in TiDB cluster memory table.
optional UserIdentity user = 16;
// Represents tree struct based executors, if this field is set, should ignore the executors field, currently only used in TiFlash
optional Executor root_executor = 17;
}
enum EncodeType {
TypeDefault = 0;
TypeChunk = 1;
// TypeCHBlock is used by TiSpark and TiFlash, in this encode mode, TiFlash will encode the data using native ch block format
TypeCHBlock = 2;
}
message ChunkMemoryLayout {
// Represents the endian.
optional Endian endian = 1 [(gogoproto.nullable) = false];
}
enum Endian {
LittleEndian = 0;
BigEndian = 1;
}
message UserIdentity {
optional string user_name = 1 [(gogoproto.nullable) = false];
optional string user_host = 2 [(gogoproto.nullable) = false];
}
message StreamResponse {
optional Error error = 1;
// Data for all rows
optional bytes data = 3 [(gogoproto.customtype) = "github.com/pingcap/tipb/sharedbytes.SharedBytes", (gogoproto.nullable) = false];
repeated Error warnings = 4;
// output row count for each executor
repeated int64 output_counts = 5;
optional int64 warning_count = 6;
}
© 2015 - 2024 Weber Informatics LLC | Privacy Policy