Skip to content
Open
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
Binary file modified ydb-grpc/src/descriptors.bin
Binary file not shown.
619 changes: 25 additions & 594 deletions ydb-grpc/src/generated/google.protobuf.rs

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion ydb-grpc/src/generated/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,4 +53,4 @@ pub mod ydb {
include!("ydb.topic.rs");
}
include!("ydb.rs");
}
}
15 changes: 15 additions & 0 deletions ydb-grpc/src/generated/ydb.formats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,19 @@ pub struct CsvSettings {
/// First not skipped line is a CSV header (list of column names).
#[prost(bool, tag = "4")]
pub header: bool,
#[prost(message, optional, tag = "5")]
pub quoting: ::core::option::Option<csv_settings::Quoting>,
}
/// Nested message and enum types in `CsvSettings`.
pub mod csv_settings {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
pub struct Quoting {
#[prost(bool, tag = "1")]
pub disabled: bool,
#[prost(bytes = "vec", tag = "2")]
pub quote_char: ::prost::alloc::vec::Vec<u8>,
#[prost(bool, tag = "3")]
pub double_quote_disabled: bool,
}
}
8 changes: 8 additions & 0 deletions ydb-grpc/src/generated/ydb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,6 +304,10 @@ pub mod r#type {
TzDate = 52,
TzDatetime = 53,
TzTimestamp = 54,
Date32 = 64,
Datetime64 = 65,
Timestamp64 = 66,
Interval64 = 67,
String = 4097,
Utf8 = 4608,
Yson = 4609,
Expand Down Expand Up @@ -337,6 +341,10 @@ pub mod r#type {
PrimitiveTypeId::TzDate => "TZ_DATE",
PrimitiveTypeId::TzDatetime => "TZ_DATETIME",
PrimitiveTypeId::TzTimestamp => "TZ_TIMESTAMP",
PrimitiveTypeId::Date32 => "DATE32",
PrimitiveTypeId::Datetime64 => "DATETIME64",
PrimitiveTypeId::Timestamp64 => "TIMESTAMP64",
PrimitiveTypeId::Interval64 => "INTERVAL64",
PrimitiveTypeId::String => "STRING",
PrimitiveTypeId::Utf8 => "UTF8",
PrimitiveTypeId::Yson => "YSON",
Expand Down
6 changes: 6 additions & 0 deletions ydb-grpc/src/generated/ydb.table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -519,6 +519,9 @@ pub struct PartitionStats {
/// Approximate size of shard (bytes)
#[prost(uint64, tag = "2")]
pub store_size: u64,
/// id of node that serve shard key range
#[prost(uint32, tag = "3")]
pub leader_node_id: u32,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down Expand Up @@ -1265,6 +1268,9 @@ pub struct DescribeTableRequest {
/// Includes partition statistics (required include_table_statistics)
#[prost(bool, tag = "7")]
pub include_partition_stats: bool,
/// Includes shard -> node id maping (required include_partition_stats)
#[prost(bool, tag = "9")]
pub include_shard_nodes_info: bool,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, ::prost::Message)]
Expand Down
229 changes: 214 additions & 15 deletions ydb-grpc/src/generated/ydb.topic.rs

Large diffs are not rendered by default.

16 changes: 16 additions & 0 deletions ydb/src/grpc_wrapper/raw_table_service/value/type.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,13 @@ pub(crate) enum RawType {
Float,
Double,
Date,
Date32,
DateTime,
DateTime64,
Timestamp,
Timestamp64,
Interval,
Interval64,
TzDate,
TzDatetime,
TzTimestamp,
Expand Down Expand Up @@ -130,6 +134,10 @@ impl RawType {
PrimitiveTypeId::Uuid => RawType::Uuid,
PrimitiveTypeId::JsonDocument => RawType::JSONDocument,
PrimitiveTypeId::Dynumber => RawType::DyNumber,
PrimitiveTypeId::Date32 => RawType::Date32,
PrimitiveTypeId::Datetime64 => RawType::DateTime64,
PrimitiveTypeId::Timestamp64 => RawType::Timestamp64,
PrimitiveTypeId::Interval64 => RawType::Interval64,
};

Ok(res)
Expand All @@ -156,9 +164,13 @@ impl RawType {
RawType::Float => Value::Float(0.0),
RawType::Double => Value::Double(0.0),
RawType::Date => Value::Date(SystemTime::UNIX_EPOCH),
t @ RawType::Date32 => return unimplemented_type(t),
RawType::DateTime => Value::DateTime(SystemTime::UNIX_EPOCH),
t @ RawType::DateTime64 => return unimplemented_type(t),
RawType::Timestamp => Value::Timestamp(SystemTime::UNIX_EPOCH),
t @ RawType::Timestamp64 => return unimplemented_type(t),
RawType::Interval => Value::Interval(SignedInterval::default()),
t @ RawType::Interval64 => return unimplemented_type(t),
t @ RawType::TzDate => return unimplemented_type(t),
t @ RawType::TzDatetime => return unimplemented_type(t),
t @ RawType::TzTimestamp => return unimplemented_type(t),
Expand Down Expand Up @@ -357,9 +369,13 @@ impl From<RawType> for ydb_grpc::ydb_proto::Type {
RawType::Float => ProtoType::TypeId(PrimitiveTypeId::Float as i32),
RawType::Double => ProtoType::TypeId(PrimitiveTypeId::Double as i32),
RawType::Date => ProtoType::TypeId(PrimitiveTypeId::Date as i32),
RawType::Date32 => ProtoType::TypeId(PrimitiveTypeId::Date32 as i32),
RawType::DateTime => ProtoType::TypeId(PrimitiveTypeId::Datetime as i32),
RawType::DateTime64 => ProtoType::TypeId(PrimitiveTypeId::Datetime64 as i32),
RawType::Timestamp => ProtoType::TypeId(PrimitiveTypeId::Timestamp as i32),
RawType::Timestamp64 => ProtoType::TypeId(PrimitiveTypeId::Timestamp64 as i32),
RawType::Interval => ProtoType::TypeId(PrimitiveTypeId::Interval as i32),
RawType::Interval64 => ProtoType::TypeId(PrimitiveTypeId::Interval64 as i32),
RawType::TzDate => ProtoType::TypeId(PrimitiveTypeId::TzDate as i32),
RawType::TzDatetime => ProtoType::TypeId(PrimitiveTypeId::TzDatetime as i32),
RawType::TzTimestamp => ProtoType::TypeId(PrimitiveTypeId::TzTimestamp as i32),
Expand Down
4 changes: 4 additions & 0 deletions ydb/src/grpc_wrapper/raw_table_service/value/value_ydb.rs
Original file line number Diff line number Diff line change
Expand Up @@ -246,19 +246,23 @@ impl TryFrom<RawTypedValue> for Value {
(RawType::Date, RawValue::UInt32(v)) => Value::Date(
SystemTime::UNIX_EPOCH + Duration::from_secs((v as u64) * SECONDS_PER_DAY),
),
(t @ RawType::Date32, _) => return type_unimplemented(t),
(t @ RawType::Date, v) => return types_mismatch(t, v),
(RawType::DateTime, RawValue::UInt32(v)) => {
Value::DateTime(SystemTime::UNIX_EPOCH + Duration::from_secs(v.into()))
}
(t @ RawType::DateTime, v) => return types_mismatch(t, v),
(t @ RawType::DateTime64, _) => return type_unimplemented(t),
(RawType::Timestamp, RawValue::UInt64(v)) => {
Value::Timestamp(SystemTime::UNIX_EPOCH + Duration::from_micros(v))
}
(t @ RawType::Timestamp, v) => return types_mismatch(t, v),
(t @ RawType::Timestamp64, _) => return type_unimplemented(t),
(RawType::Interval, RawValue::Int64(v)) => {
Value::Interval(SignedInterval::from_nanos(v))
}
(t @ RawType::Interval, v) => return types_mismatch(t, v),
(t @ RawType::Interval64, _) => return type_unimplemented(t),
(t @ RawType::TzDate, _) => return type_unimplemented(t),
(t @ RawType::TzDatetime, _) => return type_unimplemented(t),
(t @ RawType::TzTimestamp, _) => return type_unimplemented(t),
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,10 @@ impl From<RawPartitioningSettings> for PartitioningSettings {
fn from(value: RawPartitioningSettings) -> Self {
Self {
min_active_partitions: value.min_active_partitions,
max_active_partitions: 0,
partition_count_limit: value.partition_count_limit,

auto_partitioning_settings: None,
}
}
}
Expand All @@ -44,6 +47,8 @@ impl From<RawAlterPartitioningSettings> for AlterPartitioningSettings {
Self {
set_min_active_partitions: value.set_min_active_partitions,
set_partition_count_limit: value.set_partition_count_limit,
set_max_active_partitions: None,
alter_auto_partitioning_settings: None,
}
}
}
Loading