1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
// This file is @generated by prost-build.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArrowBatchSettings {
#[prost(bytes = "vec", tag = "1")]
pub schema: ::prost::alloc::vec::Vec<u8>,
}
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CsvSettings {
/// Number of rows to skip before CSV data. It should be present only in the first upsert of CSV file.
#[prost(uint32, tag = "1")]
pub skip_rows: u32,
/// Fields delimiter in CSV file. It's "," if not set.
#[prost(bytes = "vec", tag = "2")]
pub delimiter: ::prost::alloc::vec::Vec<u8>,
/// String value that would be interpreted as NULL.
#[prost(bytes = "vec", tag = "3")]
pub null_value: ::prost::alloc::vec::Vec<u8>,
/// 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, Eq, Hash, ::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,
}
}
/// *
/// ArrowFormatSettings is settings for Ydb.ResultSet.Format.FORMAT_ARROW in Ydb.Query.ExecuteQueryRequest.
/// It is used to configure compression for record batches in Ydb.ResultSet.data field.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArrowFormatSettings {
/// Codec for compressing binary data in Ydb.ResultSet.data field
#[prost(message, optional, tag = "1")]
pub compression_codec: ::core::option::Option<
arrow_format_settings::CompressionCodec,
>,
}
/// Nested message and enum types in `ArrowFormatSettings`.
pub mod arrow_format_settings {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, Copy, PartialEq, Eq, Hash, ::prost::Message)]
pub struct CompressionCodec {
/// Type of the compression codec
#[prost(enumeration = "compression_codec::Type", tag = "1")]
pub r#type: i32,
/// Compression level for the codec.
/// If is not specified, the default level of the codec type is used.
#[prost(int32, optional, tag = "2")]
pub level: ::core::option::Option<i32>,
}
/// Nested message and enum types in `CompressionCodec`.
pub mod compression_codec {
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(
Clone,
Copy,
Debug,
PartialEq,
Eq,
Hash,
PartialOrd,
Ord,
::prost::Enumeration
)]
#[repr(i32)]
pub enum Type {
/// Unspecified mode, corresponds to TYPE_NONE
Unspecified = 0,
/// Binary data without compression
None = 1,
/// Zstandard compression
Zstd = 2,
/// LZ4 frame compression
Lz4Frame = 3,
}
impl Type {
/// String value of the enum field names used in the ProtoBuf definition.
/// The values are not transformed in any way and thus are considered stable
/// (if the ProtoBuf definition does not change) and safe for programmatic use.
pub fn as_str_name(&self) -> &'static str {
match self {
Self::Unspecified => "TYPE_UNSPECIFIED",
Self::None => "TYPE_NONE",
Self::Zstd => "TYPE_ZSTD",
Self::Lz4Frame => "TYPE_LZ4_FRAME",
}
}
/// Creates an enum from field names used in the ProtoBuf definition.
pub fn from_str_name(value: &str) -> ::core::option::Option<Self> {
match value {
"TYPE_UNSPECIFIED" => Some(Self::Unspecified),
"TYPE_NONE" => Some(Self::None),
"TYPE_ZSTD" => Some(Self::Zstd),
"TYPE_LZ4_FRAME" => Some(Self::Lz4Frame),
_ => None,
}
}
}
}
}
/// *
/// ArrowFormatMeta is a metadata for Ydb.ResultSet.Format.FORMAT_ARROW in Ydb.ResultSet.
/// It is used to get the schema of the Arrow record batch.
#[derive(serde::Serialize, serde::Deserialize)]
#[derive(Clone, PartialEq, Eq, Hash, ::prost::Message)]
pub struct ArrowFormatMeta {
/// Schema of the arrow batch of the result.
/// May be empty for custom Ydb.Query.SchemaInclusionMode
#[prost(bytes = "vec", tag = "1")]
pub schema: ::prost::alloc::vec::Vec<u8>,
}